tests: run every test except ksysent.test in its own subdirectory
Many test executables create temporary files in the current work directory for the duration of their execution. This level of test isolation allows more test executables to be invoked several times simultaneously. * tests/.gitignore: Add *.dir, remove *.log.*, *.tmp, *.tmp-*, and *.tmp.* patterns. * tests/Makefile.am (clean-local, clean-local-check): New rules. (.PHONY): Add clean-local-check. (CLEANFILES): Remove all but ksysent.h. * tests/init.sh: Strip test-specific prefix from LOG, OUT, and EXP variables. When invoked from a test, create a new test-specific directory, chdir into it, and add more ../ prefix to STRACE variable. (run_prog): Replace "./" with "../". * tests/attach-f-p.test: Replace "./" with "../". * tests/attach-p-cmd.test: Likewise. * tests/bexecve.test: Likewise. * tests/btrfs-v.test: Likewise. * tests/btrfs-vw.test: Likewise. * tests/btrfs-w.test: Likewise. * tests/count.test: Likewise. * tests/detach-running.test: Likewise. * tests/detach-sleeping.test: Likewise. * tests/detach-stopped.test: Likewise. * tests/mmap.test: Likewise. * tests/net-y-unix.test: Likewise. * tests/net-yy-inet.test: Likewise. * tests/net-yy-netlink.test: Likewise. * tests/net-yy-unix.test: Likewise. * tests/net.test: Likewise. * tests/opipe.test: Likewise. * tests/poll.test: Likewise. * tests/prctl-seccomp-strict.test: Likewise. * tests/qual_fault-exit_group.test: Likewise. * tests/qual_fault.test: Likewise. * tests/qual_inject-error-signal.test: Likewise. * tests/qual_inject-retval.test: Likewise. * tests/qual_inject-signal.test: Likewise. * tests/qual_signal.test: Likewise. * tests/qual_syscall.test: Likewise. * tests/readv.test: Likewise. * tests/redirect-fds.test: Likewise. * tests/sched.test: Likewise. * tests/scm_rights-fd.test: Likewise. * tests/seccomp-strict.test: Likewise. * tests/strace-C.test: Likewise. * tests/strace-E.expected: Likewise. * tests/strace-E.test: Likewise. * tests/strace-S.test: Likewise. * tests/strace-T.test: Likewise. * tests/strace-V.test: Likewise. * tests/strace-ff.test: Likewise. * tests/strace-k.test: Likewise. * tests/strace-r.expected: Likewise. * tests/strace-r.test: Likewise. * tests/strace-t.test: Likewise. * tests/strace-tt.test: Likewise. * tests/strace-ttt.test: Likewise. * tests/sun_path.test: Likewise. * tests/uname.test: Likewise. * tests/unix-pair-send-recv.test: Likewise. * tests/unix-pair-sendto-recvfrom.test: Likewise.
This commit is contained in:
parent
3e15e018ef
commit
160360306d
5
tests/.gitignore
vendored
5
tests/.gitignore
vendored
@ -1,9 +1,6 @@
|
||||
*.dir
|
||||
*.log
|
||||
*.log.*
|
||||
*.o
|
||||
*.tmp
|
||||
*.tmp-*
|
||||
*.tmp.*
|
||||
*.trs
|
||||
_newselect
|
||||
accept
|
||||
|
@ -968,6 +968,11 @@ ksysent.$(OBJEXT): ksysent.h
|
||||
objects = $(filter %.$(OBJEXT),$(SOURCES:.c=.$(OBJEXT)))
|
||||
$(objects): scno.h
|
||||
|
||||
CLEANFILES = ksysent.h $(TESTS:=.tmp) $(TESTS:=.tmp.out) $(TESTS:=.tmp.exp)
|
||||
clean-local: clean-local-check
|
||||
.PHONY: clean-local-check
|
||||
clean-local-check:
|
||||
-rm -rf -- $(TESTS:.test=.dir)
|
||||
|
||||
CLEANFILES = ksysent.h
|
||||
|
||||
include ../scno.am
|
||||
|
@ -34,10 +34,10 @@
|
||||
framework_skip_ '/proc/self/task/ is not available'
|
||||
run_prog_skip_if_failed \
|
||||
kill -0 $$
|
||||
run_prog ./attach-f-p-cmd > /dev/null
|
||||
run_prog ../attach-f-p-cmd > /dev/null
|
||||
|
||||
rm -f "$OUT"
|
||||
./set_ptracer_any sh -c "exec ./attach-f-p >> $OUT" > /dev/null &
|
||||
../set_ptracer_any sh -c "exec ../attach-f-p >> $OUT" > /dev/null &
|
||||
tracee_pid=$!
|
||||
|
||||
while ! [ -s "$OUT" ]; do
|
||||
@ -45,6 +45,6 @@ while ! [ -s "$OUT" ]; do
|
||||
fail_ 'set_ptracer_any sh failed'
|
||||
done
|
||||
|
||||
run_strace -a32 -f -echdir -p $tracee_pid ./attach-f-p-cmd > "$OUT"
|
||||
run_strace -a32 -f -echdir -p $tracee_pid ../attach-f-p-cmd > "$OUT"
|
||||
match_diff "$LOG" "$OUT"
|
||||
rm -f "$OUT"
|
||||
|
@ -34,14 +34,14 @@ run_prog_skip_if_failed \
|
||||
|
||||
rm -rf attach-p-cmd.test-lock
|
||||
rm -f "$OUT"
|
||||
./set_ptracer_any ./attach-p-cmd-p >> "$OUT" &
|
||||
../set_ptracer_any ../attach-p-cmd-p >> "$OUT" &
|
||||
tracee_pid=$!
|
||||
|
||||
while ! [ -s "$OUT" ]; do
|
||||
kill -0 $tracee_pid 2> /dev/null ||
|
||||
fail_ 'set_ptracer_any ./attach-p-cmd-p failed'
|
||||
fail_ 'set_ptracer_any ../attach-p-cmd-p failed'
|
||||
done
|
||||
|
||||
run_strace -a30 -echdir -p $tracee_pid ./attach-p-cmd-cmd > "$OUT"
|
||||
run_strace -a30 -echdir -p $tracee_pid ../attach-p-cmd-cmd > "$OUT"
|
||||
match_diff "$LOG" "$OUT"
|
||||
rm -f "$OUT"
|
||||
|
@ -35,14 +35,14 @@ run_strace_redir()
|
||||
$STRACE "$@" 2> "$LOG"
|
||||
}
|
||||
|
||||
run_strace_redir -enone ./set_ptracer_any true ||
|
||||
run_strace_redir -enone ../set_ptracer_any true ||
|
||||
dump_log_and_fail_with "$STRACE $args: unexpected exit status"
|
||||
|
||||
run_strace_redir -enone ./set_ptracer_any false
|
||||
run_strace_redir -enone ../set_ptracer_any false
|
||||
[ $? -eq 1 ] ||
|
||||
dump_log_and_fail_with "$STRACE $args: unexpected exit status"
|
||||
|
||||
run_strace_redir -bexecve -enone ./set_ptracer_any false ||
|
||||
run_strace_redir -bexecve -enone ../set_ptracer_any false ||
|
||||
dump_log_and_fail_with "$STRACE $args: unexpected exit status"
|
||||
|
||||
pattern_detached='[^:]*strace: Process [1-9][0-9]* detached'
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
. "${srcdir=.}/init.sh"
|
||||
|
||||
run_prog ./btrfs -v > /dev/null
|
||||
run_prog ../btrfs -v > /dev/null
|
||||
run_strace -a16 -veioctl $args > "$EXP"
|
||||
check_prog grep
|
||||
grep -v '^ioctl([012],' < "$LOG" > "$OUT"
|
||||
|
@ -18,7 +18,7 @@ elif [ ! -d "${BTRFS_MOUNTPOINT}" ]; then
|
||||
skip_ "\$BTRFS_MOUNTPOINT does not point to a directory"
|
||||
fi
|
||||
|
||||
run_prog ./btrfs -v -w "${BTRFS_MOUNTPOINT}" > /dev/null
|
||||
run_prog ../btrfs -v -w "${BTRFS_MOUNTPOINT}" > /dev/null
|
||||
run_strace -a16 -veioctl $args > "$EXP"
|
||||
check_prog grep
|
||||
grep -v '^ioctl([012],' < "$LOG" > "$OUT"
|
||||
|
@ -18,7 +18,7 @@ elif [ ! -d "${BTRFS_MOUNTPOINT}" ]; then
|
||||
skip_ "\$BTRFS_MOUNTPOINT does not point to a directory"
|
||||
fi
|
||||
|
||||
run_prog ./btrfs -w "${BTRFS_MOUNTPOINT}" > /dev/null
|
||||
run_prog ../btrfs -w "${BTRFS_MOUNTPOINT}" > /dev/null
|
||||
run_strace -a16 -eioctl $args > "$EXP"
|
||||
check_prog grep
|
||||
grep -v '^ioctl([012],' < "$LOG" > "$OUT"
|
||||
|
@ -29,14 +29,14 @@
|
||||
|
||||
. "${srcdir=.}/init.sh"
|
||||
|
||||
run_prog ./sleep 0
|
||||
run_prog ../sleep 0
|
||||
check_prog grep
|
||||
|
||||
grep_log()
|
||||
{
|
||||
local pattern="$1"; shift
|
||||
|
||||
run_strace "$@" ./sleep 1
|
||||
run_strace "$@" ../sleep 1
|
||||
|
||||
grep nanosleep "$LOG" > /dev/null ||
|
||||
framework_skip_ 'sleep does not use nanosleep'
|
||||
|
@ -36,7 +36,7 @@ check_prog sleep
|
||||
|
||||
set -e
|
||||
|
||||
./set_ptracer_any sh -c "echo > $LOG; while :; do :; done" > /dev/null &
|
||||
../set_ptracer_any sh -c "echo > $LOG; while :; do :; done" > /dev/null &
|
||||
|
||||
while ! [ -s "$LOG" ]; do
|
||||
kill -0 $! 2> /dev/null ||
|
||||
|
@ -37,7 +37,7 @@ check_prog sleep
|
||||
set -e
|
||||
|
||||
rm -f "$LOG"
|
||||
./set_ptracer_any sleep $((2*$TIMEOUT_DURATION)) > "$LOG" &
|
||||
../set_ptracer_any sleep $((2*$TIMEOUT_DURATION)) > "$LOG" &
|
||||
|
||||
while ! [ -s "$LOG" ]; do
|
||||
kill -0 $! 2> /dev/null ||
|
||||
|
@ -42,7 +42,7 @@ fi
|
||||
set -e
|
||||
|
||||
rm -f "$LOG"
|
||||
./set_ptracer_any sleep $((2*$TIMEOUT_DURATION)) > "$LOG" &
|
||||
../set_ptracer_any sleep $((2*$TIMEOUT_DURATION)) > "$LOG" &
|
||||
|
||||
while ! [ -s "$LOG" ]; do
|
||||
kill -0 $! 2> /dev/null ||
|
||||
|
@ -26,10 +26,9 @@
|
||||
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
ME_="${0##*/}"
|
||||
LOG="$ME_.tmp"
|
||||
OUT="$LOG.out"
|
||||
EXP="$LOG.exp"
|
||||
NAME="${ME_%.test}"
|
||||
LOG="log"
|
||||
OUT="out"
|
||||
EXP="exp"
|
||||
|
||||
warn_() { printf >&2 '%s\n' "$*"; }
|
||||
fail_() { warn_ "$ME_: failed test: $*"; exit 1; }
|
||||
@ -52,7 +51,7 @@ dump_log_and_fail_with()
|
||||
run_prog()
|
||||
{
|
||||
if [ $# -eq 0 ]; then
|
||||
set -- "./$NAME"
|
||||
set -- "../$NAME"
|
||||
fi
|
||||
args="$*"
|
||||
"$@" || {
|
||||
@ -267,10 +266,21 @@ grep_pid_status()
|
||||
check_prog cat
|
||||
check_prog rm
|
||||
|
||||
rm -f "$LOG"
|
||||
case "$ME_" in
|
||||
*.test)
|
||||
NAME="${ME_%.test}"
|
||||
TESTDIR="$NAME.dir"
|
||||
rm -rf -- "$TESTDIR"
|
||||
mkdir -- "$TESTDIR"
|
||||
cd "$TESTDIR"
|
||||
|
||||
case "$srcdir" in
|
||||
/*) ;;
|
||||
*) srcdir="../$srcdir" ;;
|
||||
esac
|
||||
|
||||
[ -n "${STRACE-}" ] || {
|
||||
STRACE=../strace
|
||||
STRACE=../../strace
|
||||
case "${LOG_COMPILER-} ${LOG_FLAGS-}" in
|
||||
*--suppressions=*--error-exitcode=*--tool=*)
|
||||
# add valgrind command prefix
|
||||
@ -279,6 +289,14 @@ rm -f "$LOG"
|
||||
esac
|
||||
}
|
||||
|
||||
;;
|
||||
|
||||
*)
|
||||
[ -n "${STRACE-}" ] ||
|
||||
STRACE=../strace
|
||||
;;
|
||||
esac
|
||||
|
||||
: "${TIMEOUT_DURATION:=60}"
|
||||
: "${SLEEP_A_BIT:=sleep 1}"
|
||||
|
||||
|
@ -50,7 +50,7 @@ fi
|
||||
|
||||
syscall=$mmap,madvise,mlockall,mprotect,mremap,msync,munmap
|
||||
|
||||
run_prog "./$NAME" $mmap > /dev/null
|
||||
run_prog "../$NAME" $mmap > /dev/null
|
||||
run_strace -a20 -e$syscall $args > "$EXP"
|
||||
sed -n "/^$mmap(NULL, 0, PROT_NONE,/,\$p" < "$LOG" > "$OUT"
|
||||
match_diff "$OUT" "$EXP"
|
||||
|
@ -36,7 +36,7 @@
|
||||
check_prog sed
|
||||
|
||||
addr="$NAME-local-stream"
|
||||
run_prog "./$NAME" $addr > /dev/null
|
||||
run_prog "../$NAME" $addr > /dev/null
|
||||
|
||||
run_strace -a20 -y -eclose,network $args > "$EXP"
|
||||
# Filter out close() calls made by ld.so and libc.
|
||||
|
@ -34,9 +34,9 @@
|
||||
framework_skip_ '/proc/self/fd/ is not available'
|
||||
|
||||
check_prog sed
|
||||
run_prog ./netlink_inet_diag
|
||||
run_prog ../netlink_inet_diag
|
||||
|
||||
run_prog "./$NAME" > /dev/null
|
||||
run_prog "../$NAME" > /dev/null
|
||||
|
||||
run_strace -a22 -yy -eclose,network $args > "$EXP"
|
||||
# Filter out close() calls made by ld.so and libc.
|
||||
|
@ -37,9 +37,9 @@
|
||||
framework_skip_ '/proc/self/fd/ is not available'
|
||||
|
||||
check_prog sed
|
||||
run_prog ./netlink_netlink_diag
|
||||
run_prog ../netlink_netlink_diag
|
||||
|
||||
run_prog "./$NAME" > /dev/null
|
||||
run_prog "../$NAME" > /dev/null
|
||||
|
||||
run_strace -a22 -yy -eclose,network $args > "$EXP"
|
||||
# Filter out close() calls made by ld.so and libc.
|
||||
|
@ -36,10 +36,10 @@
|
||||
framework_skip_ '/proc/self/fd/ is not available'
|
||||
|
||||
check_prog sed
|
||||
run_prog ./netlink_unix_diag
|
||||
run_prog ../netlink_unix_diag
|
||||
|
||||
addr="$NAME-local-stream"
|
||||
run_prog "./$NAME" $addr > /dev/null
|
||||
run_prog "../$NAME" $addr > /dev/null
|
||||
|
||||
run_strace -a22 -yy -eclose,network $args > "$EXP"
|
||||
# Filter out close() calls made by ld.so and libc.
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
. "${srcdir=.}/init.sh"
|
||||
|
||||
run_prog ./net-accept-connect net-local-stream
|
||||
run_prog ../net-accept-connect net-local-stream
|
||||
run_strace_merge -e%network $args
|
||||
match_grep
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
check_prog grep
|
||||
run_prog grep chdir $srcdir/umovestr.expected > "$EXP"
|
||||
run_prog ./umovestr
|
||||
run_prog ../umovestr
|
||||
|
||||
> "$LOG" || fail_ "failed to write $LOG"
|
||||
$STRACE -o "|cat > $LOG && $SLEEP_A_BIT && grep chdir < $LOG > $OUT" -e chdir $args ||
|
||||
|
@ -9,7 +9,7 @@ run_strace -a16 -vepoll $args > "$OUT"
|
||||
match_diff "$LOG" "$OUT"
|
||||
|
||||
for abbrev in 0 1 2 3 4 5; do
|
||||
run_prog "./$NAME" $abbrev > /dev/null
|
||||
run_prog "../$NAME" $abbrev > /dev/null
|
||||
run_strace -a16 -epoll -s$abbrev $args > "$OUT"
|
||||
match_diff "$LOG" "$OUT"
|
||||
done
|
||||
|
@ -5,7 +5,7 @@
|
||||
. "${srcdir=.}/init.sh"
|
||||
|
||||
check_prog grep
|
||||
set -- "./$NAME"
|
||||
set -- "../$NAME"
|
||||
"$@" > /dev/null || {
|
||||
case $? in
|
||||
77) skip_ "$* exited with code 77" ;;
|
||||
|
@ -41,13 +41,13 @@ test_with()
|
||||
match_diff
|
||||
}
|
||||
|
||||
test_with -eexit,exit_group -efault=exit_group:error=ENOSYS ./answer
|
||||
test_with -eexit,exit_group -efault=exit_group:error=ENOSYS ../answer
|
||||
|
||||
test_with -eexit,exit_group -efault=exit_group:error=ENOSYS \
|
||||
-efault=\!process:error=1 ./answer
|
||||
-efault=\!process:error=1 ../answer
|
||||
|
||||
test_with -eexit,exit_group -efault=all:error=ENOSYS \
|
||||
-efault=exit:error=1:when=2+ ./answer
|
||||
-efault=exit:error=1:when=2+ ../answer
|
||||
|
||||
test_with -eexit,exit_group -efault=exit_group:error=ENOSYS \
|
||||
-efault=\!%desc,%file,%memory,%process,%signal,%network,%ipc:error=1 ./answer
|
||||
-efault=\!%desc,%file,%memory,%process,%signal,%network,%ipc:error=1 ../answer
|
||||
|
@ -76,7 +76,7 @@ check_fault_injection()
|
||||
|
||||
run_strace -a11 -e trace=$trace \
|
||||
"$@" -e fault=$fault$when$error $extra \
|
||||
./$NAME $raw "$err" "$first" "$step" $N \
|
||||
../$NAME $raw "$err" "$first" "$step" $N \
|
||||
> "$EXP" 4> "$outexp" 5> "$outgot"
|
||||
|
||||
match_diff "$EXP" "$LOG"
|
||||
|
@ -4,5 +4,5 @@
|
||||
. "${srcdir=.}/scno_tampering.sh"
|
||||
|
||||
run_strace -a12 -echdir,exit_group -einject=chdir:error=ENOENT:signal=USR1 \
|
||||
"./$NAME"
|
||||
"../$NAME"
|
||||
match_diff
|
||||
|
@ -12,7 +12,7 @@ check_injection()
|
||||
rval="$1"; shift
|
||||
|
||||
run_strace -a12 -e$syscall -einject="$syscall:retval=$rval" "$@" \
|
||||
./qual_inject-retval "$rval" > "$EXP"
|
||||
../qual_inject-retval "$rval" > "$EXP"
|
||||
match_diff "$LOG" "$EXP"
|
||||
rm -f "$EXP"
|
||||
}
|
||||
|
@ -4,5 +4,5 @@
|
||||
. "${srcdir=.}/init.sh"
|
||||
|
||||
run_strace -a12 -echdir,exit_group -einject=chdir:signal=USR1 \
|
||||
./$NAME
|
||||
../$NAME
|
||||
match_diff
|
||||
|
@ -34,8 +34,8 @@ test_one_sig()
|
||||
local sigs
|
||||
sigs="$1"; shift
|
||||
|
||||
run_prog "./$NAME" "$@" > /dev/null
|
||||
run_strace -e trace=none -e signal="$sigs" "./$NAME" "$@" > "$EXP"
|
||||
run_prog "../$NAME" "$@" > /dev/null
|
||||
run_strace -e trace=none -e signal="$sigs" "../$NAME" "$@" > "$EXP"
|
||||
match_diff "$LOG" "$EXP"
|
||||
rm -f "$EXP"
|
||||
}
|
||||
|
@ -5,17 +5,17 @@
|
||||
|
||||
. "${srcdir=.}/init.sh"
|
||||
|
||||
run_prog ./umovestr
|
||||
pattern_abbrev_verbose='execve("\./umovestr", \["\./umovestr"\], \[/\* [[:digit:]]* vars \*/\]) = 0'
|
||||
pattern_nonabbrev_verbose='execve("\./umovestr", \["\./umovestr"\], \[".*\"\(\.\.\.\)\?\]) = 0'
|
||||
pattern_nonverbose='execve("\./umovestr", 0x[[:xdigit:]]*, 0x[[:xdigit:]]*) = 0'
|
||||
run_prog ../umovestr
|
||||
pattern_abbrev_verbose='execve("\.\./umovestr", \["\.\./umovestr"\], \[/\* [[:digit:]]* vars \*/\]) = 0'
|
||||
pattern_nonabbrev_verbose='execve("\.\./umovestr", \["\.\./umovestr"\], \[".*\"\(\.\.\.\)\?\]) = 0'
|
||||
pattern_nonverbose='execve("\.\./umovestr", 0x[[:xdigit:]]*, 0x[[:xdigit:]]*) = 0'
|
||||
pattern_raw='execve(0x[[:xdigit:]]*, 0x[[:xdigit:]]*, 0x[[:xdigit:]]*) = 0'
|
||||
|
||||
check_output_mismatch()
|
||||
{
|
||||
local pattern
|
||||
pattern="$1"; shift
|
||||
run_strace "$@" ./umovestr
|
||||
run_strace "$@" ../umovestr
|
||||
LC_ALL=C grep -x "$pattern" "$LOG" > /dev/null || {
|
||||
printf '%s\n%s\n' \
|
||||
'Failed patterns of expected output:' "$pattern"
|
||||
@ -32,7 +32,7 @@ check_output_mismatch "$pattern_abbrev_verbose" -e trace=%process
|
||||
LC_ALL=C grep '^chdir' "$LOG" > /dev/null &&
|
||||
dump_log_and_fail_with "$STRACE $args unexpected output"
|
||||
|
||||
run_strace -e 42 ./umovestr
|
||||
run_strace -e 42 ../umovestr
|
||||
LC_ALL=C grep '^[[:alnum:]_]*(' "$LOG" > /dev/null &&
|
||||
dump_log_and_fail_with "$STRACE $args unexpected output"
|
||||
|
||||
|
@ -38,7 +38,7 @@ run_strace_match_diff -a16 -e trace=readv,writev \
|
||||
run_strace_match_diff -a16 -e trace=readv,writev \
|
||||
-eread='!all' -ewrite=none -eread='!0,1,2' -ewrite='!0,1,2'
|
||||
|
||||
wfd="$(./print_maxfd)"
|
||||
wfd="$(../print_maxfd)"
|
||||
rfd="$(($wfd - 1))"
|
||||
run_strace_match_diff -a16 -e trace=readv,writev \
|
||||
-eread="$rfd" -ewrite="$wfd"
|
||||
|
@ -50,7 +50,7 @@ check_fd()
|
||||
touch "$LOG" "$fd0" ||
|
||||
framework_skip_ 'failed to create files'
|
||||
|
||||
set -- "\"./$NAME\"" "\"$1\"" "\"$2\"" "\"$3\""
|
||||
set -- "\"../$NAME\"" "\"$1\"" "\"$2\"" "\"$3\""
|
||||
eval "$@" "<${a1:-&-}" ">${a2:-&-}" "2>${a3:-&-}" ||
|
||||
fail_ "$* failed with code $rc"
|
||||
|
||||
|
@ -31,8 +31,8 @@
|
||||
|
||||
while read w i
|
||||
do
|
||||
try_run_prog "./$i" || continue
|
||||
run_strace -a$w -e%sched ./$i > "$EXP"
|
||||
try_run_prog "../$i" || continue
|
||||
run_strace -a$w -e%sched ../$i > "$EXP"
|
||||
match_diff "$LOG" "$EXP"
|
||||
done << EOF
|
||||
28 sched_xetaffinity
|
||||
@ -48,8 +48,8 @@ echo '+++ exited with 0 +++' > "$EXP"
|
||||
|
||||
while read w i
|
||||
do
|
||||
try_run_prog "./$i" || continue
|
||||
run_strace -a$w -e%sched ./$i > /dev/null
|
||||
try_run_prog "../$i" || continue
|
||||
run_strace -a$w -e%sched ../$i > /dev/null
|
||||
match_diff "$LOG" "$EXP"
|
||||
done << EOF
|
||||
11 fchdir
|
||||
|
@ -48,7 +48,7 @@ file="$dir/$(for i in $(seq 1 127); do echo A; done; echo Z)"
|
||||
touch -- "$file" ||
|
||||
framework_skip_ 'failed to create a file'
|
||||
|
||||
run_prog ./scm_rights /dev/zero
|
||||
run_prog ../scm_rights /dev/zero
|
||||
run_strace -y -x -e%network $args "$file"
|
||||
|
||||
hex='[[:xdigit:]]'
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
. "${srcdir=.}/init.sh"
|
||||
|
||||
set -- "./$NAME"
|
||||
set -- "../$NAME"
|
||||
"$@" > /dev/null || {
|
||||
case $? in
|
||||
77) skip_ "$* exited with code 77" ;;
|
||||
|
@ -4,6 +4,6 @@
|
||||
|
||||
. "${srcdir=.}/init.sh"
|
||||
|
||||
run_prog ./sleep 0
|
||||
run_strace -a24 -C -enanosleep ./sleep 1
|
||||
run_prog ../sleep 0
|
||||
run_strace -a24 -C -enanosleep ../sleep 1
|
||||
match_grep
|
||||
|
@ -1 +1 @@
|
||||
execve\("\./sleep", \["\./sleep", "0"\], \[.*"option_E_var=OPTION_E_VAL".*\]\) = 0
|
||||
execve\("\.\./sleep", \["\.\./sleep", "0"\], \[.*"option_E_var=OPTION_E_VAL".*\]\) = 0
|
||||
|
@ -4,6 +4,6 @@
|
||||
|
||||
. "${srcdir=.}/init.sh"
|
||||
|
||||
run_prog ./sleep 0 > /dev/null
|
||||
run_prog ../sleep 0 > /dev/null
|
||||
run_strace -E option_E_var=OPTION_E_VAL -v $args
|
||||
match_grep
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
. "${srcdir=.}/init.sh"
|
||||
|
||||
run_prog ./readv > /dev/null
|
||||
run_prog ../readv > /dev/null
|
||||
|
||||
test_c()
|
||||
{
|
||||
@ -13,7 +13,7 @@ test_c()
|
||||
sortopts="$1"; shift
|
||||
sedexpr="$1"; shift
|
||||
|
||||
run_strace -c -w -S "$sortby" ./readv > /dev/null
|
||||
run_strace -c -w -S "$sortby" ../readv > /dev/null
|
||||
sed -r -n -e "$sedexpr" < "$LOG" > "$OUT"
|
||||
|
||||
[ -s "$OUT" ] ||
|
||||
|
@ -4,6 +4,6 @@
|
||||
|
||||
. "${srcdir=.}/init.sh"
|
||||
|
||||
run_prog ./sleep 0
|
||||
run_strace -a24 -T -enanosleep ./sleep 1
|
||||
run_prog ../sleep 0
|
||||
run_strace -a24 -T -enanosleep ../sleep 1
|
||||
match_grep
|
||||
|
@ -10,7 +10,8 @@ run_strace -V > "$LOG"
|
||||
|
||||
getval()
|
||||
{
|
||||
sed -r -n 's/#define[[:space:]]*'"$1"'[[:space:]]*"([^"]*)".*/\1/p' ../config.h
|
||||
sed -r -n 's/#define[[:space:]]*'"$1"'[[:space:]]*"([^"]*)".*/\1/p' \
|
||||
../../config.h
|
||||
}
|
||||
|
||||
cat > "$EXP" << __EOF__
|
||||
|
@ -7,7 +7,7 @@
|
||||
run_prog_skip_if_failed \
|
||||
kill -0 $$
|
||||
|
||||
./set_ptracer_any ./sleep 1 > "$OUT" &
|
||||
../set_ptracer_any ../sleep 1 > "$OUT" &
|
||||
tracee_pid=$!
|
||||
|
||||
while ! [ -s "$OUT" ]; do
|
||||
|
@ -37,7 +37,7 @@
|
||||
check_prog sed
|
||||
check_prog tr
|
||||
|
||||
run_prog ./stack-fcall
|
||||
run_prog ../stack-fcall
|
||||
run_strace -e getpid -k $args
|
||||
|
||||
expected='getpid f3 f2 f1 f0 main '
|
||||
|
@ -1,2 +1,2 @@
|
||||
[ ]{5}0\.0{6} execve\("\./sleep", \["\./sleep", "1"\], \[/\* [[:digit:]]+ vars \*/\]\) = 0
|
||||
[ ]{5}0\.0{6} execve\("\.\./sleep", \["\.\./sleep", "1"\], \[/\* [[:digit:]]+ vars \*/\]\) = 0
|
||||
[ ]{5}(1\.[01]|0\.9)[[:digit:]]{5} \+\+\+ exited with 0 \+\+\+
|
||||
|
@ -4,6 +4,6 @@
|
||||
|
||||
. "${srcdir=.}/init.sh"
|
||||
|
||||
run_prog ./sleep 0
|
||||
run_strace -r -eexecve ./sleep 1
|
||||
run_prog ../sleep 0
|
||||
run_strace -r -eexecve ../sleep 1
|
||||
match_grep
|
||||
|
@ -5,7 +5,7 @@
|
||||
. "${srcdir=.}/init.sh"
|
||||
|
||||
run_prog_skip_if_failed date +%T > /dev/null
|
||||
run_prog ./sleep 0
|
||||
run_prog ../sleep 0
|
||||
|
||||
t0="$(date +%T)"
|
||||
run_strace -t -eexecve $args
|
||||
@ -13,7 +13,7 @@ t1="$(date +%T)"
|
||||
|
||||
EXPECTED="$LOG.expected"
|
||||
cat > "$EXPECTED" << __EOF__
|
||||
($t0|$t1) execve\\("\\./sleep", \\["\\./sleep", "0"\\], \\[/\\* [[:digit:]]+ vars \\*/\\]\\) = 0
|
||||
($t0|$t1) execve\\("\\.\\./sleep", \\["\\.\\./sleep", "0"\\], \\[/\\* [[:digit:]]+ vars \\*/\\]\\) = 0
|
||||
__EOF__
|
||||
|
||||
match_grep "$LOG" "$EXPECTED"
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
run_prog_skip_if_failed date +%s > "$LOG"
|
||||
run_prog_skip_if_failed date +%T --date "@$(cat "$LOG")" > /dev/null
|
||||
run_prog ./sleep 0
|
||||
run_prog ../sleep 0
|
||||
|
||||
s0="$(date +%s)"
|
||||
run_strace -tt -eexecve $args
|
||||
@ -21,7 +21,7 @@ while [ "$s" -le "$s1" ]; do
|
||||
done
|
||||
|
||||
cat > "$EXP" << __EOF__
|
||||
($t_reg)\\.[[:digit:]]{6} execve\\("\\./sleep", \\["\\./sleep", "0"\\], \\[/\\* [[:digit:]]+ vars \\*/\\]\\) = 0
|
||||
($t_reg)\\.[[:digit:]]{6} execve\\("\\.\\./sleep", \\["\\.\\./sleep", "0"\\], \\[/\\* [[:digit:]]+ vars \\*/\\]\\) = 0
|
||||
__EOF__
|
||||
|
||||
match_grep "$LOG" "$EXP"
|
||||
|
@ -5,7 +5,7 @@
|
||||
. "${srcdir=.}/init.sh"
|
||||
|
||||
run_prog_skip_if_failed date +%s > /dev/null
|
||||
run_prog ./sleep 0
|
||||
run_prog ../sleep 0
|
||||
|
||||
s0="$(date +%s)"
|
||||
run_strace -ttt -eexecve $args
|
||||
@ -19,7 +19,7 @@ while [ "$s" -le "$s1" ]; do
|
||||
done
|
||||
|
||||
cat > "$EXP" << __EOF__
|
||||
($t_reg)\\.[[:digit:]]{6} execve\\("\\./sleep", \\["\\./sleep", "0"\\], \\[/\\* [[:digit:]]+ vars \\*/\\]\\) = 0
|
||||
($t_reg)\\.[[:digit:]]{6} execve\\("\\.\\./sleep", \\["\\.\\./sleep", "0"\\], \\[/\\* [[:digit:]]+ vars \\*/\\]\\) = 0
|
||||
__EOF__
|
||||
|
||||
match_grep "$LOG" "$EXP"
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
. "${srcdir=.}/init.sh"
|
||||
|
||||
run_prog ./net-accept-connect 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678
|
||||
run_prog ../net-accept-connect 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678
|
||||
run_strace_merge -ebind,connect,getsockname $args
|
||||
match_grep
|
||||
|
||||
|
@ -10,7 +10,7 @@ run_prog > /dev/null
|
||||
run_strace -v -euname $args > "$EXP"
|
||||
uniq < "$LOG" > "$OUT"
|
||||
|
||||
run_prog "./$NAME" abbrev > /dev/null
|
||||
run_prog "../$NAME" abbrev > /dev/null
|
||||
run_strace -euname $args >> "$EXP"
|
||||
uniq < "$LOG" >> "$OUT"
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
. "${srcdir=.}/init.sh"
|
||||
|
||||
run_prog ./unix-pair-send-recv abcdefghijklmnopqrstuvwxyz
|
||||
run_prog ../unix-pair-send-recv abcdefghijklmnopqrstuvwxyz
|
||||
run_strace -a32 -esignal=none -esend,recv -eread=0 -ewrite=0 $args
|
||||
match_diff
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
. "${srcdir=.}/init.sh"
|
||||
|
||||
run_prog ./unix-pair-sendto-recvfrom abcdefghijklmnopqrstuvwxyz
|
||||
run_prog ../unix-pair-sendto-recvfrom abcdefghijklmnopqrstuvwxyz
|
||||
run_strace -esignal=none -esendto,recvfrom -eread=0 -ewrite=0 $args
|
||||
match_diff
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user