Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andreas Arnez <arnez@linux.vnet.ibm.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 3/3] Fix a FAIL in attach.exp under native-extended-gdbserver
Date: Wed, 14 Mar 2018 16:13:00 -0000	[thread overview]
Message-ID: <1521043903-18837-4-git-send-email-arnez@linux.vnet.ibm.com> (raw)
In-Reply-To: <1521043903-18837-1-git-send-email-arnez@linux.vnet.ibm.com>

The attach.exp test case yields a FAIL with native-extended-gdbserver when
trying to start a new process.  This is because gdbserver does not support
starting new processes.  And since the gdbserver-base board file sets the
GDB command line option -ex "set auto-connect-native-target off", the
process is not started on the native target either.  An error message
results instead:

  Don't know how to run.  Try "help target".

Thus just accept this error when not running on a native target.

gdb/testsuite/ChangeLog:

	* gdb.base/attach.exp: Accept the error message "don't know how to
	run" when not running on a native target.
---
 gdb/testsuite/gdb.base/attach.exp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gdb/testsuite/gdb.base/attach.exp b/gdb/testsuite/gdb.base/attach.exp
index efec49e385..1651dc40a7 100644
--- a/gdb/testsuite/gdb.base/attach.exp
+++ b/gdb/testsuite/gdb.base/attach.exp
@@ -421,11 +421,18 @@ proc test_command_line_attach_run {} {
 
 	send_gdb "y\n"
 
+	set cantrun 0
 	set test "run to main"
 	gdb_test_multiple "" $test {
 	    -re "Temporary breakpoint .* main .*$gdb_prompt $" {
 		pass $test
 	    }
+	    -re "Don't know how to run..*$gdb_prompt $" {
+		set cantrun 1
+	    }
+	}
+	if { $cantrun && [gdb_is_target_native] } {
+	    fail $test
 	}
 
 	# Get rid of the process
-- 
2.14.3


  reply	other threads:[~2018-03-14 16:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-14 16:12 [PATCH 0/3] Some gdbserver test suite fixes Andreas Arnez
2018-03-14 16:13 ` Andreas Arnez [this message]
2018-03-15 22:17   ` [PATCH 3/3] Fix a FAIL in attach.exp under native-extended-gdbserver Simon Marchi
2018-04-25  9:32     ` Andreas Arnez
2018-03-14 16:13 ` [PATCH 2/3] Testsuite: Rename "end()" to avoid libinproctrace C++ symbol clash Andreas Arnez
2018-03-15 21:58   ` Simon Marchi
2018-03-16 19:47     ` Andreas Arnez
2018-03-16 21:57       ` Simon Marchi
2018-03-19 12:15         ` Andreas Arnez
2018-03-26 14:44       ` Pedro Alves
2018-03-14 16:13 ` [PATCH 1/3] Fix tspeed test case: copy libinproctrace to target Andreas Arnez
2018-03-15 21:40   ` Simon Marchi
2018-03-16 19:41     ` Andreas Arnez

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=1521043903-18837-4-git-send-email-arnez@linux.vnet.ibm.com \
    --to=arnez@linux.vnet.ibm.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