From: Dmitry V. Levin Date: Wed, 26 Aug 2015 22:29:41 +0000 (+0000) Subject: tests: fix match_diff usage X-Git-Tag: v4.11~248 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f6a36f0c9e2e3c912ac176fc112f475f98440b0c;p=strace tests: fix match_diff usage 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. --- diff --git a/tests/aio.test b/tests/aio.test index 93428f3f..f61b04ec 100755 --- a/tests/aio.test +++ b/tests/aio.test @@ -8,7 +8,7 @@ run_prog > /dev/null OUT="$LOG.out" syscalls=io_setup,io_submit,io_getevents,io_cancel,io_destroy run_strace -a14 -e trace=$syscalls $args > "$OUT" -match_diff "$LOG" "$OUT" +match_diff "$OUT" "$LOG" rm -f "$OUT" exit 0 diff --git a/tests/restart_syscall.test b/tests/restart_syscall.test index 1daa3165..0e74b2c9 100755 --- a/tests/restart_syscall.test +++ b/tests/restart_syscall.test @@ -23,7 +23,7 @@ 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 "$srcdir/restart_syscall_unknown.expected" "$LOG" ;; *) match_diff ;; diff --git a/tests/seccomp.test b/tests/seccomp.test index 4101cae1..0d172217 100755 --- a/tests/seccomp.test +++ b/tests/seccomp.test @@ -8,7 +8,7 @@ OUT="$LOG.out" run_prog > /dev/null run_strace -veprctl $args > "$OUT" -match_diff "$LOG" "$OUT" +match_diff "$OUT" "$LOG" rm -f "$OUT" diff --git a/tests/umovestr2.test b/tests/umovestr2.test index 2e9fee44..7f00d5fb 100755 --- a/tests/umovestr2.test +++ b/tests/umovestr2.test @@ -11,7 +11,7 @@ run_prog > /dev/null run_strace -veexecve -s262144 $args > "$EXP" check_prog sed sed 1d < "$LOG" > "$OUT" -match_diff "$OUT" "$EXP" +match_diff "$EXP" "$OUT" rm -f "$EXP" "$OUT"