SHA256
1
0
forked from pool/strace
strace/0012-tests-verify-that-all-patterns-match.patch
Martin Pluskal 0b44e76647 Accepting request 292570 from home:Andreas_Schwab:Factory
- 0001-aarch64-fix-rt_sigreturn-decoding.patch,
  0002-m68k-define-HAVE_SA_RESTORER.patch,
  0003-Fix-decoding-of-mmap2-for-arm.patch,
  0005-tests-select.test-handle-architectures-using-pselect.patch,
  0006-aarch64-fix-ioctl-decoding.patch,
  0007-m68k-fix-sigreturn-decoding.patch,
  0008-Fix-crash-in-ipc_sem-test.patch,
  0009-tests-ipc_-match-IPC_64-flag.patch,
  0010-semctl-fix-indirect-syscall-decoding.patch,
  0011-Fix-stat64-st_-acm-time-decoding-for-personalities-w.patch,
  0012-tests-verify-that-all-patterns-match.patch,
  0013-aarch64-properly-decode-generic-syscalls.patch,
  0014-stat64-v.test-add-newfstatat-syscall-support.patch,
  0015-tests-uid-use-fchown-instead-of-chown.patch: Patches from upstream
  to fix testsuite failure.
- Enable libunwind support (strace -k).

OBS-URL: https://build.opensuse.org/request/show/292570
OBS-URL: https://build.opensuse.org/package/show/devel:tools/strace?expand=0&rev=44
2015-03-24 18:25:03 +00:00

103 lines
3.2 KiB
Diff

From 33557845adbd7b516e9113306515d9b107177830 Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@suse.de>
Date: Wed, 11 Mar 2015 17:49:06 +0100
Subject: [PATCH 12/15] tests: verify that all patterns match
* 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.
---
tests/ipc_msg.test | 6 ++++--
tests/ipc_sem.test | 4 +++-
tests/ipc_shm.test | 6 ++++--
tests/stat32-v.test | 4 +++-
tests/stat64-v.test | 4 +++-
5 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/tests/ipc_msg.test b/tests/ipc_msg.test
index b1ebe6d..e0d27ed 100755
--- a/tests/ipc_msg.test
+++ b/tests/ipc_msg.test
@@ -16,9 +16,11 @@ OUT="$LOG.out"
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"
}
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"
}
diff --git a/tests/ipc_shm.test b/tests/ipc_shm.test
index b09dc2b..de8b47c 100755
--- a/tests/ipc_shm.test
+++ b/tests/ipc_shm.test
@@ -16,9 +16,11 @@ OUT="$LOG.out"
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"
}
diff --git a/tests/stat32-v.test b/tests/stat32-v.test
index 7f8cb4a..67eb5ed 100755
--- a/tests/stat32-v.test
+++ b/tests/stat32-v.test
@@ -33,7 +33,9 @@ touch -t 0102030405 $sample
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"
}
diff --git a/tests/stat64-v.test b/tests/stat64-v.test
index f03254a..785403d 100755
--- a/tests/stat64-v.test
+++ b/tests/stat64-v.test
@@ -27,7 +27,9 @@ touch -d '1970-01-01 -42 seconds' $sample
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"
}
--
2.3.3