* tests/ipc_msg.test: Count matches to verify that all patterns match.
* tests/ipc_sem.test: Likewise.
* tests/ipc_shm.test: Likewise.
* tests/stat32-v.test: Likewise.
* tests/stat64-v.test: Likewise.
fi
}
-args="-eipc ./ipc_msg $f"
+args="-eipc ./ipc_msg"
$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"
}
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"
}
fi
}
-args="-eipc ./ipc_shm $f"
+args="-eipc ./ipc_shm"
$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"
}
for f in $sample . /dev/null; do
args="-v -efile ./stat32 $f"
$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"
}
for f in $sample . /dev/null; do
args="-v -efile ./stat $f"
$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"
}