doc/SystemTap_Beginners_Guide/testsuite/systemtap.base/bz1126645.exp
raw| 1 | set test bz1126645 |
| 2 | |
| 3 | if {! [installtest_p]} { return } |
| 4 | if {[expr 0 != [exec id -u]]} { |
| 5 | untested "${test} (non-root)" |
| 6 | return |
| 7 | } |
| 8 | |
| 9 | spawn stap -c {/bin/true} -e {probe kprocess.exec_complete {println("return")}} |
| 10 | set ok 0 |
| 11 | expect { |
| 12 | -timeout 60 |
| 13 | -re {^return\r\n} { incr ok; exp_continue } |
| 14 | timeout { fail "$test (timeout)" } |
| 15 | eof { } |
| 16 | } |
| 17 | catch { close }; catch { wait } |
| 18 | if {$ok == 1} then { pass "$test -p5" } else { fail "$test -p5 ($ok)" } |
| 19 |