1# connect gdb to Valgrind gdbserver:
2target remote | ../vgdb --wait=60 --vgdb-prefix=./vgdb-prefix-solaris-nlcontrolc
3echo vgdb launched process attached\n
4monitor v.set vgdb-error 999999
5#
6#
7# simulate control-c in a few seconds
8shell ../simulate_control_c --vgdb-prefix=./vgdb-prefix-solaris-nlcontrolc 1 grep main nlcontrolc.stderr.out
9#
10continue
11#
12# Here, all tasks should be blocked in a loooonnnng select, all in WaitSys
13info threads
14# After the timeout expires, threads will unblock.
15#
16# We will change the burning parameters in a few seconds
17shell ../simulate_control_c --vgdb-prefix=./vgdb-prefix-solaris-nlcontrolc 6 grep CPU nlcontrolc.stdoutB.out
18#
19echo Now threads are burning CPU\n
20continue
21#
22# Threads are burning cpu now
23# We would like to test info threads here, but which thread are Runnable or Yielding
24# is unpredictable.
25# info threads
26p burn = 0
27p loops = 0
28p report_finished = 0
29continue
30# and the process should stop very quickly now
31quit
32