[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[committed] Fix pr24174.sh



Hi,

Test-case pr24174.sh contains:
...
grep "DWARF version 0 unhandled" dwz.err || true
...
where the intention is to check that the error message does not occur, but
which will pass regardless of what's in dwz.err.

Fix this by making sure the test fails if grep succeeds.

Committed to trunk.

Thanks,
- Tom

Fix pr24174.sh

2019-03-13  Tom de Vries  <tdevries@suse.de>

	* testsuite/dwz.tests/pr24174.sh: Make sure test fails if grep succeeds.

---
 testsuite/dwz.tests/pr24174.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/testsuite/dwz.tests/pr24174.sh b/testsuite/dwz.tests/pr24174.sh
index 3b1a0f8..f6744f4 100755
--- a/testsuite/dwz.tests/pr24174.sh
+++ b/testsuite/dwz.tests/pr24174.sh
@@ -8,7 +8,9 @@ if dwz 1 2>dwz.err; status=$?; then
    true
 fi
 
-grep "DWARF version 0 unhandled" dwz.err || true
+if grep -q "DWARF version 0 unhandled" dwz.err; then
+    exit 1
+fi
 
 [ $status -eq 1 ]