Debian Codegraph @

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

raw
1 set test "kernel_user_var"
2
3 if {! [installtest_p]} { untested "$test"; return }
4
5 set stap_path $env(SYSTEMTAP_PATH)/stap
6 set stpfile "$srcdir/$subdir/$test.stp"
7
8 set ok 0
9 set notok 0
10 spawn $stap_path $stpfile
11 expect {
12 -timeout 180
13 -re {->} { incr ok; exp_continue }
14 -re {0x} { incr notok; exp_continue }
15 eof { }
16 }
17 catch {close}; catch {wait}
18 if {$ok != 0 && $notok == 0} {
19 # A user space string should be interpreted
20 pass "$test"
21 } elseif {$notok != 0} {
22 # A user space string was not interpreted; only address displayed
23 fail "$test"
24 } else {
25 # The probe did not produce output
26 untested "$test"
27 }
28