include interrupt handling time into system time
Change-Id: If2ed2d488b4040d288d712f0a244505adbcec6f5 Refs: #1221
This commit is contained in:
committed by
Masamichi Takagi
parent
ba80dd8650
commit
f115bae8a7
74
test/issues/1221/C1221.patch
Normal file
74
test/issues/1221/C1221.patch
Normal file
@@ -0,0 +1,74 @@
|
||||
diff --git a/arch/arm64/kernel/include/syscall_list.h b/arch/arm64/kernel/include/syscall_list.h
|
||||
index 5dd6243..0f172a3 100644
|
||||
--- a/arch/arm64/kernel/include/syscall_list.h
|
||||
+++ b/arch/arm64/kernel/include/syscall_list.h
|
||||
@@ -128,6 +128,8 @@ SYSCALL_HANDLED(731, util_indicate_clone)
|
||||
SYSCALL_HANDLED(732, get_system)
|
||||
SYSCALL_HANDLED(733, util_register_desc)
|
||||
|
||||
+SYSCALL_HANDLED(750, int_and_sleep)
|
||||
+
|
||||
/* McKernel Specific */
|
||||
SYSCALL_HANDLED(801, swapout)
|
||||
SYSCALL_HANDLED(802, linux_mlock)
|
||||
diff --git a/arch/x86_64/kernel/include/syscall_list.h b/arch/x86_64/kernel/include/syscall_list.h
|
||||
index 8ef9bd0..2134212 100644
|
||||
--- a/arch/x86_64/kernel/include/syscall_list.h
|
||||
+++ b/arch/x86_64/kernel/include/syscall_list.h
|
||||
@@ -170,6 +170,8 @@ SYSCALL_HANDLED(731, util_indicate_clone)
|
||||
SYSCALL_HANDLED(732, get_system)
|
||||
SYSCALL_HANDLED(733, util_register_desc)
|
||||
|
||||
+SYSCALL_HANDLED(750, int_and_sleep)
|
||||
+
|
||||
/* McKernel Specific */
|
||||
SYSCALL_HANDLED(801, swapout)
|
||||
SYSCALL_HANDLED(802, linux_mlock)
|
||||
diff --git a/kernel/syscall.c b/kernel/syscall.c
|
||||
index 97935a7..a603791 100644
|
||||
--- a/kernel/syscall.c
|
||||
+++ b/kernel/syscall.c
|
||||
@@ -9429,6 +9429,43 @@ SYSCALL_DECLARE(util_register_desc)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+volatile long wk;
|
||||
+volatile long x;
|
||||
+volatile long y;
|
||||
+volatile long z;
|
||||
+
|
||||
+static void int_func(void *arg)
|
||||
+{
|
||||
+ long i;
|
||||
+
|
||||
+ kprintf("int_func start\n");
|
||||
+ for (i = 0; i < 100000000L; i++)
|
||||
+ wk += x * y + z;
|
||||
+ kprintf("int_func end\n");
|
||||
+}
|
||||
+
|
||||
+SYSCALL_DECLARE(int_and_sleep)
|
||||
+{
|
||||
+ struct ihk_mc_interrupt_handler *int_handler;
|
||||
+ long flag;
|
||||
+
|
||||
+ int_handler = kmalloc(sizeof(struct ihk_mc_interrupt_handler), IHK_MC_AP_NOWAIT);
|
||||
+ memset(int_handler, '\0', sizeof(struct ihk_mc_interrupt_handler));
|
||||
+ INIT_LIST_HEAD(&int_handler->list);
|
||||
+ int_handler->func = int_func;
|
||||
+ int_handler->priv = NULL;
|
||||
+ kprintf("ihk_mc_register_interrupt_handler\n");
|
||||
+ ihk_mc_register_interrupt_handler(140, int_handler);
|
||||
+ kprintf("ihk_mc_interrupt_cpu\n");
|
||||
+ flag = cpu_disable_interrupt_save();
|
||||
+ ihk_mc_interrupt_cpu(ihk_mc_get_processor_id(), 140);
|
||||
+ cpu_restore_interrupt(flag);
|
||||
+ kprintf("ihk_mc_unregister_interrupt_handler\n");
|
||||
+ ihk_mc_unregister_interrupt_handler(140, int_handler);
|
||||
+ kfree(int_handler);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
void
|
||||
reset_cputime()
|
||||
{
|
||||
21
test/issues/1221/C1221.sh
Normal file
21
test/issues/1221/C1221.sh
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
USELTP=1
|
||||
USEOSTEST=0
|
||||
|
||||
. ../../common.sh
|
||||
|
||||
################################################################################
|
||||
$MCEXEC ./C1221T01
|
||||
|
||||
for i in getrusage01:02 getrusage02:03 getrusage03:04 getrusage04:05; do
|
||||
tp=`echo $i|sed 's/:.*//'`
|
||||
id=`echo $i|sed 's/.*://'`
|
||||
PATH=$PATH:$LTPBIN $MCEXEC $LTPBIN/$tp 2>&1 | tee $tp.txt
|
||||
ok=`grep TPASS $tp.txt | wc -l`
|
||||
ng=`grep TFAIL $tp.txt | wc -l`
|
||||
if [ $ng = 0 ]; then
|
||||
echo "*** C1221T$id: $tp PASS ($ok)"
|
||||
else
|
||||
echo "*** C1221T$id: $tp FAIL (ok=$ok ng=%ng)"
|
||||
fi
|
||||
done
|
||||
56
test/issues/1221/C1221T01.c
Normal file
56
test/issues/1221/C1221T01.c
Normal file
@@ -0,0 +1,56 @@
|
||||
#define _GNU_SOURCE
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
#include <errno.h>
|
||||
|
||||
void tv_sub(struct timeval *t1, struct timeval *t2)
|
||||
{
|
||||
t2->tv_sec -= t1->tv_sec;
|
||||
t2->tv_usec -= t1->tv_usec;
|
||||
if (t2->tv_usec < 0) {
|
||||
t2->tv_usec += 1000000;
|
||||
t2->tv_sec--;
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
struct timeval t1;
|
||||
struct timeval t2;
|
||||
struct rusage ru0;
|
||||
struct rusage ru;
|
||||
long xe;
|
||||
long xs;
|
||||
|
||||
fprintf(stderr, "*** C1221T01 test start\n");
|
||||
gettimeofday(&t1, NULL);
|
||||
getrusage(RUSAGE_SELF, &ru0);
|
||||
if (syscall(750, 1) == -1) {
|
||||
fprintf(stderr, "*** C1221T01 FAIL no patched kernel\n");
|
||||
exit(1);
|
||||
}
|
||||
getrusage(RUSAGE_SELF, &ru);
|
||||
gettimeofday(&t2, NULL);
|
||||
tv_sub(&t1, &t2);
|
||||
tv_sub(&ru0.ru_utime, &ru.ru_utime);
|
||||
tv_sub(&ru0.ru_stime, &ru.ru_stime);
|
||||
fprintf(stderr, "etime=%d.%06d\n", (int)t2.tv_sec, (int)t2.tv_usec);
|
||||
fprintf(stderr, "utime=%d.%06d\n", (int)ru.ru_utime.tv_sec,
|
||||
(int)ru.ru_utime.tv_usec);
|
||||
fprintf(stderr, "stime=%d.%06d\n", (int)ru.ru_stime.tv_sec,
|
||||
(int)ru.ru_stime.tv_usec);
|
||||
xe = t2.tv_sec * 1000000L + t2.tv_usec;
|
||||
xs = ru.ru_stime.tv_sec * 1000000L + ru.ru_stime.tv_usec;
|
||||
if (xs > (xe * 100 / 95)) {
|
||||
fprintf(stderr, "*** C1221T01 FAIL\n");
|
||||
}
|
||||
else {
|
||||
fprintf(stderr, "*** C1221T01 PASS\n");
|
||||
}
|
||||
exit(0);
|
||||
}
|
||||
128
test/issues/1221/C1221_arm64.txt
Normal file
128
test/issues/1221/C1221_arm64.txt
Normal file
@@ -0,0 +1,128 @@
|
||||
Script started on Thu 26 Sep 2019 10:37:38 AM JST
|
||||
gcc -g -Wall -o C1221T01 C1221T01.c
|
||||
sh ./C1221.sh
|
||||
mcstop+release.sh ... done
|
||||
mcreboot.sh -c 1-6,29-34 -m 50G@0,50G@1 -r 1-6:0+29-34:28 -O ... done
|
||||
*** C1221T01 test start
|
||||
etime=0.000017
|
||||
utime=0.000001
|
||||
stime=0.000011
|
||||
*** C1221T01 PASS
|
||||
getrusage01 1 TPASS : getrusage passed
|
||||
getrusage01 2 TPASS : getrusage passed
|
||||
*** C1221T02: getrusage01 PASS (2)
|
||||
getrusage02 1 TPASS : getrusage failed as expected: TEST_ERRNO=EINVAL(22): Invalid argument
|
||||
getrusage02 2 TPASS : getrusage failed as expected: TEST_ERRNO=EFAULT(14): Bad address
|
||||
*** C1221T03: getrusage02 PASS (2)
|
||||
getrusage03 0 TINFO : allocate 100MB
|
||||
getrusage03 0 TINFO : Testcase #01: fork inherit
|
||||
getrusage03 0 TINFO : initial.self = 104576
|
||||
getrusage03 0 TINFO : child.self = 106880
|
||||
getrusage03 0 TINFO : allocate 100MB
|
||||
getrusage03 0 TINFO : Testcase #01: fork inherit
|
||||
getrusage03 0 TINFO : initial.self = 104576
|
||||
getrusage03 1 TPASS : initial.self ~= child.self
|
||||
getrusage03 0 TINFO : Testcase #02: fork inherit(cont.)
|
||||
getrusage03 0 TINFO : initial.children = 106880
|
||||
getrusage03 2 TPASS : initial.children ~= 100MB
|
||||
getrusage03 0 TINFO : child.children = 0
|
||||
getrusage03 0 TINFO : allocate 100MB
|
||||
getrusage03 0 TINFO : Testcase #01: fork inherit
|
||||
getrusage03 0 TINFO : initial.self = 104576
|
||||
getrusage03 1 TPASS : initial.self ~= child.self
|
||||
getrusage03 0 TINFO : Testcase #02: fork inherit(cont.)
|
||||
getrusage03 0 TINFO : initial.children = 106880
|
||||
getrusage03 2 TPASS : initial.children ~= 100MB
|
||||
getrusage03 3 TPASS : child.children == 0
|
||||
getrusage03 0 TINFO : Testcase #03: fork + malloc
|
||||
getrusage03 0 TINFO : initial.self = 104576
|
||||
getrusage03 0 TINFO : child allocate +50MB
|
||||
getrusage03 0 TINFO : child.self = 158144
|
||||
getrusage03_child 0 TINFO : grandchild allocate 300MB
|
||||
getrusage03_child 0 TINFO : grandchild allocate 300MB
|
||||
getrusage03 0 TINFO : allocate 100MB
|
||||
getrusage03 0 TINFO : Testcase #01: fork inherit
|
||||
getrusage03 0 TINFO : initial.self = 104576
|
||||
getrusage03 1 TPASS : initial.self ~= child.self
|
||||
getrusage03 0 TINFO : Testcase #02: fork inherit(cont.)
|
||||
getrusage03 0 TINFO : initial.children = 106880
|
||||
getrusage03 2 TPASS : initial.children ~= 100MB
|
||||
getrusage03 3 TPASS : child.children == 0
|
||||
getrusage03 0 TINFO : Testcase #03: fork + malloc
|
||||
getrusage03 0 TINFO : initial.self = 104576
|
||||
getrusage03 4 TPASS : initial.self + 50MB ~= child.self
|
||||
getrusage03 0 TINFO : Testcase #04: grandchild maxrss
|
||||
getrusage03 0 TINFO : initial.children = 158144
|
||||
getrusage03_child 0 TINFO : child allocate 400MB
|
||||
getrusage03 0 TINFO : allocate 100MB
|
||||
getrusage03 0 TINFO : Testcase #01: fork inherit
|
||||
getrusage03 0 TINFO : initial.self = 104576
|
||||
getrusage03 1 TPASS : initial.self ~= child.self
|
||||
getrusage03 0 TINFO : Testcase #02: fork inherit(cont.)
|
||||
getrusage03 0 TINFO : initial.children = 106880
|
||||
getrusage03 2 TPASS : initial.children ~= 100MB
|
||||
getrusage03 3 TPASS : child.children == 0
|
||||
getrusage03 0 TINFO : Testcase #03: fork + malloc
|
||||
getrusage03 0 TINFO : initial.self = 104576
|
||||
getrusage03 4 TPASS : initial.self + 50MB ~= child.self
|
||||
getrusage03 0 TINFO : Testcase #04: grandchild maxrss
|
||||
getrusage03 0 TINFO : initial.children = 158144
|
||||
getrusage03 0 TINFO : post_wait.children = 311616
|
||||
getrusage03 5 TPASS : child.children ~= 300MB
|
||||
getrusage03 0 TINFO : Testcase #05: zombie
|
||||
getrusage03 0 TINFO : initial.children = 311616
|
||||
getrusage03_child 0 TINFO : child allocate 500MB
|
||||
getrusage03 0 TINFO : allocate 100MB
|
||||
getrusage03 0 TINFO : Testcase #01: fork inherit
|
||||
getrusage03 0 TINFO : initial.self = 104576
|
||||
getrusage03 1 TPASS : initial.self ~= child.self
|
||||
getrusage03 0 TINFO : Testcase #02: fork inherit(cont.)
|
||||
getrusage03 0 TINFO : initial.children = 106880
|
||||
getrusage03 2 TPASS : initial.children ~= 100MB
|
||||
getrusage03 3 TPASS : child.children == 0
|
||||
getrusage03 0 TINFO : Testcase #03: fork + malloc
|
||||
getrusage03 0 TINFO : initial.self = 104576
|
||||
getrusage03 4 TPASS : initial.self + 50MB ~= child.self
|
||||
getrusage03 0 TINFO : Testcase #04: grandchild maxrss
|
||||
getrusage03 0 TINFO : initial.children = 158144
|
||||
getrusage03 0 TINFO : post_wait.children = 311616
|
||||
getrusage03 5 TPASS : child.children ~= 300MB
|
||||
getrusage03 0 TINFO : Testcase #05: zombie
|
||||
getrusage03 0 TINFO : initial.children = 311616
|
||||
getrusage03 0 TINFO : pre_wait.children = 311616
|
||||
getrusage03 6 TPASS : initial.children ~= pre_wait.children
|
||||
getrusage03 0 TINFO : post_wait.children = 412800
|
||||
getrusage03 7 TPASS : post_wait.children ~= 400MB
|
||||
getrusage03 0 TINFO : Testcase #06: SIG_IGN
|
||||
getrusage03 0 TINFO : initial.children = 412800
|
||||
getrusage03_child 0 TINFO : exec.self = 104576, exec.children = 412800
|
||||
getrusage03_child 1 TPASS : initial.self ~= exec.self
|
||||
getrusage03_child 2 TPASS : initial.children ~= exec.children
|
||||
*** C1221T04: getrusage03 PASS (23)
|
||||
getrusage04 0 TINFO : Expected timers granularity is 10000 us
|
||||
getrusage04 0 TINFO : Using 1 as multiply factor for max [us]time increment (1000+10000us)!
|
||||
getrusage04 0 TINFO : utime: 540us; stime: 42257us
|
||||
getrusage04 0 TINFO : utime: 544us; stime: 42260us
|
||||
getrusage04 0 TINFO : utime: 547us; stime: 42260us
|
||||
getrusage04 0 TINFO : utime: 549us; stime: 42261us
|
||||
getrusage04 0 TINFO : utime: 551us; stime: 42262us
|
||||
getrusage04 0 TINFO : utime: 553us; stime: 42262us
|
||||
getrusage04 0 TINFO : utime: 555us; stime: 42263us
|
||||
getrusage04 0 TINFO : utime: 557us; stime: 42263us
|
||||
getrusage04 0 TINFO : utime: 559us; stime: 42264us
|
||||
getrusage04 0 TINFO : utime: 561us; stime: 42264us
|
||||
getrusage04 0 TINFO : utime: 563us; stime: 42265us
|
||||
getrusage04 0 TINFO : utime: 565us; stime: 42265us
|
||||
getrusage04 0 TINFO : utime: 567us; stime: 42266us
|
||||
getrusage04 0 TINFO : utime: 569us; stime: 42266us
|
||||
getrusage04 0 TINFO : utime: 571us; stime: 42267us
|
||||
getrusage04 0 TINFO : utime: 573us; stime: 42267us
|
||||
getrusage04 0 TINFO : utime: 575us; stime: 42268us
|
||||
getrusage04 0 TINFO : utime: 577us; stime: 42268us
|
||||
getrusage04 0 TINFO : utime: 578us; stime: 42269us
|
||||
getrusage04 0 TINFO : utime: 580us; stime: 42270us
|
||||
getrusage04 0 TINFO : utime: 582us; stime: 42270us
|
||||
getrusage04 1 TPASS : Test Passed
|
||||
*** C1221T05: getrusage04 PASS (1)
|
||||
|
||||
Script done on Thu 26 Sep 2019 10:38:13 AM JST
|
||||
84
test/issues/1221/C1221_x86_64.txt
Normal file
84
test/issues/1221/C1221_x86_64.txt
Normal file
@@ -0,0 +1,84 @@
|
||||
Script started on Sun Sep 22 15:25:54 2019
|
||||
bash-4.2$ make test
|
||||
gcc -g -Wall -o C1221T01 C1221T01.c
|
||||
sh ./C1221.sh
|
||||
mcstop+release.sh ... done
|
||||
mcreboot.sh -c 1-7,9-15,17-23,25-31 -m 10G@0,10G@1 -r 1-7:0+9-15:8+17-23:16+25-31:24 ... done
|
||||
*** C1221T01 test start
|
||||
etime=0.230807
|
||||
utime=0.000001
|
||||
stime=0.230427
|
||||
*** C1221T01 PASS
|
||||
getrusage01 1 TPASS : getrusage passed
|
||||
getrusage01 2 TPASS : getrusage passed
|
||||
*** C1221T02: getrusage01 PASS (2)
|
||||
getrusage02 1 TPASS : getrusage failed as expected: TEST_ERRNO=EINVAL(22): Invalid argument
|
||||
getrusage02 2 TPASS : getrusage failed as expected: TEST_ERRNO=EFAULT(14): Bad address
|
||||
*** C1221T03: getrusage02 PASS (2)
|
||||
getrusage03 0 TINFO : allocate 100MB
|
||||
getrusage03 0 TINFO : Testcase #01: fork inherit
|
||||
getrusage03 0 TINFO : initial.self = 103340
|
||||
getrusage03 0 TINFO : child.self = 105372
|
||||
getrusage03 1 TPASS : initial.self ~= child.self
|
||||
getrusage03 0 TINFO : Testcase #02: fork inherit(cont.)
|
||||
getrusage03 0 TINFO : initial.children = 105376
|
||||
getrusage03 2 TPASS : initial.children ~= 100MB
|
||||
getrusage03 0 TINFO : child.children = 0
|
||||
getrusage03 3 TPASS : child.children == 0
|
||||
getrusage03 0 TINFO : Testcase #03: fork + malloc
|
||||
getrusage03 0 TINFO : initial.self = 103340
|
||||
getrusage03 0 TINFO : child allocate +50MB
|
||||
getrusage03 0 TINFO : child.self = 156576
|
||||
getrusage03 4 TPASS : initial.self + 50MB ~= child.self
|
||||
getrusage03 0 TINFO : Testcase #04: grandchild maxrss
|
||||
getrusage03 0 TINFO : initial.children = 156576
|
||||
getrusage03_child 0 TINFO : grandchild allocate 300MB
|
||||
getrusage03 0 TINFO : post_wait.children = 310120
|
||||
getrusage03 5 TPASS : child.children ~= 300MB
|
||||
getrusage03 0 TINFO : Testcase #05: zombie
|
||||
getrusage03 0 TINFO : initial.children = 310120
|
||||
getrusage03_child 0 TINFO : child allocate 400MB
|
||||
getrusage03 0 TINFO : pre_wait.children = 310120
|
||||
getrusage03 6 TPASS : initial.children ~= pre_wait.children
|
||||
getrusage03 0 TINFO : post_wait.children = 412092
|
||||
getrusage03 7 TPASS : post_wait.children ~= 400MB
|
||||
getrusage03 0 TINFO : Testcase #06: SIG_IGN
|
||||
getrusage03 0 TINFO : initial.children = 412092
|
||||
getrusage03_child 0 TINFO : child allocate 500MB
|
||||
getrusage03 0 TINFO : after_zombie.children = 412092
|
||||
getrusage03 8 TPASS : initial.children ~= after_zombie.children
|
||||
getrusage03 0 TINFO : Testcase #07: exec without fork
|
||||
getrusage03 0 TINFO : initial.self = 103340, initial.children = 412092
|
||||
getrusage03_child 0 TINFO : exec.self = 103340, exec.children = 412092
|
||||
getrusage03_child 1 TPASS : initial.self ~= exec.self
|
||||
getrusage03_child 2 TPASS : initial.children ~= exec.children
|
||||
*** C1221T04: getrusage03 PASS (10)
|
||||
getrusage04 0 TINFO : Expected timers granularity is 1000 us
|
||||
getrusage04 0 TINFO : Using 1 as multiply factor for max [us]time increment (1000+1000us)!
|
||||
getrusage04 0 TINFO : utime: 377us; stime: 4205us
|
||||
getrusage04 0 TINFO : utime: 379us; stime: 4218us
|
||||
getrusage04 0 TINFO : utime: 381us; stime: 4302us
|
||||
getrusage04 0 TINFO : utime: 383us; stime: 4314us
|
||||
getrusage04 0 TINFO : utime: 385us; stime: 4325us
|
||||
getrusage04 0 TINFO : utime: 387us; stime: 4358us
|
||||
getrusage04 0 TINFO : utime: 388us; stime: 4416us
|
||||
getrusage04 0 TINFO : utime: 390us; stime: 4428us
|
||||
getrusage04 0 TINFO : utime: 392us; stime: 4440us
|
||||
getrusage04 0 TINFO : utime: 393us; stime: 4451us
|
||||
getrusage04 0 TINFO : utime: 395us; stime: 4467us
|
||||
getrusage04 0 TINFO : utime: 397us; stime: 4525us
|
||||
getrusage04 0 TINFO : utime: 399us; stime: 4537us
|
||||
getrusage04 0 TINFO : utime: 400us; stime: 4549us
|
||||
getrusage04 0 TINFO : utime: 402us; stime: 4563us
|
||||
getrusage04 0 TINFO : utime: 404us; stime: 4579us
|
||||
getrusage04 0 TINFO : utime: 405us; stime: 4600us
|
||||
getrusage04 0 TINFO : utime: 407us; stime: 4630us
|
||||
getrusage04 0 TINFO : utime: 409us; stime: 4646us
|
||||
getrusage04 0 TINFO : utime: 410us; stime: 4661us
|
||||
getrusage04 0 TINFO : utime: 412us; stime: 4688us
|
||||
getrusage04 1 TPASS : Test Passed
|
||||
*** C1221T05: getrusage04 PASS (1)
|
||||
bash-4.2$ exit
|
||||
exit
|
||||
|
||||
Script done on Sun Sep 22 15:26:13 2019
|
||||
13
test/issues/1221/Makefile
Normal file
13
test/issues/1221/Makefile
Normal file
@@ -0,0 +1,13 @@
|
||||
CC = gcc
|
||||
TARGET = C1221T01
|
||||
|
||||
all:: $(TARGET)
|
||||
|
||||
C1221T01: C1221T01.c
|
||||
$(CC) -g -Wall -o $@ $^
|
||||
|
||||
test:: all
|
||||
sh ./C1221.sh
|
||||
|
||||
clean::
|
||||
rm -f $(TARGET) *.o
|
||||
35
test/issues/1221/README
Normal file
35
test/issues/1221/README
Normal file
@@ -0,0 +1,35 @@
|
||||
【Issue#1221 動作確認】
|
||||
□ テスト内容
|
||||
1. Issue 指摘事項の再現確認
|
||||
以下のパッチ (C1221.patch) を McKernel に適用し、システムコール中に時間が
|
||||
掛かる割り込み処理を起動することでシステム時間に割り込み処理の時間が加算
|
||||
されていることを確認する。
|
||||
* 以下の処理を行うテスト用システムコールを追加する
|
||||
- 特定の割り込みベクタに対して起動する割り込みハンドラを登録する
|
||||
- 自CPUに登録した割り込みベクタを送信する
|
||||
- 登録した割り込みハンドラを削除する
|
||||
* 割り込みハンドラは時間が掛かる処理 (x86_64で0.2秒程度) を行う
|
||||
このパッチ適用カーネルを使ってテストする。
|
||||
|
||||
C1221T01 時間が掛かる割り込み処理を行ってシステム時間が増加していることを
|
||||
確認するプログラムを実行し、PASS すること
|
||||
|
||||
2. LTP を用いて既存処理に影響しないことを確認
|
||||
CPU時間関連の処理を変更したため、関連するシステムコールのテストを選定した。
|
||||
C1221T02 getrusage01: getrusage の基本機能の確認
|
||||
C1221T03 getrusage02: getrusage の基本機能の確認
|
||||
C1221T04 getrusage03: getrusage の基本機能の確認
|
||||
C1221T05 getrusage04: getrusage の基本機能の確認
|
||||
|
||||
□ 実行手順
|
||||
$ make test
|
||||
|
||||
McKernelのインストール先や LTP の配置場所は、$HOME/.mck_test_config を
|
||||
参照する。.mck_test_config は、McKernel をビルドした際に生成される
|
||||
mck_test_config.sample ファイルを $HOME にコピーし、適宜編集すること。
|
||||
|
||||
尚、テスト実行には C1221.patch を適用した McKernel を使用すること。
|
||||
|
||||
□ 実行結果
|
||||
C1221_x86_64.txt(x86_64実行結果)、C1221_arm64.txt(arm64実行結果) 参照。
|
||||
全ての項目が PASS していることを確認。
|
||||
Reference in New Issue
Block a user