gcc -o CT_001 CT_001.c -pthread
gcc -o CT_002 CT_002.c -pthread
gcc -o CT_003 CT_003.c -pthread
gcc -o CT_004 CT_004.c -pthread
gcc -o CT_005 CT_005.c -pthread
gcc -o CT_006 CT_006.c -pthread
gcc -o CT_007 CT_007.c -pthread
gcc -o CT_008 CT_008.c -pthread
gcc -o CT_009 CT_009.c -pthread
gcc -o CT_010 CT_010.c -pthread
gcc -o CT_011 CT_011.c -pthread
./run.sh
mcstop+release.sh ... done
mcreboot.sh -c 4-7 -m 2G ... done
*** CT_001 start *******************************
 [OK] ptrace_attach
 [OK] ptrace_detach
*** CT_001 PASSED

*** CT_002 start *******************************
 [OK] ptrace_attach
 [OK] ptrace_cont
*** CT_002 PASSED

*** CT_003 start *******************************
 [OK] orphan process
*** CT_003 PASSED

*** CT_004 start *******************************
 [OK] ptrace_attach
 [OK] ptrace_detach
 [OK] ptrace_attach again
 [OK] ptrace_detach again
*** CT_004 PASSED

*** 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

*** CT_006 start *******************************
 [OK] ptrace_attach
 [OK] ptrace_attach failed [double attach]
 [OK] ptrace_detach
*** CT_006 PASSED

*** CT_007 start *******************************
 [OK] ptrace_attach failed [after traceme]
*** CT_007 PASSED

*** 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

*** CT_009 start *******************************
 [OK] ptrace_attach
 [OK] ptrace_detach
 [OK] ptrace_detach faild [double detach]
*** CT_009 PASSED

*** CT_010 start *******************************
 [OK] waitpid for tracee by parent
*** CT_010 PASSED

*** CT_011 start *******************************
 [OK] waitpid for tracee by parent
*** CT_011 PASSED

TEST_SUITE: ptrace
TEST_NUMBER: 19
ARGS: 
child is stopped.
RESULT: ok
TEST_SUITE: ptrace
TEST_NUMBER: 20
ARGS: 
child detach OK.
RESULT: ok
