[PATCH v5 1/2] gdb: testsuite: print explicit test result in can_spawn_for_attach

Tiezhu Yang
2022-02-23T02:45:47Z

In the current code, there is no test result when execute the following
commands:

$ make check-gdb TESTS="gdb.base/attach-pie-noexec.exp" RUNTESTFLAGS="--target_board=remote-gdbserver-on-localhost"
$ make check-gdb TESTS="gdb.base/attach-pie-noexec.exp" RUNTESTFLAGS="--target_board=native-gdbserver"

It is better to print explicit test result in can_spawn_for_attach.

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
gdb/testsuite/lib/gdb.exp | 2 ++
1 file changed, 2 insertions(+)

diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 0cec467..7e064e2 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -5067,6 +5067,7 @@ proc can_spawn_for_attach { } {
# back the pid of the program. On remote boards, that would give
# us instead the PID of e.g., the ssh client, etc.
if [is_remote target] then {
+ unsupported "skip attach tests (target is remote)"
return 0
}

@@ -5074,6 +5075,7 @@ proc can_spawn_for_attach { } {
# stub-like, where GDB finds the program already started on
# initial connection.
if {[target_info exists use_gdb_stub]} {
+ unsupported "skip attach tests (target is stub)"
return 0
}

--
2.1.0