Skip to content
This repository was archived by the owner on Aug 17, 2022. It is now read-only.

Commit 09df467

Browse files
committed
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 <[email protected]> * 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.
1 parent 56cf4be commit 09df467

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

gdb/testsuite/ChangeLog

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2015-11-30 Pedro Alves <[email protected]>
2+
3+
* gdb.base/dprintf-non-stop.exp: Use build_executable instead of
4+
prepare_for_testing. Start gdb with "set non-stop on" appended to
5+
GDBFLAGS. Lax expected stop output.
6+
17
2015-11-27 Yao Qi <[email protected]>
28

39
* gdb.arch/arm-neon.exp: New.

gdb/testsuite/gdb.base/dprintf-non-stop.exp

+7-3
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,17 @@ if [is_remote target] then {
2020
}
2121

2222
standard_testfile
23+
set executable ${testfile}
2324

24-
if [prepare_for_testing "failed to prepare for dprintf with non-stop" \
25+
if [build_executable "failed to prepare for dprintf with non-stop" \
2526
${testfile} ${srcfile} {debug}] {
2627
return -1
2728
}
2829

29-
gdb_test_no_output "set non-stop on"
30+
save_vars { GDBFLAGS } {
31+
append GDBFLAGS " -ex \"set non-stop on\""
32+
clean_restart ${executable}
33+
}
3034

3135
if ![runto main] {
3236
fail "Can't run to main"
@@ -60,7 +64,7 @@ gdb_test_multiple $test $test {
6064

6165
set test "inferior stopped"
6266
gdb_test_multiple "" $test {
63-
-re "\r\n\\\[.* \[0-9\]+\\\] #1 stopped\\\.\r\n" {
67+
-re "\r\n\\\[.*\\\] #1 stopped\\\.\r\n" {
6468
pass $test
6569
}
6670
}

0 commit comments

Comments
 (0)