diff options
author | Pedro Alves <palves@redhat.com> | 2015-11-30 16:05:19 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2015-11-30 18:40:07 +0000 |
commit | 09df4675f2e4f8f098954f9a38f44d12089f1c4e (patch) | |
tree | a80fcd74e40003df85edc07150f309f1a8aae24c | |
parent | 56cf4bed5354769d7352c5cf4e054a346d2553cd (diff) | |
download | gdb-09df4675f2e4f8f098954f9a38f44d12089f1c4e.zip gdb-09df4675f2e4f8f098954f9a38f44d12089f1c4e.tar.gz gdb-09df4675f2e4f8f098954f9a38f44d12089f1c4e.tar.bz2 |
Make dprintf-non-stop.exp cope with remote testing
Testing with the extended-remote board with "maint set target-non-stop
on" shows a dprintf-non-stop.exp regression. The issue is simply that
the test is expecting output that is only valid for the native target:
native:
[process 8676] #1 stopped.
remote:
[Thread 8900.8900] #1 stopped.
In order to expose this without "maint set target-non-stop on", this
restarts gdb with non-stop mode already enabled.
gdb/testsuite/ChangeLog:
2015-11-30 Pedro Alves <palves@redhat.com>
* gdb.base/dprintf-non-stop.exp: Use build_executable instead of
prepare_for_testing. Start gdb with "set non-stop on" appended to
GDBFLAGS. Lax expected stop output.
-rw-r--r-- | gdb/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/dprintf-non-stop.exp | 10 |
2 files changed, 13 insertions, 3 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 2fddb7c..02a9a07 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2015-11-30 Pedro Alves <palves@redhat.com> + + * gdb.base/dprintf-non-stop.exp: Use build_executable instead of + prepare_for_testing. Start gdb with "set non-stop on" appended to + GDBFLAGS. Lax expected stop output. + 2015-11-27 Yao Qi <yao.qi@linaro.org> * gdb.arch/arm-neon.exp: New. diff --git a/gdb/testsuite/gdb.base/dprintf-non-stop.exp b/gdb/testsuite/gdb.base/dprintf-non-stop.exp index 4e3e5bc..5b878aa 100644 --- a/gdb/testsuite/gdb.base/dprintf-non-stop.exp +++ b/gdb/testsuite/gdb.base/dprintf-non-stop.exp @@ -20,13 +20,17 @@ if [is_remote target] then { } standard_testfile +set executable ${testfile} -if [prepare_for_testing "failed to prepare for dprintf with non-stop" \ +if [build_executable "failed to prepare for dprintf with non-stop" \ ${testfile} ${srcfile} {debug}] { return -1 } -gdb_test_no_output "set non-stop on" +save_vars { GDBFLAGS } { + append GDBFLAGS " -ex \"set non-stop on\"" + clean_restart ${executable} +} if ![runto main] { fail "Can't run to main" @@ -60,7 +64,7 @@ gdb_test_multiple $test $test { set test "inferior stopped" gdb_test_multiple "" $test { - -re "\r\n\\\[.* \[0-9\]+\\\] #1 stopped\\\.\r\n" { + -re "\r\n\\\[.*\\\] #1 stopped\\\.\r\n" { pass $test } } |