Debian Codegraph @

doc/SystemTap_Beginners_Guide/testsuite/systemtap.base/pr19525.exp

raw
1 set test "pr19525"
2
3 # This tests that stap doesn't stall per PR19525
4 # Note that `stap -o` would break the reproducer
5 # So we use temporary folder for testing
6
7 catch {exec mktemp -d} tempd
8 set origd [pwd]
9 cd $tempd
10
11 # Test PR19525
12 set num 0
13 spawn bash -c "stap --poison-cache -vbe 'probe begin { exit() }' 2>&1"
14 expect {
15 -timeout 60
16 -re {^Pass [1-4]:[^\r\n]*\r\n} {
17 exp_continue
18 }
19 -re {^Pass 5: starting run.\r\n} {
20 exp_continue
21 }
22 -re {^Pass 5: run completed[^\r\n]*\r\n} {
23 incr num
24 exp_continue
25 }
26 }
27 catch {close}; catch {wait}
28
29 if {$num == 1} then {
30 pass "$test"
31 } else {
32 fail "$test ($num)"
33 }
34
35 # Remove temporary directory
36 cd $origd
37 file delete -force -- $tempd