prctl-seccomp-filter-v.test: robustify against unrelated prctl invocations
authorDmitry V. Levin <ldv@altlinux.org>
Mon, 18 Apr 2016 00:20:47 +0000 (00:20 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 18 Apr 2016 01:10:44 +0000 (01:10 +0000)
* tests/prctl-seccomp-filter-v.test: Filter out PR_GET_* prctl calls.

Reported-by: Steve McIntyre <steve@einval.com>
tests/prctl-seccomp-filter-v.test

index 84dfeab535bfbf907124f80bab63edb1dbcb453a..44e4a782a7fc7db209e3b7464b1fb5507992d571 100755 (executable)
@@ -3,4 +3,11 @@
 # Check verbose decoding of prctl PR_SET_SECCOMP SECCOMP_MODE_FILTER.
 
 . "${srcdir=.}/init.sh"
-run_strace_match_diff -v -e trace=prctl
+
+check_prog grep
+run_prog > /dev/null
+run_strace -v -eprctl $args > "$EXP"
+grep -v '^prctl(PR_GET_' < "$LOG" > "$OUT"
+match_diff "$OUT" "$EXP"
+
+rm -f "$EXP" "$OUT"