tests: rename all tests so that their names end in .test suffix
authorDmitry V. Levin <ldv@altlinux.org>
Sun, 2 Feb 2014 15:20:11 +0000 (15:20 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sun, 2 Feb 2014 16:49:41 +0000 (16:49 +0000)
Due to automake limitations, some features work only for tests
that end in one of the suffixes listed in TEST_EXTENSIONS.

* tests/detach-running: Rename to detach-running.test.
* tests/detach-sleeping: Rename to detach-sleeping.test.
* tests/detach-stopped: Rename to detach-stopped.test.
* tests/net: Rename to net.test.
* tests/ptrace_setoptions: Rename to ptrace_setoptions.test.
* tests/qual_syscall: Rename to qual_syscall.test.
* tests/sigaction.sh: Rename to sigaction.test.
* tests/stat: Rename to stat.test.
* tests/strace-f: Rename to strace-f.test.
* tests/Makefile.am (TESTS): Update.
(LOG_COMPILER): Rename to TEST_LOG_COMPILER.

19 files changed:
tests/Makefile.am
tests/detach-running [deleted file]
tests/detach-running.test [new file with mode: 0755]
tests/detach-sleeping [deleted file]
tests/detach-sleeping.test [new file with mode: 0755]
tests/detach-stopped [deleted file]
tests/detach-stopped.test [new file with mode: 0755]
tests/net [deleted file]
tests/net.test [new file with mode: 0755]
tests/ptrace_setoptions [deleted file]
tests/ptrace_setoptions.test [new file with mode: 0755]
tests/qual_syscall [deleted file]
tests/qual_syscall.test [new file with mode: 0755]
tests/sigaction.sh [deleted file]
tests/sigaction.test [new file with mode: 0755]
tests/stat [deleted file]
tests/stat.test [new file with mode: 0755]
tests/strace-f [deleted file]
tests/strace-f.test [new file with mode: 0755]

index d8262f0791712681a2dd17f7c88b873b05c50b70..56c4a06715cf62b61e8ac98746080c1da618ae2e 100644 (file)
@@ -4,10 +4,18 @@ AM_CFLAGS = $(WARN_CFLAGS)
 
 check_PROGRAMS = net-accept-connect set_ptracer_any sigaction
 
-TESTS = ptrace_setoptions strace-f qual_syscall sigaction.sh stat net \
-       detach-sleeping detach-stopped detach-running
+TESTS = \
+       ptrace_setoptions.test \
+       strace-f.test \
+       qual_syscall.test \
+       sigaction.test \
+       stat.test \
+       net.test \
+       detach-sleeping.test \
+       detach-stopped.test \
+       detach-running.test
 
-LOG_COMPILER = $(srcdir)/run.sh
+TEST_LOG_COMPILER = $(srcdir)/run.sh
 
 EXTRA_DIST = init.sh run.sh sigaction.awk $(TESTS)
 
diff --git a/tests/detach-running b/tests/detach-running
deleted file mode 100755 (executable)
index 16f552b..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/sh
-
-# Ensure that strace can detach from running processes.
-
-. "${srcdir=.}/init.sh"
-
-check_prog sleep
-check_prog grep
-
-set -e
-
-./set_ptracer_any sh -c "echo > $LOG; while :; do :; done" > /dev/null &
-
-while ! [ -s $LOG ]; do
-       kill -0 $! 2> /dev/null ||
-               fail_ 'set_ptracer_any sh failed'
-       $SLEEP_A_BIT
-done
-
-tracee_pid=$!
-
-cleanup()
-{
-       set +e
-       kill $tracee_pid
-       wait $tracee_pid 2> /dev/null
-}
-
-rm -f $LOG
-$STRACE -p $tracee_pid 2> $LOG &
-
-while ! grep -F "Process $tracee_pid attached" $LOG > /dev/null; do
-       kill -0 $! 2> /dev/null ||
-               { cat $LOG; cleanup; fail_ 'strace -p does not work'; }
-       $SLEEP_A_BIT
-done
-
-kill -INT $!
-wait $!
-
-grep -F "Process $tracee_pid detached" $LOG > /dev/null ||
-       { cat $LOG; cleanup; fail_ 'strace -p failed to detach'; }
-
-if [ -f /proc/self/status ]; then
-       $SLEEP_A_BIT
-       test -d /proc/$tracee_pid ||
-               { cat $LOG; cleanup; fail_ 'tracee died after detach'; }
-       grep '^State:.*R (running)' < /proc/$tracee_pid/status > /dev/null || {
-               cat $LOG
-               grep '^State:' < /proc/$tracee_pid/status
-               cleanup
-               fail_ 'tracee is not running after detach'
-       }
-fi
-
-cleanup
-exit 0
diff --git a/tests/detach-running.test b/tests/detach-running.test
new file mode 100755 (executable)
index 0000000..16f552b
--- /dev/null
@@ -0,0 +1,57 @@
+#!/bin/sh
+
+# Ensure that strace can detach from running processes.
+
+. "${srcdir=.}/init.sh"
+
+check_prog sleep
+check_prog grep
+
+set -e
+
+./set_ptracer_any sh -c "echo > $LOG; while :; do :; done" > /dev/null &
+
+while ! [ -s $LOG ]; do
+       kill -0 $! 2> /dev/null ||
+               fail_ 'set_ptracer_any sh failed'
+       $SLEEP_A_BIT
+done
+
+tracee_pid=$!
+
+cleanup()
+{
+       set +e
+       kill $tracee_pid
+       wait $tracee_pid 2> /dev/null
+}
+
+rm -f $LOG
+$STRACE -p $tracee_pid 2> $LOG &
+
+while ! grep -F "Process $tracee_pid attached" $LOG > /dev/null; do
+       kill -0 $! 2> /dev/null ||
+               { cat $LOG; cleanup; fail_ 'strace -p does not work'; }
+       $SLEEP_A_BIT
+done
+
+kill -INT $!
+wait $!
+
+grep -F "Process $tracee_pid detached" $LOG > /dev/null ||
+       { cat $LOG; cleanup; fail_ 'strace -p failed to detach'; }
+
+if [ -f /proc/self/status ]; then
+       $SLEEP_A_BIT
+       test -d /proc/$tracee_pid ||
+               { cat $LOG; cleanup; fail_ 'tracee died after detach'; }
+       grep '^State:.*R (running)' < /proc/$tracee_pid/status > /dev/null || {
+               cat $LOG
+               grep '^State:' < /proc/$tracee_pid/status
+               cleanup
+               fail_ 'tracee is not running after detach'
+       }
+fi
+
+cleanup
+exit 0
diff --git a/tests/detach-sleeping b/tests/detach-sleeping
deleted file mode 100755 (executable)
index 92138b5..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/sh
-
-# Ensure that strace can detach from sleeping processes.
-
-. "${srcdir=.}/init.sh"
-
-check_prog sleep
-check_prog grep
-
-set -e
-
-rm -f $LOG
-./set_ptracer_any sleep $((2*$TIMEOUT_DURATION)) > $LOG &
-
-while ! [ -s $LOG ]; do
-       kill -0 $! 2> /dev/null ||
-               fail_ 'set_ptracer_any sleep failed'
-       $SLEEP_A_BIT
-done
-
-tracee_pid=$!
-
-cleanup()
-{
-       set +e
-       kill $tracee_pid
-       wait $tracee_pid 2> /dev/null
-}
-
-rm -f $LOG
-$STRACE -p $tracee_pid 2> $LOG &
-
-while ! grep -F "Process $tracee_pid attached" $LOG > /dev/null; do
-       kill -0 $! 2> /dev/null ||
-               { cat $LOG; cleanup; fail_ 'strace -p does not work'; }
-       $SLEEP_A_BIT
-done
-
-kill -INT $!
-wait $!
-
-grep -F "Process $tracee_pid detached" $LOG > /dev/null ||
-       { cat $LOG; cleanup; fail_ 'strace -p failed to detach'; }
-
-if [ -f /proc/self/status ]; then
-       $SLEEP_A_BIT
-       test -d /proc/$tracee_pid ||
-               { cat $LOG; cleanup; fail_ 'tracee died after detach'; }
-       grep '^State:.*S (sleeping)' < /proc/$tracee_pid/status > /dev/null || {
-               cat $LOG
-               grep '^State:' < /proc/$tracee_pid/status
-               cleanup
-               fail_ 'tracee is not sleeping after detach'
-       }
-fi
-
-cleanup
-exit 0
diff --git a/tests/detach-sleeping.test b/tests/detach-sleeping.test
new file mode 100755 (executable)
index 0000000..92138b5
--- /dev/null
@@ -0,0 +1,58 @@
+#!/bin/sh
+
+# Ensure that strace can detach from sleeping processes.
+
+. "${srcdir=.}/init.sh"
+
+check_prog sleep
+check_prog grep
+
+set -e
+
+rm -f $LOG
+./set_ptracer_any sleep $((2*$TIMEOUT_DURATION)) > $LOG &
+
+while ! [ -s $LOG ]; do
+       kill -0 $! 2> /dev/null ||
+               fail_ 'set_ptracer_any sleep failed'
+       $SLEEP_A_BIT
+done
+
+tracee_pid=$!
+
+cleanup()
+{
+       set +e
+       kill $tracee_pid
+       wait $tracee_pid 2> /dev/null
+}
+
+rm -f $LOG
+$STRACE -p $tracee_pid 2> $LOG &
+
+while ! grep -F "Process $tracee_pid attached" $LOG > /dev/null; do
+       kill -0 $! 2> /dev/null ||
+               { cat $LOG; cleanup; fail_ 'strace -p does not work'; }
+       $SLEEP_A_BIT
+done
+
+kill -INT $!
+wait $!
+
+grep -F "Process $tracee_pid detached" $LOG > /dev/null ||
+       { cat $LOG; cleanup; fail_ 'strace -p failed to detach'; }
+
+if [ -f /proc/self/status ]; then
+       $SLEEP_A_BIT
+       test -d /proc/$tracee_pid ||
+               { cat $LOG; cleanup; fail_ 'tracee died after detach'; }
+       grep '^State:.*S (sleeping)' < /proc/$tracee_pid/status > /dev/null || {
+               cat $LOG
+               grep '^State:' < /proc/$tracee_pid/status
+               cleanup
+               fail_ 'tracee is not sleeping after detach'
+       }
+fi
+
+cleanup
+exit 0
diff --git a/tests/detach-stopped b/tests/detach-stopped
deleted file mode 100755 (executable)
index 81fd303..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/bin/sh
-
-# Ensure that strace can detach from stopped processes.
-
-. "${srcdir=.}/init.sh"
-
-check_prog sleep
-check_prog grep
-
-set -e
-
-rm -f $LOG
-./set_ptracer_any sleep $((2*$TIMEOUT_DURATION)) > $LOG &
-
-while ! [ -s $LOG ]; do
-       kill -0 $! 2> /dev/null ||
-               fail_ 'set_ptracer_any sleep failed'
-       $SLEEP_A_BIT
-done
-
-tracee_pid=$!
-kill -STOP $tracee_pid
-
-cleanup()
-{
-       set +e
-       kill $tracee_pid
-       kill -CONT $tracee_pid
-       wait $tracee_pid 2> /dev/null
-}
-
-rm -f $LOG
-$STRACE -p $tracee_pid 2> $LOG &
-
-while ! grep -F "Process $tracee_pid attached" $LOG > /dev/null; do
-       kill -0 $! 2> /dev/null ||
-               { cat $LOG; cleanup; fail_ 'strace -p does not work'; }
-       $SLEEP_A_BIT
-done
-
-while ! grep -F -e '--- stopped by ' $LOG > /dev/null; do
-       kill -0 $! 2> /dev/null ||
-               { cat $LOG; cleanup; fail_ 'strace -p does not work'; }
-       $SLEEP_A_BIT
-done
-
-kill -INT $!
-wait $!
-
-grep -F "Process $tracee_pid detached" $LOG > /dev/null ||
-       { cat $LOG; cleanup; fail_ 'strace -p failed to detach'; }
-
-if [ -f /proc/self/status ]; then
-       $SLEEP_A_BIT
-       test -d /proc/$tracee_pid ||
-               { cat $LOG; cleanup; fail_ 'tracee died after detach'; }
-       grep '^State:.*T (stopped)' < /proc/$tracee_pid/status > /dev/null || {
-               cat $LOG
-               grep '^State:' < /proc/$tracee_pid/status
-               cleanup
-               fail_ 'tracee is not group-stopped after detach'
-       }
-fi
-
-cleanup
-exit 0
diff --git a/tests/detach-stopped.test b/tests/detach-stopped.test
new file mode 100755 (executable)
index 0000000..81fd303
--- /dev/null
@@ -0,0 +1,66 @@
+#!/bin/sh
+
+# Ensure that strace can detach from stopped processes.
+
+. "${srcdir=.}/init.sh"
+
+check_prog sleep
+check_prog grep
+
+set -e
+
+rm -f $LOG
+./set_ptracer_any sleep $((2*$TIMEOUT_DURATION)) > $LOG &
+
+while ! [ -s $LOG ]; do
+       kill -0 $! 2> /dev/null ||
+               fail_ 'set_ptracer_any sleep failed'
+       $SLEEP_A_BIT
+done
+
+tracee_pid=$!
+kill -STOP $tracee_pid
+
+cleanup()
+{
+       set +e
+       kill $tracee_pid
+       kill -CONT $tracee_pid
+       wait $tracee_pid 2> /dev/null
+}
+
+rm -f $LOG
+$STRACE -p $tracee_pid 2> $LOG &
+
+while ! grep -F "Process $tracee_pid attached" $LOG > /dev/null; do
+       kill -0 $! 2> /dev/null ||
+               { cat $LOG; cleanup; fail_ 'strace -p does not work'; }
+       $SLEEP_A_BIT
+done
+
+while ! grep -F -e '--- stopped by ' $LOG > /dev/null; do
+       kill -0 $! 2> /dev/null ||
+               { cat $LOG; cleanup; fail_ 'strace -p does not work'; }
+       $SLEEP_A_BIT
+done
+
+kill -INT $!
+wait $!
+
+grep -F "Process $tracee_pid detached" $LOG > /dev/null ||
+       { cat $LOG; cleanup; fail_ 'strace -p failed to detach'; }
+
+if [ -f /proc/self/status ]; then
+       $SLEEP_A_BIT
+       test -d /proc/$tracee_pid ||
+               { cat $LOG; cleanup; fail_ 'tracee died after detach'; }
+       grep '^State:.*T (stopped)' < /proc/$tracee_pid/status > /dev/null || {
+               cat $LOG
+               grep '^State:' < /proc/$tracee_pid/status
+               cleanup
+               fail_ 'tracee is not group-stopped after detach'
+       }
+fi
+
+cleanup
+exit 0
diff --git a/tests/net b/tests/net
deleted file mode 100755 (executable)
index de1dae1..0000000
--- a/tests/net
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/sh
-
-# Check how network syscalls are traced.
-
-. "${srcdir=.}/init.sh"
-
-check_prog grep
-check_prog rm
-
-rm -f $LOG.*
-
-./net-accept-connect ||
-       fail_ 'net-accept-connect failed'
-
-args="-tt -ff -o $LOG -enetwork ./net-accept-connect"
-$STRACE $args ||
-       fail_ "strace $args failed"
-
-"$srcdir"/../strace-log-merge $LOG > $LOG || {
-       cat $LOG
-       fail_ 'strace-log-merge failed'
-}
-
-rm -f $LOG.*
-
-grep_log()
-{
-       local syscall="$1"; shift
-       local prefix='[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +'
-
-       LC_ALL=C grep -E -x "$prefix$syscall$@" $LOG > /dev/null || {
-               cat $LOG
-               fail_ "strace -enetwork failed to trace \"$syscall\" properly"
-       }
-}
-
-grep_log socket '\(PF_(LOCAL|UNIX|FILE), SOCK_STREAM, 0\) += 0'
-grep_log socket '\(PF_(LOCAL|UNIX|FILE), SOCK_STREAM, 0\) += 1'
-grep_log bind '\(0, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="local-stream"\}, 15\) += 0'
-grep_log listen '\(0, 5\) += 0'
-grep_log getsockname '\(0, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="local-stream"\}, \[15\]\) += 0'
-grep_log accept '\(0, \{sa_family=AF_(LOCAL|UNIX|FILE), NULL\}, \[2\]\) += 1'
-grep_log connect '\(1, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="local-stream"\}, 15\) += 0'
-
-exit 0
diff --git a/tests/net.test b/tests/net.test
new file mode 100755 (executable)
index 0000000..de1dae1
--- /dev/null
@@ -0,0 +1,45 @@
+#!/bin/sh
+
+# Check how network syscalls are traced.
+
+. "${srcdir=.}/init.sh"
+
+check_prog grep
+check_prog rm
+
+rm -f $LOG.*
+
+./net-accept-connect ||
+       fail_ 'net-accept-connect failed'
+
+args="-tt -ff -o $LOG -enetwork ./net-accept-connect"
+$STRACE $args ||
+       fail_ "strace $args failed"
+
+"$srcdir"/../strace-log-merge $LOG > $LOG || {
+       cat $LOG
+       fail_ 'strace-log-merge failed'
+}
+
+rm -f $LOG.*
+
+grep_log()
+{
+       local syscall="$1"; shift
+       local prefix='[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +'
+
+       LC_ALL=C grep -E -x "$prefix$syscall$@" $LOG > /dev/null || {
+               cat $LOG
+               fail_ "strace -enetwork failed to trace \"$syscall\" properly"
+       }
+}
+
+grep_log socket '\(PF_(LOCAL|UNIX|FILE), SOCK_STREAM, 0\) += 0'
+grep_log socket '\(PF_(LOCAL|UNIX|FILE), SOCK_STREAM, 0\) += 1'
+grep_log bind '\(0, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="local-stream"\}, 15\) += 0'
+grep_log listen '\(0, 5\) += 0'
+grep_log getsockname '\(0, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="local-stream"\}, \[15\]\) += 0'
+grep_log accept '\(0, \{sa_family=AF_(LOCAL|UNIX|FILE), NULL\}, \[2\]\) += 1'
+grep_log connect '\(1, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="local-stream"\}, 15\) += 0'
+
+exit 0
diff --git a/tests/ptrace_setoptions b/tests/ptrace_setoptions
deleted file mode 100755 (executable)
index e574e24..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/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
-
-$STRACE -df -enone / > /dev/null 2> $LOG
-grep -F -x 'ptrace_setoptions = 0xe' $LOG > /dev/null || {
-       cat $LOG
-       fail_ 'strace -f failed to recognize proper kernel PTRACE_O_TRACECLONE support'
-}
-
-grep -F -x 'ptrace_setoptions = 0x1f' $LOG > /dev/null || {
-       cat $LOG
-       fail_ 'strace -f failed to recognize proper kernel PTRACE_O_TRACESYSGOOD support'
-}
-
-$STRACE -d -enone / > /dev/null 2> $LOG
-grep -F -x 'ptrace_setoptions = 0x11' $LOG > /dev/null || {
-       cat $LOG
-       fail_ 'strace failed to recognize proper kernel PTRACE_O_TRACESYSGOOD support'
-}
diff --git a/tests/ptrace_setoptions.test b/tests/ptrace_setoptions.test
new file mode 100755 (executable)
index 0000000..e574e24
--- /dev/null
@@ -0,0 +1,30 @@
+#!/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
+
+$STRACE -df -enone / > /dev/null 2> $LOG
+grep -F -x 'ptrace_setoptions = 0xe' $LOG > /dev/null || {
+       cat $LOG
+       fail_ 'strace -f failed to recognize proper kernel PTRACE_O_TRACECLONE support'
+}
+
+grep -F -x 'ptrace_setoptions = 0x1f' $LOG > /dev/null || {
+       cat $LOG
+       fail_ 'strace -f failed to recognize proper kernel PTRACE_O_TRACESYSGOOD support'
+}
+
+$STRACE -d -enone / > /dev/null 2> $LOG
+grep -F -x 'ptrace_setoptions = 0x11' $LOG > /dev/null || {
+       cat $LOG
+       fail_ 'strace failed to recognize proper kernel PTRACE_O_TRACESYSGOOD support'
+}
diff --git a/tests/qual_syscall b/tests/qual_syscall
deleted file mode 100755 (executable)
index 652fcdb..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# Ensure that strace -e trace=set works.
-
-. "${srcdir=.}/init.sh"
-
-check_prog ls
-check_prog grep
-
-$STRACE -e execve ls > /dev/null 2> $LOG &&
-grep '^execve(' $LOG > /dev/null ||
-       { cat $LOG; fail_ 'strace -e execve does not work'; }
-
-grep -v '^execve(' $LOG |
-LC_ALL=C grep '^[[:alnum:]_]*(' > /dev/null &&
-       { cat $LOG; fail_ 'strace -e execve does not work properly'; }
-
-$STRACE -e trace=process ls > /dev/null 2> $LOG &&
-grep '^execve(' $LOG > /dev/null ||
-       { cat $LOG; fail_ 'strace -e trace=process does not work'; }
-
-grep '^open' $LOG > /dev/null &&
-       { cat $LOG; fail_ 'strace -e trace=process does not work properly'; }
-
-exit 0
diff --git a/tests/qual_syscall.test b/tests/qual_syscall.test
new file mode 100755 (executable)
index 0000000..652fcdb
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# Ensure that strace -e trace=set works.
+
+. "${srcdir=.}/init.sh"
+
+check_prog ls
+check_prog grep
+
+$STRACE -e execve ls > /dev/null 2> $LOG &&
+grep '^execve(' $LOG > /dev/null ||
+       { cat $LOG; fail_ 'strace -e execve does not work'; }
+
+grep -v '^execve(' $LOG |
+LC_ALL=C grep '^[[:alnum:]_]*(' > /dev/null &&
+       { cat $LOG; fail_ 'strace -e execve does not work properly'; }
+
+$STRACE -e trace=process ls > /dev/null 2> $LOG &&
+grep '^execve(' $LOG > /dev/null ||
+       { cat $LOG; fail_ 'strace -e trace=process does not work'; }
+
+grep '^open' $LOG > /dev/null &&
+       { cat $LOG; fail_ 'strace -e trace=process does not work properly'; }
+
+exit 0
diff --git a/tests/sigaction.sh b/tests/sigaction.sh
deleted file mode 100755 (executable)
index 33732e0..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-# Check rt_sigaction decoding.
-
-. "${srcdir=.}/init.sh"
-
-check_prog awk
-
-./sigaction ||
-       fail_ 'sigaction failed'
-
-args="-o $LOG -ert_sigaction ./sigaction"
-$STRACE $args ||
-       fail_ "strace $args failed"
-
-awk -f "$srcdir"/sigaction.awk $LOG ||
-       { cat $LOG; fail_ 'unexpected output'; }
-
-exit 0
diff --git a/tests/sigaction.test b/tests/sigaction.test
new file mode 100755 (executable)
index 0000000..33732e0
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+# Check rt_sigaction decoding.
+
+. "${srcdir=.}/init.sh"
+
+check_prog awk
+
+./sigaction ||
+       fail_ 'sigaction failed'
+
+args="-o $LOG -ert_sigaction ./sigaction"
+$STRACE $args ||
+       fail_ "strace $args failed"
+
+awk -f "$srcdir"/sigaction.awk $LOG ||
+       { cat $LOG; fail_ 'unexpected output'; }
+
+exit 0
diff --git a/tests/stat b/tests/stat
deleted file mode 100755 (executable)
index 4176df0..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-
-# Check how ftruncate, lseek and stat family syscalls are traced.
-
-. "${srcdir=.}/init.sh"
-
-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 > $LOG 2>&1 ||
-       { cat $LOG; framework_skip_ 'failed to create a large sparse file'; }
-rm -f sample
-
-$STRACE -edesc $truncate_cmd 2>&1 > /dev/null 2> $LOG &&
-LC_ALL=C grep -E -x 'ftruncate(64)?\(1, 46118400000\) += 0' $LOG > /dev/null ||
-       { cat $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' $LOG > /dev/null ||
-       { cat $LOG; fail_ 'strace -edesc failed to trace lseek/_llseek properly'; }
-
-$STRACE -efile find -L sample > /dev/null 2> $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' $LOG > /dev/null ||
-       { cat $LOG; fail_ 'strace -efile failed to trace stat/stat64 properly'; }
-
-$STRACE -efile find sample > /dev/null 2> $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' $LOG > /dev/null ||
-       { cat $LOG; fail_ 'strace -efile failed to trace fstatat/fstatat64 properly'; }
-
-rm -f sample
-
-exit 0
diff --git a/tests/stat.test b/tests/stat.test
new file mode 100755 (executable)
index 0000000..4176df0
--- /dev/null
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+# Check how ftruncate, lseek and stat family syscalls are traced.
+
+. "${srcdir=.}/init.sh"
+
+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 > $LOG 2>&1 ||
+       { cat $LOG; framework_skip_ 'failed to create a large sparse file'; }
+rm -f sample
+
+$STRACE -edesc $truncate_cmd 2>&1 > /dev/null 2> $LOG &&
+LC_ALL=C grep -E -x 'ftruncate(64)?\(1, 46118400000\) += 0' $LOG > /dev/null ||
+       { cat $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' $LOG > /dev/null ||
+       { cat $LOG; fail_ 'strace -edesc failed to trace lseek/_llseek properly'; }
+
+$STRACE -efile find -L sample > /dev/null 2> $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' $LOG > /dev/null ||
+       { cat $LOG; fail_ 'strace -efile failed to trace stat/stat64 properly'; }
+
+$STRACE -efile find sample > /dev/null 2> $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' $LOG > /dev/null ||
+       { cat $LOG; fail_ 'strace -efile failed to trace fstatat/fstatat64 properly'; }
+
+rm -f sample
+
+exit 0
diff --git a/tests/strace-f b/tests/strace-f
deleted file mode 100755 (executable)
index 0c4622c..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-# Ensure that strace -f works.
-
-. "${srcdir=.}/init.sh"
-
-time=/usr/bin/time
-check_prog $time
-
-$STRACE -f $time /bin/ls > $LOG 2>&1 ||
-       { cat $LOG; fail_ 'strace -f does not work'; }
diff --git a/tests/strace-f.test b/tests/strace-f.test
new file mode 100755 (executable)
index 0000000..0c4622c
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+# Ensure that strace -f works.
+
+. "${srcdir=.}/init.sh"
+
+time=/usr/bin/time
+check_prog $time
+
+$STRACE -f $time /bin/ls > $LOG 2>&1 ||
+       { cat $LOG; fail_ 'strace -f does not work'; }