This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Robustify weird.exp
- From: Vladimir Prus <vladimir at codesourcery dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Fri, 10 Nov 2006 09:21:29 +0300
- Subject: Robustify weird.exp
I've checked in the attached obvious patch to fix issue I run in with
weird.exp test -- if gdb gets internal error on that test, gdb_expect does
not immediately exits by waits until timeout. As result, that test took half
an hour for me to execute (and mostly fail).
- Volodya
Index: ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/ChangeLog,v
retrieving revision 1.1274
diff -u -r1.1274 ChangeLog
--- ChangeLog 9 Nov 2006 19:26:45 -0000 1.1274
+++ ChangeLog 9 Nov 2006 19:30:19 -0000
@@ -1,5 +1,10 @@
2006-11-09 Vladimir Prus <vladimir@codesourcery.com>
+ * gdb.stabs/weird.exp (print_weird_var): Use
+ gdb_test_multiple instead of gdb_expect.
+
+2006-11-09 Vladimir Prus <vladimir@codesourcery.com>
+
* gdb.base/help.exp (help_test_raw): New.
(test_class_help): New.
(test_prefix_command_help): New.
Index: gdb.stabs/weird.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.stabs/weird.exp,v
retrieving revision 1.10
diff -u -r1.10 weird.exp
--- gdb.stabs/weird.exp 10 Aug 2006 05:27:21 -0000 1.10
+++ gdb.stabs/weird.exp 9 Nov 2006 19:30:19 -0000
@@ -228,16 +228,13 @@
# Make sure that the variable gets printed out correctly, without
# any sort of warning message.
- send_gdb "print $var\n"
- gdb_expect {
+ gdb_test_multiple "print $var\n" "variable $var printed property" {
-re "^print $var\r*\n.\[0-9\]* = 42.*$gdb_prompt $" {
pass "variable $var printed properly"
}
-re ".*$gdb_prompt $" {
fail "variable $var printed properly"
}
- timeout { fail "variable $var printed properly (timeout)" }
- eof { fail "variable $var printed properly (eof)" }
}
# Make sure that the stabs did get loaded in a sensible way.