From 01b2a1d21300ec3cf735f91d8de3c73b9f383add Mon Sep 17 00:00:00 2001 From: Dominique Martinet Date: Tue, 4 Dec 2018 17:03:20 +0900 Subject: [PATCH] Tests: dust off x86_64 mem_dest_prev Change-Id: I445ea0e8ae2cd631c775718a86a64fd2ecb90f35 Refs: #1228 --- test/mem_dest_prev/x86_64/README | 10 +++--- ...o_test_McKernal.sh => go_test_McKernel.sh} | 0 .../x86_64/test_memtest_destroy.patch | 34 +++++++++---------- 3 files changed, 21 insertions(+), 23 deletions(-) rename test/mem_dest_prev/x86_64/{go_test_McKernal.sh => go_test_McKernel.sh} (100%) diff --git a/test/mem_dest_prev/x86_64/README b/test/mem_dest_prev/x86_64/README index f411617a..52d1ed96 100644 --- a/test/mem_dest_prev/x86_64/README +++ b/test/mem_dest_prev/x86_64/README @@ -1,18 +1,18 @@ =================== Advance preparation =================== -1)Implement patch of test_memtest_destroy.patch +1) Implement patch of test_memtest_destroy.patch cd mckernel -patch -p0 < test_memtest_destroy.patch +patch -p1 < test_memtest_destroy.patch make make install -2)Compile command execution processing +2) Compile command execution processing cd mckernel/test/mem_dest_prev/mcexec_test_proc/ 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 ex) LTP_DIR=$HOME/test/mem_dest_prev/ltp/testcases/bin/ @@ -21,5 +21,5 @@ vi config ========== How to run ========== -./go_test_McKernal.sh +./go_test_McKernel.sh diff --git a/test/mem_dest_prev/x86_64/go_test_McKernal.sh b/test/mem_dest_prev/x86_64/go_test_McKernel.sh similarity index 100% rename from test/mem_dest_prev/x86_64/go_test_McKernal.sh rename to test/mem_dest_prev/x86_64/go_test_McKernel.sh diff --git a/test/mem_dest_prev/x86_64/test_memtest_destroy.patch b/test/mem_dest_prev/x86_64/test_memtest_destroy.patch index 8497b30e..4106ecde 100644 --- a/test/mem_dest_prev/x86_64/test_memtest_destroy.patch +++ b/test/mem_dest_prev/x86_64/test_memtest_destroy.patch @@ -1,21 +1,19 @@ -diff --git arch/x86/kernel/include/syscall_list.h arch/x86/kernel/include/syscall_list.h -index 42d1e2e..f5769b8 100644 ---- arch/x86/kernel/include/syscall_list.h -+++ arch/x86/kernel/include/syscall_list.h -@@ -156,5 +156,7 @@ SYSCALL_HANDLED(__NR_profile, profile) - SYSCALL_HANDLED(730, util_migrate_inter_kernel) - SYSCALL_HANDLED(731, util_indicate_clone) - SYSCALL_HANDLED(732, get_system) -+/* McKernel Specific */ +diff --git a/arch/x86_64/kernel/include/syscall_list.h b/arch/x86_64/kernel/include/syscall_list.h +index ce28d52..d1ad182 100644 +--- a/arch/x86_64/kernel/include/syscall_list.h ++++ b/arch/x86_64/kernel/include/syscall_list.h +@@ -167,4 +167,5 @@ SYSCALL_HANDLED(802, linux_mlock) + SYSCALL_HANDLED(803, suspend_threads) + SYSCALL_HANDLED(804, resume_threads) + SYSCALL_HANDLED(811, linux_spawn) +SYSCALL_HANDLED(950, mem_destroy) - /**** End of File ****/ -diff --git arch/x86/kernel/syscall.c arch/x86/kernel/syscall.c -index 2260b66..e96776a 100644 ---- arch/x86/kernel/syscall.c -+++ arch/x86/kernel/syscall.c -@@ -1887,4 +1887,33 @@ save_uctx(void *uctx, struct x86_user_context *regs) - ctx->fregsize = 0; +diff --git a/arch/x86_64/kernel/syscall.c b/arch/x86_64/kernel/syscall.c +index 230fa98..1860268 100644 +--- a/arch/x86_64/kernel/syscall.c ++++ b/arch/x86_64/kernel/syscall.c +@@ -2745,4 +2745,33 @@ time_t time(void) { + return ret; } + @@ -39,9 +37,9 @@ index 2260b66..e96776a 100644 + } + + addr = phys_to_virt(get_end + ADD_ADDR_VAL); -+#if 1 ++#if 0 + *addr = 0x1; -+#endif ++#endif + kprintf("%s: Address out of range 0x%lx(val:%d)\n",__FUNCTION__ ,addr ,*addr); + + return rst;