mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 18:13:01 +00:00
This test verifies that GDB can interrupt a process with all threads
blocked in a long select syscall.
The test used to terminate by having GDB modifying the select argument.
However, modifying the select argument works only for specific arch
and/or specific versions of glibc.
The test then blocks on other architectures/glibc versions.
The previous version of the test was:
* first launching sleepers so as to have all threads blocked in long select
* interrupting these threads
* changing the select time arg so that the threads burn cpu
* and then change variables to have the program exit.
The new version does:
* first launches sleepers so that all threads are burning cpu.
* interrupting these threads
* change the local variables of sleepers so that the threads will
block in a long select syscall
* interrupt these threads
* kill the program.
With this new version, we still check the behaviour of gdb+vgdbserver
for both burning and sleep threads, but without having the termination
depending on modifying select syscall argument.
Tested on debian amd64 and on ubuntu arm64 (to check the test does not hang
on an arm64 platform).
22 lines
871 B
Plaintext
22 lines
871 B
Plaintext
# test :
|
|
# info threads valgrind specific output
|
|
# the user can control-c an process with all threads in WaitSys
|
|
# and modify some variables
|
|
# the user can control-c an process with all threads in Running/Yielding
|
|
# and modify some variables
|
|
# sleepers is started so that it burns CPU.
|
|
# We then interrupt the process.
|
|
# We modify variables so that instead of burning cpu, sleepers blocks
|
|
# all threads in a select syscall.
|
|
prog: sleepers
|
|
args: 1000000000 0 100000 BSBSBSBS 1
|
|
vgopts: --tool=none --vgdb=yes --vgdb-error=0 --vgdb-prefix=./vgdb-prefix-nlcontrolc
|
|
stderr_filter: filter_stderr
|
|
# Bug 338633 nlcontrol hangs on arm64 currently.
|
|
prereq: test -e gdb -a -f vgdb.invoker && ! ../tests/os_test solaris
|
|
progB: gdb
|
|
argsB: --quiet -l 60 --nx ./sleepers
|
|
stdinB: nlcontrolc.stdinB.gdb
|
|
stdoutB_filter: filter_gdb
|
|
stderrB_filter: filter_make_empty
|