Tests: dust off x86_64 mem_dest_prev

Change-Id: I445ea0e8ae2cd631c775718a86a64fd2ecb90f35
Refs: #1228
This commit is contained in:
Dominique Martinet
2018-12-04 17:03:20 +09:00
committed by Masamichi Takagi
parent 52cd57fed2
commit 01b2a1d213
3 changed files with 21 additions and 23 deletions

View File

@ -1,18 +1,18 @@
=================== ===================
Advance preparation Advance preparation
=================== ===================
1)Implement patch of test_memtest_destroy.patch 1) Implement patch of test_memtest_destroy.patch
cd mckernel cd mckernel
patch -p0 < test_memtest_destroy.patch patch -p1 < test_memtest_destroy.patch
make make
make install make install
2)Compile command execution processing 2) Compile command execution processing
cd mckernel/test/mem_dest_prev/mcexec_test_proc/ cd mckernel/test/mem_dest_prev/mcexec_test_proc/
make make
3)Write the LTP path to LTP_DIR in the configuration file 3) Write the LTP path to LTP_DIR in the configuration file
vi config vi config
ex) LTP_DIR=$HOME/test/mem_dest_prev/ltp/testcases/bin/ ex) LTP_DIR=$HOME/test/mem_dest_prev/ltp/testcases/bin/
@ -21,5 +21,5 @@ vi config
========== ==========
How to run How to run
========== ==========
./go_test_McKernal.sh ./go_test_McKernel.sh

View File

@ -1,21 +1,19 @@
diff --git arch/x86/kernel/include/syscall_list.h arch/x86/kernel/include/syscall_list.h diff --git a/arch/x86_64/kernel/include/syscall_list.h b/arch/x86_64/kernel/include/syscall_list.h
index 42d1e2e..f5769b8 100644 index ce28d52..d1ad182 100644
--- arch/x86/kernel/include/syscall_list.h --- a/arch/x86_64/kernel/include/syscall_list.h
+++ arch/x86/kernel/include/syscall_list.h +++ b/arch/x86_64/kernel/include/syscall_list.h
@@ -156,5 +156,7 @@ SYSCALL_HANDLED(__NR_profile, profile) @@ -167,4 +167,5 @@ SYSCALL_HANDLED(802, linux_mlock)
SYSCALL_HANDLED(730, util_migrate_inter_kernel) SYSCALL_HANDLED(803, suspend_threads)
SYSCALL_HANDLED(731, util_indicate_clone) SYSCALL_HANDLED(804, resume_threads)
SYSCALL_HANDLED(732, get_system) SYSCALL_HANDLED(811, linux_spawn)
+/* McKernel Specific */
+SYSCALL_HANDLED(950, mem_destroy) +SYSCALL_HANDLED(950, mem_destroy)
/**** End of File ****/ /**** End of File ****/
diff --git arch/x86/kernel/syscall.c arch/x86/kernel/syscall.c diff --git a/arch/x86_64/kernel/syscall.c b/arch/x86_64/kernel/syscall.c
index 2260b66..e96776a 100644 index 230fa98..1860268 100644
--- arch/x86/kernel/syscall.c --- a/arch/x86_64/kernel/syscall.c
+++ arch/x86/kernel/syscall.c +++ b/arch/x86_64/kernel/syscall.c
@@ -1887,4 +1887,33 @@ save_uctx(void *uctx, struct x86_user_context *regs) @@ -2745,4 +2745,33 @@ time_t time(void) {
ctx->fregsize = 0; return ret;
} }
+ +
@ -39,9 +37,9 @@ index 2260b66..e96776a 100644
+ } + }
+ +
+ addr = phys_to_virt(get_end + ADD_ADDR_VAL); + addr = phys_to_virt(get_end + ADD_ADDR_VAL);
+#if 1 +#if 0
+ *addr = 0x1; + *addr = 0x1;
+#endif +#endif
+ kprintf("%s: Address out of range 0x%lx(val:%d)\n",__FUNCTION__ ,addr ,*addr); + kprintf("%s: Address out of range 0x%lx(val:%d)\n",__FUNCTION__ ,addr ,*addr);
+ +
+ return rst; + return rst;