[PATCH] tests/ipc_sem: verify that all patterns match

Andreas Schwab schwab at suse.de
Thu Mar 12 10:09:47 UTC 2015


* ipc_sem.test: Count matches to verify that all patterns match.
---
 tests/ipc_sem.test | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/ipc_sem.test b/tests/ipc_sem.test
index b8fa545..ef957c3 100755
--- a/tests/ipc_sem.test
+++ b/tests/ipc_sem.test
@@ -18,7 +18,9 @@ OUT="$LOG.out"
 
 args='-eipc ./ipc_sem'
 $STRACE -o "$LOG" $args > "$OUT" &&
-LC_ALL=C grep -E -x -f "$OUT" "$LOG" > /dev/null || {
+exp_lines=$(wc -l < "$OUT") &&
+matched_lines=$(LC_ALL=C grep -c -E -x -f "$OUT" "$LOG") &&
+test $exp_lines -eq $matched_lines || {
 	cat "$OUT" "$LOG"
 	fail_ "$STRACE $args output mismatch"
 }
-- 
2.3.2

-- 
Andreas Schwab, SUSE Labs, schwab at suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."




More information about the Strace-devel mailing list