From: Janis Johnson <janisjo@codesourcery.com>
To: gdb-patches@sourceware.org
Subject: [RFA] bailing out of tests with multiple errors or timeouts
Date: Wed, 04 May 2011 17:46:00 -0000 [thread overview]
Message-ID: <4DC1910A.8040603@codesourcery.com> (raw)
[-- 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
+ }
}
next reply other threads:[~2011-05-04 17:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-04 17:46 Janis Johnson [this message]
2011-05-04 18:13 ` Mark Kettenis
2011-05-05 15:59 ` Janis Johnson
2011-05-05 18:57 ` Joel Brobecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DC1910A.8040603@codesourcery.com \
--to=janisjo@codesourcery.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox