doc/SystemTap_Beginners_Guide/testsuite/systemtap.base/timeout.exp
raw| 1 | set test "timeout option" |
| 2 | if {![installtest_p]} {untested $test; return} |
| 3 | |
| 4 | set success 0 |
| 5 | verbose -log "Running stap -T 1 -e \'probe end {println(\"terminated\")}\'" |
| 6 | spawn stap -T 1 -e "probe end {println(\"terminated\")}" |
| 7 | expect { |
| 8 | -timeout 20 |
| 9 | -re "terminated" {incr success} |
| 10 | } |
| 11 | catch { close }; catch { wait } |
| 12 | if {$success == 1} {pass $test} {fail $test} |