]> granicus.if.org Git - strace/commitdiff
tests: avoid SIGPIPE
authorDmitry V. Levin <ldv@altlinux.org>
Thu, 3 Mar 2011 00:10:20 +0000 (00:10 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 3 Mar 2011 00:10:20 +0000 (00:10 +0000)
* tests/ptrace_setoptions: Replace "grep -q" with "grep > /dev/null".
The former may result to strace being killed by SIGPIPE, which in
certain configuratons may lead to generation of a core file.
Suggested by Mike Frysinger.

tests/ptrace_setoptions

index b0a1c8795616dbeebbfb4a6098e8e9fc2377743e..4bfe38df399d16ad9838afca291c6206e852ab7a 100755 (executable)
@@ -13,6 +13,6 @@ check_strace
 check_prog timeout
 
 timeout -s 9 9 \
-$STRACE -df -enone /bin/true 2>&1 |
-       fgrep -qx 'ptrace_setoptions = 0xe' ||
+$STRACE -df -enone / 2>&1 |
+       grep -F -x 'ptrace_setoptions = 0xe' > /dev/null ||
                fail_ 'strace failed to recognize proper kernel PTRACE_O_TRACECLONE support'