From: Tom de Vries Date: Fri, 22 Nov 2024 12:37:24 +0000 (+0100) Subject: [gdb/testsuite] Require local host in gdb.base/bg-exec-sigint-bp-cond.exp X-Git-Tag: gdb-16-branchpoint~368 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2e61ad32abe8b8f89ba899fe9eff7856bee74cce;p=thirdparty%2Fbinutils-gdb.git [gdb/testsuite] Require local host in gdb.base/bg-exec-sigint-bp-cond.exp I noticed that gdb.base/bg-exec-sigint-bp-cond.exp fails for remote host (concretely, host board local-remote-host and target board remote-gdbserver-on-localhost): ... (gdb) c&^M Continuing.^M (gdb) bash: line 0: kill: (23834) - Operation not permitted^M ^M Breakpoint 2, foo () at bg-exec-sigint-bp-cond.c:23^M 23 return 0;^M ... due to getting gdb's pid like this: ... set gdb_pid [exp_pid -i [board_info host fileid]] ... For remote host using ssh, this returns the pid of the ssh session on build. Fix this by requiring local host. Tested on x86_64-linux. --- diff --git a/gdb/testsuite/gdb.base/bg-exec-sigint-bp-cond.exp b/gdb/testsuite/gdb.base/bg-exec-sigint-bp-cond.exp index 7168a7305c1..79e2177c55e 100644 --- a/gdb/testsuite/gdb.base/bg-exec-sigint-bp-cond.exp +++ b/gdb/testsuite/gdb.base/bg-exec-sigint-bp-cond.exp @@ -16,6 +16,10 @@ # Check that sending GDB a SIGINT while handling execution control # does not interrupt the execution control. +# The way we get the pid of gdb doesn't work with remote host. We get the +# pid of the ssh session on build instead. +require {!is_remote host} + standard_testfile if {[build_executable "failed to prepare" $testfile $srcfile debug]} {