From: Dmitry V. Levin Date: Thu, 3 Mar 2011 00:10:20 +0000 (+0000) Subject: tests: avoid SIGPIPE X-Git-Tag: v4.6~15 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f9a84ef39fdbfe9636837c99beff52d62a7b8127;p=strace tests: avoid SIGPIPE * 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. --- diff --git a/tests/ptrace_setoptions b/tests/ptrace_setoptions index b0a1c879..4bfe38df 100755 --- a/tests/ptrace_setoptions +++ b/tests/ptrace_setoptions @@ -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'