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)" }