From: Tom de Vries Date: Wed, 8 Jan 2025 15:07:08 +0000 (+0100) Subject: [gdb/testsuite] Require can_spawn_for_attach in gdb.base/gstack.exp X-Git-Tag: binutils-2_44~233 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3573490bf0e5d2c550cebed5f4e1a8be0fab2c71;p=thirdparty%2Fbinutils-gdb.git [gdb/testsuite] Require can_spawn_for_attach in gdb.base/gstack.exp I ran test-case gdb.base/gstack.exp on a machine with kernel.yama.ptrace_scope set to 1 and ran into: ... PASS: gdb.base/gstack.exp: spawn gstack ptrace: Operation not permitted.^M GSTACK-END^M PASS: gdb.base/gstack.exp: gstack exits with no error PASS: gdb.base/gstack.exp: gstack's exit status is 0 FAIL: gdb.base/gstack.exp: got backtrace ... Fix this by requiring can_spawn_for_attach. Tested on x86_64-linux. --- diff --git a/gdb/testsuite/gdb.base/gstack.exp b/gdb/testsuite/gdb.base/gstack.exp index 1ad1402e2be..f603f2b4ea3 100644 --- a/gdb/testsuite/gdb.base/gstack.exp +++ b/gdb/testsuite/gdb.base/gstack.exp @@ -14,6 +14,8 @@ # along with this program. If not, see . require !gdb_protocol_is_remote +require can_spawn_for_attach + standard_testfile if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug}] == -1} {