aboutsummaryrefslogtreecommitdiff
path: root/gdb/make-target-delegates.py
diff options
context:
space:
mode:
authorTiezhu Yang <yangtiezhu@loongson.cn>2022-03-01 15:05:00 +0800
committerTiezhu Yang <yangtiezhu@loongson.cn>2022-03-01 15:21:16 +0800
commit1dbf27133db434d1fb3e8e8bf9c3e402cc23a293 (patch)
tree4eaa7809ba85b8cadd81d10c9fd98d5b0d99a09f /gdb/make-target-delegates.py
parent863cd1c236deac344743156b58e28e79a7677e6f (diff)
downloadbinutils-1dbf27133db434d1fb3e8e8bf9c3e402cc23a293.zip
binutils-1dbf27133db434d1fb3e8e8bf9c3e402cc23a293.tar.gz
binutils-1dbf27133db434d1fb3e8e8bf9c3e402cc23a293.tar.bz2
gdb: testsuite: fix wrong expected result in attach-pie-noexec.exp
If /proc/sys/kernel/yama/ptrace_scope is 1, when execute the test case gdb.base/attach-pie-noexec.exp without superuser, the gdb.log shows the following info: (gdb) attach 6500 Attaching to process 6500 ptrace: Operation not permitted. (gdb) PASS: gdb.base/attach-pie-noexec.exp: attach It is obviously wrong, the expected result should be UNSUPPORTED in such a case. It is better to make can_spawn_for_attach to return false for this case. It would have to setup a small test program, compile it to exec, spawn it and try to attach to it. With this patch, we can see "Operation not permitted" in the log info, and then we can do the following processes to test: (1) set ptrace_scope as 0 $ echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope $ make check-gdb TESTS="gdb.base/attach-pie-noexec.exp" (2) use sudo $ sudo make check-gdb TESTS="gdb.base/attach-pie-noexec.exp" Additionally, handle the other cases when test with RUNTESTFLAGS= "--target_board=native-extended-gdbserver". Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Diffstat (limited to 'gdb/make-target-delegates.py')
0 files changed, 0 insertions, 0 deletions