| 1 |
# Simple function to test that pp() and pn() work |
| 2 |
|
| 3 |
proc opener {} { # the test uses syscall.open -- make sure it happens |
| 4 |
exec cat /dev/null |
| 5 |
exec cat /dev/null |
| 6 |
wait_n_secs 1 |
| 7 |
return 0; |
| 8 |
} |
| 9 |
|
| 10 |
set test "pp" |
| 11 |
set file $srcdir/$subdir/pp.stp |
| 12 |
set output_string "((kernel|kprobe)\\.function\[^\r\n]*\r\n)+systemtap test success\r\n" |
| 13 |
stap_run $test opener $output_string $file $test |
| 14 |
|
| 15 |
# NB: we may hit one or both, open and openat, depending on other system activity |
| 16 |
set test "pn" |
| 17 |
set output_string "(syscall\\.open(at)?\r\n){1,2}systemtap test success\r\n" |
| 18 |
stap_run $test opener $output_string $file $test |