set test "onoffprobe" if {![installtest_p]} { untested $test; return } spawn stap $srcdir/$subdir/$test.stp -m $test set pid $spawn_id set ok 0 proc advance {} { global test global expect_out global ok pass "$test $expect_out(1,string)" incr ok exec echo $ok > /proc/systemtap/$test/switch exec echo dummy > /dev/null exp_continue } expect { -timeout 240 -re "(begin1 probed)\r\n" { advance } -re "^(function return probed)\r\n" { advance } -re "^(function entry probed)\r\n" { advance } -re "^(timer probed)\r\n" { advance } -re "^(profile probed)\r\n" { advance } -re "^(alias\.one\.a and alias\.one and alias\.\* probed)\r\n" { advance } -re "^(alias\.one\.b and alias\.one and alias\.\* probed)\r\n" { advance } -re "^(alias\.two and alias\.\* probed)\r\n" { pass "$test $expect_out(1,string)" incr ok } timeout { fail "$test (timeout)" } eof { } } exec kill -INT -[exp_pid] #FIXME does not handle case of hanging pfaults.stp correctly wait exec rm -f $test.ko if {$ok != 8} {fail "conditional probes ($ok)"}