FreeBSD regtest: broaden unknown suppression
[valgrind.git] / gdbserver_tests / nlcontrolc.stdinB.gdb
blobea4fcd530d4d7730e7b806c8e6daac13fe259d63
1 # connect gdb to Valgrind gdbserver:
2 target remote | ./vgdb --wait=60 --vgdb-prefix=./vgdb-prefix-nlcontrolc
3 echo vgdb launched process attached\n
4 monitor v.set vgdb-error 999999
7 # simulate control-c in a few seconds
8 shell ./simulate_control_c --vgdb-prefix=./vgdb-prefix-nlcontrolc 1 grep main nlcontrolc.stderr.out
10 continue
12 # Threads are burning cpu now
13 # We would like to fully test info threads here, but which thread are Runnable
14 # or Yielding is unpredictable. With a recent enough gdb, check the nr of
15 # threads by state using pipe commands and grep/wc.
16 init-if-undefined $_gdb_major = 0
17 init-if-undefined $_gdb_minor = 0
18 if $_gdb_major >= 9
19   | info threads | grep VgTs_Runnable | wc -l
20   | info threads | grep VgTs_Yielding | wc -l
21 else
22   echo 1\n
23   echo 3\n
24 end
25 # We change the variables so that all the threads are blocked in a syscall
26 p burn = 0
27 p sleepms = 1000000
30 shell ./simulate_control_c --vgdb-prefix=./vgdb-prefix-nlcontrolc 1 grep changed nlcontrolc.stdoutB.out
32 echo changed burning parameters to sleeping parameters\n
33 continue
34 # Here, all tasks should be blocked in a loooonnnng select, all in WaitSys
35 info threads
36 # We reset the sleepms to 0. The threads should still be blocked in the syscall
37 p sleepms = 0
38 shell ./simulate_control_c --vgdb-prefix=./vgdb-prefix-nlcontrolc 1 grep reset nlcontrolc.stdoutB.out
40 echo reset to sleeping parameters\n
41 continue
42 # threads should still be blocked in a loooonnnng select, all in WaitSys
43 info threads
44 if $_gdb_major >= 9
45   | info threads | grep VgTs_WaitSys | wc -l
46 else
47   echo 4\n
48 end
49 # Make the process die.
50 kill
51 quit