summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.samples/pfaults.exp
blob: 7675078c4929a59428efa2d19108bab9b3a46312 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
set test "pfaults"
if {![installtest_p]} { untested $test; return }

spawn stap -g $srcdir/$subdir/pfaults.stp
set pid $spawn_id
set ok 0
expect {
  -timeout 240
  -re {Page fault tracking, start time[^\r\n]+\r\n} { incr ok; exp_continue }
  -re {Page fault tracking, end time[^\r\n]+\r\n} { incr ok; exp_continue }
    timeout { fail "$test (timeout)" }
    eof { }
}
#FIXME does not handle case of hanging pfaults.stp correctly
wait
if {$ok == 2} { pass "$test ($ok)" } { fail "$test ($ok)" }