Debian Codegraph @

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

raw
1 # test of histogram with interval = 0 (error)
2
3 set test "linear_0"
4
5 if {![installtest_p]} { untested $test; return }
6
7 set script $srcdir/$subdir/$test.stp
8 foreach runtime [get_runtime_list] {
9 set ok 0
10 set testname $test
11 if {$runtime != ""} {
12 spawn stap -DMAXACTION=10000 --runtime=$runtime $script
13 lappend testname "($runtime)"
14 } else {
15 spawn stap -DMAXACTION=10000 $script
16 }
17 expect {
18 -timeout 150
19 "WARNING: histogram: interval cannot be zero." {
20 incr ok
21 exp_continue
22 }
23 eof { }
24 }
25 catch close
26 wait
27
28 if {$ok == 1} {
29 pass $testname
30 } else {
31 fail $testname
32 }
33 }