Debian Codegraph @

doc/SystemTap_Beginners_Guide/testsuite/systemtap.maps/ix_clear2.exp

raw
1 # function to test error handling when reading nonexistent pmap elements
2
3 set test "ix_clear2"
4 if {![installtest_p]} { untested $test; return }
5
6
7 set pass_result {foo\[1\] = 1 1*ERROR: empty aggregate*}
8
9
10 foreach runtime [get_runtime_list] {
11 # spawn test
12 set testname $test
13 if {$runtime != ""} {
14 spawn stap --runtime=$runtime $srcdir/$subdir/$test.stp
15 lappend testname "($runtime)"
16 } else {
17 spawn stap $srcdir/$subdir/$test.stp
18 }
19 expect {
20 -timeout 150
21 $pass_result {
22 pass "$testname passed"
23 }
24 timeout {
25 kill -INT -[exp_pid] 2
26 fail "$testname timed out"
27 }
28 eof {
29 fail "$testname unexpected EOF" }
30 -re "semantic error:" { fail "$testname compilation" }
31 }
32 catch { close }
33 wait
34 }