Debian Codegraph @

doc/SystemTap_Beginners_Guide/testsuite/systemtap.bpf/bpf_tests/next.stp

raw
1 // for pr24659
2
3 global value//=2
4 global status//=2
5
6 probe begin {
7 println("BEGIN")
8 value = 2
9 status = 2
10 }
11
12 probe kernel.function("vfs_read") {
13 status = 0
14 if (value == 2) next
15 status = 1
16 }
17
18 probe kernel.function("vfs_read") {
19 printf("vfs_read\n")
20 printf("value %d\n", value)
21 printf("status %d\n", status)
22 if (status != 2) exit()
23 }
24
25 probe end {
26 printf("end\n")
27 printf("value %d\n", value)
28 printf("status %d\n", status)
29 if (status)
30 println("END FAIL")
31 else
32 println("END PASS")
33 }