Fail run_dump_test when an error is expected but not seen

Message ID 20210220075929.GG17920@bubble.grove.modra.org
State New
Headers show
Series
  • Fail run_dump_test when an error is expected but not seen
Related show

Commit Message

H.J. Lu via Binutils Feb. 20, 2021, 7:59 a.m.
This is a -w diff.

	* testsuite/lib/binutils-common.exp: Whitespace fixes throughout.
	(run_dump_test): Fail if expecting errors from a file like we do
	for error strings, if no error is seen.


-- 
Alan Modra
Australia Development Lab, IBM

Patch

diff --git a/binutils/testsuite/lib/binutils-common.exp b/binutils/testsuite/lib/binutils-common.exp
index 029284167a..59e25df99b 100644
--- a/binutils/testsuite/lib/binutils-common.exp
+++ b/binutils/testsuite/lib/binutils-common.exp
@@ -1438,7 +1438,7 @@  proc run_dump_test { name {extra_options {}} } {
 	}
 
 	# We must not have expected failure if we get here.
-        if { $opts(error) != "" } {
+	if { $want_out(terminal) } {
 	    fail $testname
 	    continue
 	}