]> granicus.if.org Git - strace/blobdiff - tests/restart_syscall.test
strace: terminate itself if interrupted by a signal
[strace] / tests / restart_syscall.test
index 5ae3a1d587d11d80ed36a553cc13da3dce0ae5ac..f7dfa04fd63ad4720ac44b99633dd65009b784cb 100755 (executable)
@@ -4,22 +4,7 @@
 
 . "${srcdir=.}/init.sh"
 
-check_prog sleep
-check_prog grep
-run_strace -enanosleep sleep 1
-grep nanosleep < "$LOG" > /dev/null ||
-       framework_skip_ 'sleep does not use nanosleep'
-
-./set_ptracer_any sleep 2 &
-sleep 1
-run_strace -q -erestart_syscall -p $!
-
-case "$STRACE_ARCH" in
-       alpha|mips|or1k|s390|s390x)
-               # These architectures use the same register
-               # both for syscall number and syscall return code.
-               match_diff "$LOG" "$srcdir/restart_syscall_unknown.expected"
-               ;;
-       *) match_diff
-               ;;
-esac
+run_prog > /dev/null
+syscalls=nanosleep,restart_syscall
+run_strace -a20 -e trace=$syscalls $args > "$EXP"
+match_grep "$LOG" "$EXP"