]> sourceware.org Git - systemtap.git/blame - testsuite/systemtap.samples/primes.exp
2007-06-18 Martin Hunt <hunt@redhat.com>
[systemtap.git] / testsuite / systemtap.samples / primes.exp
CommitLineData
814bc89d
FCE
1set test "primes"
2if {![installtest_p]} { untested $test; return }
3
4spawn stap $srcdir/$subdir/primes.stp
5set ok 0
6expect {
59cbc061 7 -timeout 150
814bc89d
FCE
8 -ex {odds[0] = 1} { incr ok; exp_continue }
9 -ex {odds[1] = 3} { incr ok; exp_continue }
10 -ex {odds[3] = 7} { incr ok; exp_continue }
11 -ex {odds[4] = 9} { incr ok; exp_continue }
12 -ex {evens[2] = 6} { incr ok; exp_continue }
13 -ex {evens[1] = 4} { incr ok; exp_continue }
14 -ex {evens[0] = 2} { incr ok; exp_continue }
15 timeout { fail "$test (timeout)" }
16 eof { }
17}
18#FIXME does not handle case of hanging primes.stp correctly
19wait
20
21if {$ok == 7} { pass "$test" } { fail "$test" }
This page took 0.032563 seconds and 5 git commands to generate.