This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] testsuite: Fix gdb.base/bang.exp for remote stubs without exit
- From: Anton Kolesov <Anton dot Kolesov at synopsys dot com>
- To: gdb-patches at sourceware dot org
- Cc: Jeremy dot bennett at embecosm dot com
- Date: Wed, 9 Oct 2013 12:58:14 +0400
- Subject: [PATCH] testsuite: Fix gdb.base/bang.exp for remote stubs without exit
- Authentication-results: sourceware.org; auth=none
From: Anton Kolesov <akolesov@synopsys.com>
Some remote stubs do not have a proper exit() function implementation.
gdb.base/bang.exp was failing on those targets due to timeout. With this
patch bang.exp uses already defined library procedures to handle this
situation gracefully without breaking native targets.
Tested with x86_64 (unix, native-gdbserver) and with arc-*-elf32.
gdb/testsuite/ChangeLog:
2013-10-08 Anton Kolesov <Anton.Kolesov@synopsys.com>
* gdb.base/bang.exp: Use gdb_continue_to_end to properly support
remote stubs where exit() behaviour is unreliable.
---
gdb/testsuite/gdb.base/bang.exp | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/gdb/testsuite/gdb.base/bang.exp b/gdb/testsuite/gdb.base/bang.exp
index 6fd3a59..4c5c2e6 100644
--- a/gdb/testsuite/gdb.base/bang.exp
+++ b/gdb/testsuite/gdb.base/bang.exp
@@ -26,12 +26,5 @@ if {[prepare_for_testing $testfile.exp ${testfile}! $srcfile \
# Verify that we can run the program and that it terminates normally.
-gdb_run_cmd
-gdb_expect {
- -re ".*$inferior_exited_re normally.*$gdb_prompt $" {
- pass "run program"
- }
- timeout {
- fail "run program (timeout)"
- }
-}
+runto_main
+gdb_continue_to_end "" continue 1
--
1.8.4.1