Debian Codegraph @

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

raw
1 # Simple function to test maps of ints containing ints
2
3 # modifying maps while in a foreach should produce a compilation error.
4
5 set test foreach_fail
6 if {![installtest_p]} { untested $test; return }
7
8 foreach runtime [get_runtime_list] {
9 set testname $test
10 if {$runtime != ""} {
11 spawn stap --runtime=$runtime $srcdir/$subdir/$test.stp
12 lappend testname "($runtime)"
13 } else {
14 spawn stap $srcdir/$subdir/$test.stp
15 }
16 expect {
17 -timeout 60
18 timeout {
19 fail "$testname timed out" }
20 eof {
21 fail "$testname unexpected EOF" }
22 -re "semantic error:" { pass "$testname correctly failed to compile" }
23 }
24 catch { close }; catch { wait }
25 }