RFC: consolidate checks for _Unwind_DebugHook in test suite

Tom Tromey tromey@redhat.com
Fri Aug 24 13:54:00 GMT 2012


>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Jan> If gdb_test_multiple FAILs it will leave "ok" as 1 which will run the whole
Jan> testfile.  Was it intentional?  Maybe it was although I would expect the
Jan> opposite.

Bug inherited from the status quo ante.

What do you think of this?
I'm testing it.

Tom

diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 97e79af..0b4c679 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -2101,15 +2101,14 @@ proc skip_hw_watchpoint_access_tests {} {
 proc skip_unwinder_tests {} {
     global gdb_prompt
 
-    set ok 1
+    set ok 0
     gdb_test_multiple "print _Unwind_DebugHook" "check for unwinder hook" {
 	-re "= .*no debug info.*_Unwind_DebugHook.*\r\n$gdb_prompt $" {
-	    set ok 0
 	}
 	-re "= .*_Unwind_DebugHook.*\r\n$gdb_prompt $" {
+	    set ok 1
 	}
 	-re "No symbol .* in current context.\r\n$gdb_prompt $" {
-	    set ok 0
 	}
     }
     if {!$ok} {



More information about the Gdb-patches mailing list