Dmitry V. Levin
f6a36f0c9e
The first argument of match_diff should be the file with expected output, the second argument - the file with actual output. * tests/aio.test: Swap match_diff arguments. * tests/restart_syscall.test: Likewise. * tests/seccomp.test: Likewise. * tests/umovestr2.test: Likewise.
31 lines
771 B
Bash
Executable File
31 lines
771 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Check how "resuming interrupted nanosleep" works.
|
|
|
|
. "${srcdir=.}/init.sh"
|
|
|
|
check_prog sleep
|
|
check_prog grep
|
|
run_strace -enanosleep sleep 1
|
|
LC_ALL=C grep ^nanosleep < "$LOG" > /dev/null ||
|
|
framework_skip_ 'sleep does not use nanosleep'
|
|
|
|
./set_ptracer_any sleep 2 &
|
|
sleep 1
|
|
run_strace -q -erestart_syscall,nanosleep -p $!
|
|
|
|
LC_ALL=C grep ^restart_syscall < "$LOG" > /dev/null ||
|
|
if LC_ALL=C grep -x 'nanosleep({2, 0}, NULL) \+= 0' < "$LOG" > /dev/null; then
|
|
skip_ 'no restart_syscall, uninterrupted nanosleep'
|
|
fi
|
|
|
|
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 "$srcdir/restart_syscall_unknown.expected" "$LOG"
|
|
;;
|
|
*) match_diff
|
|
;;
|
|
esac
|