summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.base/onoffprobe.stp
diff options
context:
space:
mode:
authorfche <fche>2008-01-15 03:34:56 +0000
committerfche <fche>2008-01-15 03:34:56 +0000
commitd94d159d9524a9b705c2704ca15b5014a24c923e (patch)
treebdf8d0a0c8c079df44221373e2b87d4ce4bdb439 /testsuite/systemtap.base/onoffprobe.stp
parentd97870325d227b4c51e616a3d2ff8a521d89829f (diff)
downloadsystemtap-steved-d94d159d9524a9b705c2704ca15b5014a24c923e.tar.gz
systemtap-steved-d94d159d9524a9b705c2704ca15b5014a24c923e.tar.xz
systemtap-steved-d94d159d9524a9b705c2704ca15b5014a24c923e.zip
PR 4935. * systemtap.base/onoffprobe.*: Toughen test.
Diffstat (limited to 'testsuite/systemtap.base/onoffprobe.stp')
-rw-r--r--testsuite/systemtap.base/onoffprobe.stp23
1 files changed, 17 insertions, 6 deletions
diff --git a/testsuite/systemtap.base/onoffprobe.stp b/testsuite/systemtap.base/onoffprobe.stp
index 11968540..f7169039 100644
--- a/testsuite/systemtap.base/onoffprobe.stp
+++ b/testsuite/systemtap.base/onoffprobe.stp
@@ -1,34 +1,45 @@
-global switch=0
+global switch=-1
#begin probe
+probe begin if (switch==-1) {
+ log("begin1 probed");
+}
+
probe begin if (switch==0) {
- log("begin probed\n");
+ log("begin2 probed");
}
#dwarf probe (return)
probe kernel.function("sys_write").return if (switch == 1) {
- log("function return probed\n")
+ log("function return probed")
switch = 0
}
#dwarf probe (entry)
probe kernel.function("sys_write") if (switch == 2) {
- log("function entry probed\n")
+ log("function entry probed")
switch = 0
}
#timer probe
probe timer.s(1) if (switch == 3) {
- log("timer probed\n")
+ log("timer probed")
switch = 0
}
#profile probe
probe timer.profile if (switch == 4) {
- log("profile probed\n")
+ log("profile probed")
switch = 0
}
+# aliasess
+probe alias.one.a = timer.s(2) if (switch == 5) { print("alias.one.a and") }
+probe alias.one.b = timer.s(3) if (switch == 6) { print("alias.one.b and") }
+probe alias.one = alias.one.* if (switch >= 5 && switch < 7) { print(" alias.one and") }
+probe alias.two = timer.s(4) if (switch == 7) { print("alias.two and") }
+probe alias.* if (switch) { log(" alias.* probed") }
+
probe procfs("switch").write {
switch = strtol($value, 10)
}