From: Anton Kolesov <Anton.Kolesov@synopsys.com>
To: gdb-patches@sourceware.org
Cc: Jeremy.bennett@embecosm.com
Subject: [PATCH] testsuite: Fix gdb.base/bang.exp for remote stubs without exit
Date: Wed, 09 Oct 2013 08:58:00 -0000 [thread overview]
Message-ID: <1381309094-24410-1-git-send-email-Anton.Kolesov@synopsys.com> (raw)
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
next reply other threads:[~2013-10-09 8:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-09 8:58 Anton Kolesov [this message]
2013-10-09 11:28 ` Pedro Alves
2013-10-25 10:04 ` Anton Kolesov
2013-10-25 12:22 ` Pedro Alves
2013-10-25 12:36 ` Pedro Alves
2013-10-25 15:27 ` Anton Kolesov
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=1381309094-24410-1-git-send-email-Anton.Kolesov@synopsys.com \
--to=anton.kolesov@synopsys.com \
--cc=Jeremy.bennett@embecosm.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