Debian Codegraph @

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

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