| 1 |
set test "skip tracking" |
| 2 |
|
| 3 |
if {! [installtest_p]} { untested $test; return } |
| 4 |
|
| 5 |
set nr_cpus [exec sh -c "grep ^processor /proc/cpuinfo | wc -l"] |
| 6 |
if {$nr_cpus < 2} { unsupported $test; return } |
| 7 |
|
| 8 |
# See PR13332 skipped.exp testcase can freeze processes/system |
| 9 |
untested "$test PR13332 skipped.exp testcase can freeze processes/system" |
| 10 |
return |
| 11 |
|
| 12 |
set script { |
| 13 |
global f |
| 14 |
probe timer.profile { f++; snooze() } |
| 15 |
function snooze() %{ udelay(10000); %} |
| 16 |
} |
| 17 |
|
| 18 |
set errs 0 |
| 19 |
set warns 0 |
| 20 |
set oks 0 |
| 21 |
spawn stap -e $script -DMAXTRYLOCK=0 -DSTP_NO_OVERLOAD -tug |
| 22 |
expect { |
| 23 |
-timeout 60 |
| 24 |
-re {^ERROR: Skipped too many probes, check MAXSKIPPED or try again with stap -t for more details.\r\n} { incr errs; exp_continue } |
| 25 |
-re {^WARNING: Number of errors: 0, skipped probes: [0-9]+\r\n} { incr warns; exp_continue } |
| 26 |
-re {^WARNING: Skipped due to global .f. lock timeout: [0-9]+\r\n} { incr warns; exp_continue } |
| 27 |
-re {^[^\r\n]*probe hit report:[ ]*\r\n} { exp_continue } |
| 28 |
-re {^timer.profile[^\r\n]+, hits: [0-9]+[^\r\n]+\r\n} { incr oks; exp_continue } |
| 29 |
eof { } |
| 30 |
timeout { fail "$test (timeout)" } |
| 31 |
} |
| 32 |
catch {close} |
| 33 |
catch {wait} |
| 34 |
|
| 35 |
if {$oks >= 1 && $warns == 2 && $errs == 1} { pass "$test ($nr_cpus $oks $warns $errs)" } else { fail "$test ($nr_cpus $oks $warns $errs)" } |