testsuite/systemtap.printf/autoprint.exp
raw| 1 | set test "autoprint.exp" |
| 2 | set script_1 {probe process.function("main") { a=$argv; b=$argc; exit() } global a, b} |
| 3 | set script_2 {stap -e "probe begin { exit() }"} |
| 4 | |
| 5 | set ok 0 |
| 6 | |
| 7 | spawn stap -e $script_1 -c $script_2 |
| 8 | expect { |
| 9 | "a=0x" { incr ok ; exp_continue } |
| 10 | -re "b=\[0-9\](?!x)" {incr ok ; exp_continue} |
| 11 | } |
| 12 | |
| 13 | if { $ok == 2 } { pass "$test" } { fail "$test" } |
| 14 |