Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] bailing out of tests with multiple errors or timeouts
@ 2011-05-04 17:46 Janis Johnson
  2011-05-04 18:13 ` Mark Kettenis
  0 siblings, 1 reply; 4+ messages in thread
From: Janis Johnson @ 2011-05-04 17:46 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 491 bytes --]

Several gdb tests get multiple ERRORS and/or timeouts for some multilibs
of some embedded targets, with a few tests timing out a dozen times.  I
would like to modify these tests to look for the first expected ERROR or
timeout and then bail out with an indication that the remainder of the
test has been skipped.  I haven't found a standard way to do this; any
suggestions?  I've attached a couple of examples as a starting point for
discussion.

Janis Johnson
CodeSourcery / Mentor Graphics

[-- Attachment #2: gdb-20110504-2 --]
[-- Type: text/plain, Size: 1597 bytes --]

2011-05-04  Janis Johnson  <janisjo@codesourcery.com>

	* gdb.threads/manythreads.exp: Bail out after an error that
	indicates the test might have further errors.
	* gdb.threads/staticthreads.exp: Bail out after a timeout
	that indicates the test might have further timeouts.

Index: testsuite/gdb.threads/manythreads.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/manythreads.exp,v
retrieving revision 1.22
diff -u -p -r1.22 manythreads.exp
--- testsuite/gdb.threads/manythreads.exp	19 Jan 2011 17:21:39 -0000	1.22
+++ testsuite/gdb.threads/manythreads.exp	4 May 2011 17:34:16 -0000
@@ -97,6 +97,11 @@ gdb_test_multiple $cmd $cmd {
 	    fail $cmd
 	}
     }
+    eof {
+	fail "$cmd (Process no longer exists)"
+	fail "Remainder of test"
+	return
+    }
 }
 
 gdb_test_no_output "thread name zardoz" "give a name to the thread"
Index: testsuite/gdb.threads/staticthreads.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/staticthreads.exp,v
retrieving revision 1.13
diff -u -p -r1.13 staticthreads.exp
--- testsuite/gdb.threads/staticthreads.exp	1 Jan 2011 15:33:50 -0000	1.13
+++ testsuite/gdb.threads/staticthreads.exp	4 May 2011 17:34:16 -0000
@@ -54,6 +54,12 @@ gdb_test_multiple "continue" "$test" {
     -re "Program received signal .*$gdb_prompt " {
 	kfail gdb/1328 "$test"
     }
+    timeout {
+	# A timeout here often indicates more timeouts later in the test.
+	fail "$test (timeout)"
+	fail "Remainder of test"
+	return
+    }
 }
     
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-05-05 18:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-04 17:46 [RFA] bailing out of tests with multiple errors or timeouts Janis Johnson
2011-05-04 18:13 ` Mark Kettenis
2011-05-05 15:59   ` Janis Johnson
2011-05-05 18:57     ` Joel Brobecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox