diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 8 | ||||
-rw-r--r--[-rwxr-xr-x] | tests/fanotify_mark.expected | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | tests/ioctl.expected | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | tests/net-fd.expected | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | tests/net.expected | 0 | ||||
-rw-r--r-- | tests/restart_syscall.expected | 2 | ||||
-rwxr-xr-x | tests/restart_syscall.test | 25 | ||||
-rw-r--r-- | tests/restart_syscall_unknown.expected | 2 | ||||
-rw-r--r--[-rwxr-xr-x] | tests/statfs.expected | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | tests/sun_path.expected | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | tests/uio.expected | 0 |
11 files changed, 36 insertions, 1 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index e5dae02a..7ace705b 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,5 +1,7 @@ # Automake input for strace tests. +OS = linux +ARCH = @arch@ AM_CFLAGS = $(WARN_CFLAGS) AM_CPPFLAGS = -I$(top_builddir)/$(OS)/$(ARCH) \ -I$(top_srcdir)/$(OS)/$(ARCH) \ @@ -91,11 +93,13 @@ TESTS = \ detach-sleeping.test \ detach-stopped.test \ detach-running.test \ + restart_syscall.test \ strace-k.test net-fd.log: net.log -TEST_LOG_COMPILER = $(srcdir)/run.sh +TEST_LOG_COMPILER = env +AM_TEST_LOG_FLAGS = STRACE_ARCH=$(ARCH) $(srcdir)/run.sh EXTRA_DIST = init.sh run.sh match.awk \ caps.awk \ @@ -112,6 +116,8 @@ EXTRA_DIST = init.sh run.sh match.awk \ net-yy-accept.awk \ net-yy-connect.awk \ pipe.expected \ + restart_syscall.expected \ + restart_syscall_unknown.expected \ select.awk \ sigaction.awk \ statfs.expected \ diff --git a/tests/fanotify_mark.expected b/tests/fanotify_mark.expected index d2bb336a..d2bb336a 100755..100644 --- a/tests/fanotify_mark.expected +++ b/tests/fanotify_mark.expected diff --git a/tests/ioctl.expected b/tests/ioctl.expected index b8e4a29a..b8e4a29a 100755..100644 --- a/tests/ioctl.expected +++ b/tests/ioctl.expected diff --git a/tests/net-fd.expected b/tests/net-fd.expected index 49b69924..49b69924 100755..100644 --- a/tests/net-fd.expected +++ b/tests/net-fd.expected diff --git a/tests/net.expected b/tests/net.expected index af929225..af929225 100755..100644 --- a/tests/net.expected +++ b/tests/net.expected diff --git a/tests/restart_syscall.expected b/tests/restart_syscall.expected new file mode 100644 index 00000000..af9267de --- /dev/null +++ b/tests/restart_syscall.expected @@ -0,0 +1,2 @@ +restart_syscall(<... resuming interrupted nanosleep ...>) = 0 ++++ exited with 0 +++ diff --git a/tests/restart_syscall.test b/tests/restart_syscall.test new file mode 100755 index 00000000..5ae3a1d5 --- /dev/null +++ b/tests/restart_syscall.test @@ -0,0 +1,25 @@ +#!/bin/sh + +# Check how "resuming interrupted nanosleep" works. + +. "${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 diff --git a/tests/restart_syscall_unknown.expected b/tests/restart_syscall_unknown.expected new file mode 100644 index 00000000..5f168953 --- /dev/null +++ b/tests/restart_syscall_unknown.expected @@ -0,0 +1,2 @@ +restart_syscall(<... resuming interrupted system call ...>) = 0 ++++ exited with 0 +++ diff --git a/tests/statfs.expected b/tests/statfs.expected index 93e2b515..93e2b515 100755..100644 --- a/tests/statfs.expected +++ b/tests/statfs.expected diff --git a/tests/sun_path.expected b/tests/sun_path.expected index 44076862..44076862 100755..100644 --- a/tests/sun_path.expected +++ b/tests/sun_path.expected diff --git a/tests/uio.expected b/tests/uio.expected index 999b88cc..999b88cc 100755..100644 --- a/tests/uio.expected +++ b/tests/uio.expected |