Test "ptrace: support for attaching child_process to parent" on arm64

Change-Id: I752542b6bfbf023d22e91f909518660afbff813c
Refs: #885
This commit is contained in:
Shiratori, Takehiro
2018-11-21 15:16:12 +09:00
committed by Masamichi Takagi
parent cf113d392a
commit f240671fc8
31 changed files with 1260 additions and 0 deletions

View File

@@ -0,0 +1,92 @@
①Issueで報告されたテストプログラムによる確認
$ mcexec test_set/bin/test_mck -s ptrace -n 19
TEST_SUITE: ptrace
TEST_NUMBER: 19
ARGS:
child is stopped.
RESULT: ok
$ mcexec test_set/bin/test_mck -s ptrace -n 20
TEST_SUITE: ptrace
TEST_NUMBER: 20
ARGS:
child detach OK.
RESULT: ok
②McKernelでのptraceのattach/detachの基本動作確認
/home/satoken/ppos/bin/mcexec ./CT_001
*** CT_001 start *******************************
[OK] ptrace_attach
[OK] ptrace_detach
*** CT_001 PASSED
/home/satoken/ppos/bin/mcexec ./CT_002
*** CT_002 start *******************************
[OK] ptrace_attach
[OK] ptrace_cont
*** CT_002 PASSED
/home/satoken/ppos/bin/mcexec ./CT_003
*** CT_003 start *******************************
[OK] ptrace_attach
[OK] ptrace_cont
[OK] orphan process
*** CT_003 PASSED
/home/satoken/ppos/bin/mcexec ./CT_004
*** CT_004 start *******************************
[OK] ptrace_attach
[OK] ptrace_detach
[OK] ptrace_attach again
[OK] ptrace_detach again
*** CT_004 PASSED
/home/satoken/ppos/bin/mcexec ./CT_005
*** CT_005 start *******************************
[OK] ptrace_attach 0 failed [invalid pid]
[OK] ptrace_attach 1 failed [invalid pid]
[OK] ptrace_attach self failed [invalid pid]
*** CT_005 PASSED
/home/satoken/ppos/bin/mcexec ./CT_006
*** CT_006 start *******************************
[OK] ptrace_attach
[OK] ptrace_attach failed [double attach]
[OK] ptrace_detach
*** CT_006 PASSED
/home/satoken/ppos/bin/mcexec ./CT_007
*** CT_007 start *******************************
[OK] ptrace_attach failed [after traceme]
*** CT_007 PASSED
/home/satoken/ppos/bin/mcexec ./CT_008
*** CT_008 start *******************************
[OK] ptrace_detach 0 failed [invalid pid]
[OK] ptrace_detach 1 failed [invalid pid]
[OK] ptrace_detach child failed [not attached]
[OK] ptrace_detach self failed [invalid pid]
*** CT_008 PASSED
/home/satoken/ppos/bin/mcexec ./CT_009
*** CT_009 start *******************************
[OK] ptrace_attach
[OK] ptrace_detach
[OK] ptrace_detach faild [double detach]
*** CT_009 PASSED
/home/satoken/ppos/bin/mcexec ./CT_010
*** CT_010 start *******************************
[OK] ptrace_attach by tracer
[OK] ptrace_detach by tracer
[OK] waitpid by tracer after detach (failed)
[OK] waitpid for tracee by parent
*** CT_010 PASSED
/home/satoken/ppos/bin/mcexec ./CT_011
*** CT_011 start *******************************
[OK] ptrace_attach
[OK] ptrace_cont
[OK] waitpid for tracee by tracer without detach
[OK] waitpid for tracee by parent
*** CT_011 PASSED