]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
[gdb/testsuite] Handle ptrace operation not permitted in can_spawn_for_attach
authorTom de Vries <tdevries@suse.de>
Mon, 6 May 2024 12:27:09 +0000 (14:27 +0200)
committerTom de Vries <tdevries@suse.de>
Mon, 6 May 2024 12:27:09 +0000 (14:27 +0200)
commit147fe7f9fb9a89b217d11d73053f53e8edacf90f
tree8640ea8b8f2345cbc947483ca8c3b53b2a281965
parent5edbb6ed920057df4cca423e3fc54f27f7685def
[gdb/testsuite] Handle ptrace operation not permitted in can_spawn_for_attach

When running the testsuite on a system with kernel.yama.ptrace_scope set to 1,
we run into attach failures.

Fix this by recognizing "ptrace: Operation not permitted" in
can_spawn_for_attach.

Tested on aarch64-linux and x86_64-linux.

Approved-By: Pedro Alves <pedro@palves.net>
gdb/testsuite/gdb.base/break-interp.exp
gdb/testsuite/gdb.base/dprintf-detach.exp
gdb/testsuite/gdb.base/run-control-while-bg-execution.exp
gdb/testsuite/gdb.multi/attach-while-running.exp
gdb/testsuite/gdb.threads/attach-into-signal.exp
gdb/testsuite/gdb.threads/attach-slow-waitpid.exp
gdb/testsuite/gdb.threads/attach-stopped.exp
gdb/testsuite/gdb.threads/check-libthread-db.exp
gdb/testsuite/lib/gdb.exp