| 1 |
# Check that perf/timer probes trigger in both kernel and user space. |
| 2 |
set test "pt_user_mode" |
| 3 |
|
| 4 |
if {! [installtest_p]} { untested "$test"; return } |
| 5 |
# Notice we don't need to check for perf probe support (perf_probes_p) |
| 6 |
# here, since perf probes are optional in the script. |
| 7 |
|
| 8 |
set effective_pid [exec /usr/bin/id -u] |
| 9 |
if { $effective_pid != 0 } { |
| 10 |
untested "$test (perf probes require root access)" |
| 11 |
return |
| 12 |
} |
| 13 |
|
| 14 |
proc run_test_load {} { |
| 15 |
# do something silly that uses both user and kernel time. |
| 16 |
catch { exec dd if=/dev/zero of=/dev/null bs=17 count=502432 conv=ebcdic } |
| 17 |
return 0 |
| 18 |
} |
| 19 |
|
| 20 |
stap_run $test run_test_load $all_pass_string $srcdir/$subdir/$test.stp |