Files
mckernel/test/strace/strace-bundle/test-result.txt
2017-11-22 10:52:30 +09:00

216 lines
7.4 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
スクリプトは Mon Nov 20 13:34:02 2017
に開始しました[?1034hbash-4.2$ export MCEXEC=$HOME/wallaby11-smp-x86/development/mic/mcexec
bash-4.2$ cat ptrace_setoptions
#!/bin/sh
# Ensure that strace tests kernel PTRACE_O_TRACECLONE
# and PTRACE_O_TRACESYSGOOD support properly.
. "${srcdir=.}/init.sh"
[ "$(uname -s)" = Linux ] ||
skip_ 'The kernel is not a Linux kernel'
case "$(uname -r)" in
2.[6-9]*|2.[1-5][0-9]*|[3-9].*|[12][0-9]*) ;;
*) skip_ 'The kernel is not Linux 2.6.* or newer' ;;
esac
check_strace
check_timeout
$TIMEOUT $MCEXEC $STRACE -df -enone / 2>&1 |
grep -F -x 'ptrace_setoptions = 0xe' > /dev/null ||
fail_ 'strace -f failed to recognize proper kernel PTRACE_O_TRACECLONE support'
$TIMEOUT $MCEXEC $STRACE -df -enone / 2>&1 |
grep -F -x 'ptrace_setoptions = 0x1f' > /dev/null ||
fail_ 'strace -f failed to recognize proper kernel PTRACE_O_TRACESYSGOOD support'
$TIMEOUT $MCEXEC $STRACE -d -enone / 2>&1 |
grep -F -x 'ptrace_setoptions = 0x11' > /dev/null ||
fail_ 'strace failed to recognize proper kernel PTRACE_O_TRACESYSGOOD support'
bash-4.2$ sh -x ptrace_setoptions
+ . ./init.sh
++ ME_=ptrace_setoptions
++ timeout_duration=60
++ uname -s
+ '[' Linux = Linux ']'
+ case "$(uname -r)" in
++ uname -r
+ check_strace
+ STRACE=../strace
+ ../strace -V
+ check_timeout
+ TIMEOUT='timeout -s 9 60'
+ timeout -s 9 60 true
+ timeout -s 9 60 /home/shirasawa/wallaby11-smp-x86/development/mic/mcexec ../strace -df -enone /
+ grep -F -x 'ptrace_setoptions = 0xe'
+ timeout -s 9 60 /home/shirasawa/wallaby11-smp-x86/development/mic/mcexec ../strace -df -enone /
+ grep -F -x 'ptrace_setoptions = 0x1f'
+ timeout -s 9 60 /home/shirasawa/wallaby11-smp-x86/development/mic/mcexec ../strace -d -enone /
+ grep -F -x 'ptrace_setoptions = 0x11'
bash-4.2$ echo $?
0
bash-4.2$ cat strace-f
#!/bin/sh
# Ensure that strace -f works.
. "${srcdir=.}/init.sh"
check_strace
check_timeout
time=/usr/bin/time
check_prog $time
$TIMEOUT $MCEXEC $STRACE -f $time /bin/ls > check.log 2>&1 ||
{ cat check.log; fail_ 'strace -f does not work'; }
bash-4.2$ sh -x strace-f
+ . ./init.sh
++ ME_=strace-f
++ timeout_duration=60
+ check_strace
+ STRACE=../strace
+ ../strace -V
+ check_timeout
+ TIMEOUT='timeout -s 9 60'
+ timeout -s 9 60 true
+ time=/usr/bin/time
+ check_prog /usr/bin/time
+ type /usr/bin/time
+ timeout -s 9 60 /home/shirasawa/wallaby11-smp-x86/development/mic/mcexec ../strace -f /usr/bin/time /bin/ls
bash-4.2$ echo ?$?
0
bash-4.2$ cat qual_syscall
#!/bin/sh
# Ensure that strace -e trace=set works.
. "${srcdir=.}/init.sh"
check_strace
check_timeout
check_prog ls
check_prog grep
$TIMEOUT $MCEXEC $STRACE -e execve ls > /dev/null 2> check.log &&
grep '^execve(' check.log > /dev/null ||
{ cat check.log; fail_ 'strace -e execve does not work'; }
grep -v '^execve(' check.log |
LC_ALL=C grep '^[[:alnum:]_]*(' > /dev/null &&
{ cat check.log; fail_ 'strace -e execve does not work properly'; }
$TIMEOUT $MCEXEC $STRACE -e trace=process ls > /dev/null 2> check.log &&
grep '^execve(' check.log > /dev/null ||
{ cat check.log; fail_ 'strace -e trace=process does not work'; }
grep '^open' check.log > /dev/null &&
{ cat check.log; fail_ 'strace -e trace=process does not work properly'; }
exit 0
bash-4.2$ sh -x qual_syscall
+ . ./init.sh
++ ME_=qual_syscall
++ timeout_duration=60
+ check_strace
+ STRACE=../strace
+ ../strace -V
+ check_timeout
+ TIMEOUT='timeout -s 9 60'
+ timeout -s 9 60 true
+ check_prog ls
+ type ls
+ check_prog grep
+ type grep
+ timeout -s 9 60 /home/shirasawa/wallaby11-smp-x86/development/mic/mcexec ../strace -e execve ls
+ grep '^execve(' check.log
+ grep -v '^execve(' check.log
+ LC_ALL=C
+ grep '^[[:alnum:]_]*('
+ timeout -s 9 60 /home/shirasawa/wallaby11-smp-x86/development/mic/mcexec ../strace -e trace=process ls
+ grep '^execve(' check.log
+ grep '^open' check.log
+ exit 0
bash-4.2$ echo $?
0
bash-4.2$ cat stat
#!/bin/sh
# Check how ftruncate, lseek and stat family syscalls are traced.
. "${srcdir=.}/init.sh"
check_strace
check_timeout
check_prog dd
check_prog find
check_prog grep
check_prog rm
umask 022
truncate_cmd='dd seek=46118400000 obs=1 count=0 if=/dev/null of=sample'
$truncate_cmd > check.log 2>&1 ||
{ cat check.log; framework_skip_ 'failed to create a large sparse file'; }
rm -f sample
$TIMEOUT $MCEXEC $STRACE -edesc $truncate_cmd 2>&1 > /dev/null 2> check.log &&
LC_ALL=C grep -E -x 'ftruncate(64)?\(1, 46118400000\) += 0' check.log > /dev/null ||
{ cat check.log; fail_ 'strace -edesc failed to trace ftruncate/ftruncate64 properly'; }
LC_ALL=C grep -E -x 'lseek\(1, 46118400000, SEEK_CUR\) += 46118400000|_llseek\(1, 46118400000, \[46118400000\], SEEK_CUR\) += 0' check.log > /dev/null ||
{ cat check.log; fail_ 'strace -edesc failed to trace lseek/_llseek properly'; }
$TIMEOUT $MCEXEC $STRACE -efile find -L sample > /dev/null 2> check.log &&
LC_ALL=C grep -E -x 'stat(64)?\("sample", \{st_mode=S_IFREG\|0644, st_size=46118400000, \.\.\.\}\) += 0|(new)?fstatat(64)?\(AT_FDCWD, "sample", \{st_mode=S_IFREG\|0644, st_size=46118400000, \.\.\.\}, 0\) += 0' check.log > /dev/null ||
{ cat check.log; fail_ 'strace -efile failed to trace stat/stat64 properly'; }
$TIMEOUT $MCEXEC $STRACE -efile find sample > /dev/null 2> check.log &&
LC_ALL=C grep -E -x 'lstat(64)?\("sample", \{st_mode=S_IFREG\|0644, st_size=46118400000, \.\.\.\}\) += 0|(new)?fstatat(64)?\(AT_FDCWD, "sample", \{st_mode=S_IFREG\|0644, st_size=46118400000, \.\.\.\}, AT_SYMLINK_NOFOLLOW\) += 0' check.log > /dev/null ||
{ cat check.log; fail_ 'strace -efile failed to trace fstatat/fstatat64 properly'; }
rm -f sample
exit 0
bash-4.2$ sh -x stat
+ . ./init.sh
++ ME_=stat
++ timeout_duration=60
+ check_strace
+ STRACE=../strace
+ ../strace -V
+ check_timeout
+ TIMEOUT='timeout -s 9 60'
+ timeout -s 9 60 true
+ check_prog dd
+ type dd
+ check_prog find
+ type find
+ check_prog grep
+ type grep
+ check_prog rm
+ type rm
+ umask 022
+ truncate_cmd='dd seek=46118400000 obs=1 count=0 if=/dev/null of=sample'
+ dd seek=46118400000 obs=1 count=0 if=/dev/null of=sample
+ rm -f sample
+ timeout -s 9 60 /home/shirasawa/wallaby11-smp-x86/development/mic/mcexec ../strace -edesc dd seek=46118400000 obs=1 count=0 if=/dev/null of=sample
+ LC_ALL=C
+ grep -E -x 'ftruncate(64)?\(1, 46118400000\) += 0' check.log
+ LC_ALL=C
+ grep -E -x 'lseek\(1, 46118400000, SEEK_CUR\) += 46118400000|_llseek\(1, 46118400000, \[46118400000\], SEEK_CUR\) += 0' check.log
+ timeout -s 9 60 /home/shirasawa/wallaby11-smp-x86/development/mic/mcexec ../strace -efile find -L sample
+ LC_ALL=C
+ grep -E -x 'stat(64)?\("sample", \{st_mode=S_IFREG\|0644, st_size=46118400000, \.\.\.\}\) += 0|(new)?fstatat(64)?\(AT_FDCWD, "sample", \{st_mode=S_IFREG\|0644, st_size=46118400000, \.\.\.\}, 0\) += 0' check.log
+ timeout -s 9 60 /home/shirasawa/wallaby11-smp-x86/development/mic/mcexec ../strace -efile find sample
+ LC_ALL=C
+ grep -E -x 'lstat(64)?\("sample", \{st_mode=S_IFREG\|0644, st_size=46118400000, \.\.\.\}\) += 0|(new)?fstatat(64)?\(AT_FDCWD, "sample", \{st_mode=S_IFREG\|0644, st_size=46118400000, \.\.\.\}, AT_SYMLINK_NOFOLLOW\) += 0' check.log
+ rm -f sample
+ exit 0
bash-4.2$ echo $?
0
bash-4.2$ シェルから脱出するには "exit" を使用してください。
bash-4.2$ exit
スクリプトは Mon Nov 20 13:36:26 2017
に終了しました