blob: 619c91a55176bfe27fc9da41e68c6e122c5db370 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
set test "stmt_rel"
set line1 ""
spawn stap -l "kernel.statement(\"bio_init@fs/bio.c+2\")"
expect {
-timeout 180
-re {[0-9][0-9][0-9]} { regexp "\[0-9\]\[0-9\]\[0-9\]" $expect_out(0,string) line1; }
timeout { fail "$test C (timeout)" }
eof { }
}
set line2 ""
spawn stap -l "kernel.statement(\"bio_init@fs/bio.c+3\")"
expect {
-timeout 180
-re {[0-9][0-9][0-9]} { regexp "\[0-9\]\[0-9\]\[0-9\]" $expect_out(0,string) line2; }
timeout { fail "$test C (timeout)" }
eof { }
}
if { $line1 < $line2 } {
pass "$test line numbers"
} else {
fail "$test line numbers"
}
set ok 0
spawn stap -l "kernel.statement(\"bio_init@fs/bio.c:*\")"
expect {
-timeout 180
-re {[0-9][0-9][0-9]} { incr ok; exp_continue }
timeout { fail "$test C (timeout)" }
eof { }
}
# bio_init drifts a bit in different kernels.
# maybe 3, 4 or 15 lines in it.
if { $ok >= 3 } {
pass "$test wildcard"
} else {
fail "$test wildcard ($ok)"
}
|