blob: f3048c8a9ece9dfb646ad1e5e49ae5a31b8bf605 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
set test "skip tracking"
if {! [installtest_p]} { untested $test; return }
set nr_cpus [exec sh -c "grep ^processor /proc/cpuinfo | wc -l"]
if {$nr_cpus < 2} { unsupported $test; return }
set ok 0
spawn stap -e "probe timer.s(5) {exit()} probe timer.profile,syscall.* {f++} global f" -DMAXTRYLOCK=0 -tu
expect {
-timeout 30
-re {^WARNING: Number of errors: 0, skipped probes: [0-9]+\r\n} { incr ok; exp_continue }
-re {^WARNING: Skipped due to global .f. lock timeout: [0-9]+\r\n} { incr ok; exp_continue }
-re {^probe timer.profile[^\r\n]+, hits: [0-9]+[^\r\n]+\r\n} { incr ok; exp_continue }
eof { }
timeout { fail "$test (timeout)" }
}
catch {close}
catch {wait}
if {$ok >= 3} { pass "$test ($nr_cpus $ok)" } else { fail "$test ($nr_cpus $ok)" }
|