On 17-09-19 20:01, Tom Tromey wrote: >>>>>> "Tom" == Tom de Vries writes: > > Tom> + set res [gdb_target_cmd $gdbserver_protocol $gdbserver_gdbport] > Tom> + if { $res == 0 } { > Tom> pass $test > Tom> - } else { > Tom> + } elseif { $res == 1 } { > Tom> fail $test > Tom> + } else { > Tom> + unsupported $test > > Should this treatment be applied to the other callers of gdb_target_cmd? > The callers in the test-cases either don't check the result, or compare to 0, so there it doesn't matter. But there are uses in f.i. gdbserver-support.exp where the new value does matter, f.i. in gdbserver_run. So, I'm attaching an updated patch that does not modify the existing semantics of gdb_target_cmd. > I agree with Sergio that the patch is fine, but I wonder if a bigger > cleanup is warranted here. FWIW, I did a test run with my laptop switched into flight mode and with the loopback device removed (sudo ifconfig lo down), and found these new failures: ... FAIL: gdb.btrace/reconnect.exp: first: record btrace enable FAIL: gdb.btrace/reconnect.exp: first: stepi 19 (the program is no longer running) FAIL: gdb.btrace/reconnect.exp: first: info record FAIL: gdb.btrace/reconnect.exp: first: disconnect FAIL: gdb.btrace/reconnect.exp: second: info record FAIL: gdb.btrace/reconnect.exp: second: record stop FAIL: gdb.btrace/reconnect.exp: second: disconnect FAIL: gdb.btrace/reconnect.exp: third: info record FAIL: gdb.mi/mi-file-transfer.exp: put binary file (unexpected output) FAIL: gdb.mi/mi-file-transfer.exp: get binary file (unexpected output) FAIL: gdb.mi/mi-file-transfer.exp: compare intermediate binary file FAIL: gdb.mi/mi-file-transfer.exp: compare binary file FAIL: gdb.mi/mi-file-transfer.exp: deleted binary file (unexpected output) FAIL: gdb.server/abspath.exp: setting breakpoint at main FAIL: gdb.server/abspath.exp: continue to main (the program is no longer running) FAIL: gdb.server/connect-stopped-target.exp: non-stop=off: connect and print pc (timeout) FAIL: gdb.server/connect-stopped-target.exp: non-stop=off: print pc again FAIL: gdb.server/connect-stopped-target.exp: non-stop=on: connect and print pc (timeout) FAIL: gdb.server/connect-stopped-target.exp: non-stop=on: print pc again FAIL: gdb.server/connect-with-no-symbol-file.exp: sysroot=: action=permission: connection to GDBserver succeeded FAIL: gdb.server/connect-with-no-symbol-file.exp: sysroot=: action=delete: connection to GDBserver succeeded FAIL: gdb.server/connect-with-no-symbol-file.exp: sysroot=target:: action=permission: connection to GDBserver succeeded FAIL: gdb.server/connect-with-no-symbol-file.exp: sysroot=target:: action=delete: connection to GDBserver succeeded FAIL: gdb.server/connect-without-multi-process.exp: multiprocess=off: target remote (timeout) FAIL: gdb.server/connect-without-multi-process.exp: multiprocess=off: continue to main FAIL: gdb.server/connect-without-multi-process.exp: multiprocess=auto: target remote (timeout) FAIL: gdb.server/connect-without-multi-process.exp: multiprocess=auto: continue to main FAIL: gdb.server/ext-attach.exp: set remote exec-file FAIL: gdb.server/ext-attach.exp: monitor exit FAIL: gdb.server/ext-restart.exp: set remote exec-file FAIL: gdb.server/ext-restart.exp: monitor exit FAIL: gdb.server/ext-run.exp: set remote exec-file FAIL: gdb.server/ext-run.exp: load new file without any gdbserver inferior FAIL: gdb.server/ext-run.exp: monitor exit FAIL: gdb.server/ext-wrapper.exp: set remote exec-file FAIL: gdb.server/ext-wrapper.exp: print d FAIL: gdb.server/ext-wrapper.exp: restart: print d FAIL: gdb.server/ext-wrapper.exp: monitor exit FAIL: gdb.server/file-transfer.exp: put binary file FAIL: gdb.server/file-transfer.exp: get binary file FAIL: gdb.server/file-transfer.exp: compare intermediate binary file FAIL: gdb.server/file-transfer.exp: compare binary file FAIL: gdb.server/file-transfer.exp: deleted binary file FAIL: gdb.server/file-transfer.exp: put text file FAIL: gdb.server/file-transfer.exp: get text file FAIL: gdb.server/file-transfer.exp: compare intermediate text file FAIL: gdb.server/file-transfer.exp: compare text file FAIL: gdb.server/file-transfer.exp: deleted text file FAIL: gdb.server/no-thread-db.exp: libthread-db is now unresolvable FAIL: gdb.server/no-thread-db.exp: continue to breakpoint: after tls assignment (the program is no longer running) FAIL: gdb.server/no-thread-db.exp: print foo FAIL: gdb.server/reconnect-ctrl-c.exp: first: connect FAIL: gdb.server/reconnect-ctrl-c.exp: second: disconnect FAIL: gdb.server/reconnect-ctrl-c.exp: second: connect FAIL: gdb.server/run-without-local-binary.exp: connect to gdbserver (timeout) FAIL: gdb.server/run-without-local-binary.exp: run test program until the end FAIL: gdb.server/server-exec-info.exp: info files FAIL: gdb.server/server-kill.exp: setting breakpoint at server-kill.c:29 FAIL: gdb.server/server-kill.exp: tstatus FAIL: gdb.server/server-mon.exp: monitor help FAIL: gdb.server/server-mon.exp: monitor FAIL: gdb.server/server-mon.exp: monitor set debug 1 FAIL: gdb.server/server-mon.exp: monitor set debug 0 FAIL: gdb.server/server-mon.exp: monitor set remote-debug 1 FAIL: gdb.server/server-mon.exp: monitor set remote-debug 0 FAIL: gdb.server/server-mon.exp: monitor set debug-format all FAIL: gdb.server/server-mon.exp: monitor set debug-format none FAIL: gdb.server/server-run.exp: continue to main (the program is no longer running) FAIL: gdb.server/solib-list.exp: non-stop 0: target remote (timeout) FAIL: gdb.server/solib-list.exp: non-stop 0: continue FAIL: gdb.server/solib-list.exp: non-stop 0: p libvar FAIL: gdb.server/solib-list.exp: non-stop 1: target remote (timeout) FAIL: gdb.server/solib-list.exp: non-stop 1: continue FAIL: gdb.server/solib-list.exp: non-stop 1: p libvar FAIL: gdb.server/stop-reply-no-thread.exp: connect FAIL: gdb.server/sysroot.exp: sysroot=local: connect to remote and read binary FAIL: gdb.server/sysroot.exp: sysroot=local: setting breakpoint at main FAIL: gdb.server/sysroot.exp: sysroot=local: continue to main (got interactive prompt) FAIL: gdb.server/sysroot.exp: sysroot=local: setting breakpoint at printf FAIL: gdb.server/sysroot.exp: sysroot=local: continue to printf (the program is no longer running) FAIL: gdb.server/sysroot.exp: sysroot=remote: connect to remote and read binary FAIL: gdb.server/sysroot.exp: sysroot=remote: setting breakpoint at main FAIL: gdb.server/sysroot.exp: sysroot=remote: continue to main (got interactive prompt) FAIL: gdb.server/sysroot.exp: sysroot=remote: setting breakpoint at printf FAIL: gdb.server/sysroot.exp: sysroot=remote: continue to printf (the program is no longer running) FAIL: gdb.server/wrapper.exp: setting breakpoint at marker FAIL: gdb.server/wrapper.exp: continue to marker (the program is no longer running) FAIL: gdb.server/wrapper.exp: print d ... So, I think you're right that a larger cleanup could be done. But for now, I'd like to focus on this ipv6-specific one. Thanks, - Tom