gdb: testsuite: print explicit test result in can_spawn_for_attach
authorTiezhu Yang <yangtiezhu@loongson.cn>
Tue, 1 Mar 2022 07:03:00 +0000 (15:03 +0800)
committerTiezhu Yang <yangtiezhu@loongson.cn>
Tue, 1 Mar 2022 07:21:11 +0000 (15:21 +0800)
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

index 2688a8e039440b05abd15c7d8068070d12bccc00..8fafcc03a1828d0654cdba46e9ed8203aeae5fee 100644 (file)
@@ -5086,6 +5086,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
     }
 
@@ -5093,6 +5094,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
     }