From 543b26ed48ac66743ad309ac6cb848a5d377260f Mon Sep 17 00:00:00 2001 From: Ananth N Mavinakayanahalli Date: Tue, 21 Apr 2009 17:19:15 +0530 Subject: Add testcases for kprobe.function family --- testsuite/systemtap.base/kprobes.stp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 testsuite/systemtap.base/kprobes.stp (limited to 'testsuite/systemtap.base/kprobes.stp') diff --git a/testsuite/systemtap.base/kprobes.stp b/testsuite/systemtap.base/kprobes.stp new file mode 100644 index 00000000..62c18347 --- /dev/null +++ b/testsuite/systemtap.base/kprobes.stp @@ -0,0 +1,21 @@ +/* + * kprobes.stp + * Probe to test the functionality of kprobe-based probes + * (Dwarfless Probing) + */ + +probe begin +{ + println("\n Systemtap starting probe"); +} + +probe kprobe.function("vfs_read") +{ + printf("\n probe point hit"); + exit(); +} + +probe end +{ + println("\n Systemtap starting probe"); +} -- cgit From 6594f3f41e1d8d9ccb1e89d6734c0fd4da121fc0 Mon Sep 17 00:00:00 2001 From: Wenji Huang Date: Wed, 22 Apr 2009 22:44:05 -0400 Subject: Modify the output of kprobes test. * testsuite/systemtap.base/kprobes.stp: Update text. --- testsuite/systemtap.base/kprobes.stp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'testsuite/systemtap.base/kprobes.stp') diff --git a/testsuite/systemtap.base/kprobes.stp b/testsuite/systemtap.base/kprobes.stp index 62c18347..a3aad283 100644 --- a/testsuite/systemtap.base/kprobes.stp +++ b/testsuite/systemtap.base/kprobes.stp @@ -6,16 +6,15 @@ probe begin { - println("\n Systemtap starting probe"); + println("systemtap starting probe"); } probe kprobe.function("vfs_read") { - printf("\n probe point hit"); exit(); } probe end { - println("\n Systemtap starting probe"); + println("systemtap ending probe"); } -- cgit From 3add5ff43e63d4d4d5547a75a8b49fb6d6b99341 Mon Sep 17 00:00:00 2001 From: Wenji Huang Date: Thu, 23 Apr 2009 00:09:12 -0400 Subject: Tweak kprobes test case * testsuite/systemtap.base/kprobes.exp: Add expected message. * testsuite/systemtap.base/kprobes.stp: Ditto. --- testsuite/systemtap.base/kprobes.stp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'testsuite/systemtap.base/kprobes.stp') diff --git a/testsuite/systemtap.base/kprobes.stp b/testsuite/systemtap.base/kprobes.stp index a3aad283..884b321c 100644 --- a/testsuite/systemtap.base/kprobes.stp +++ b/testsuite/systemtap.base/kprobes.stp @@ -3,18 +3,23 @@ * Probe to test the functionality of kprobe-based probes * (Dwarfless Probing) */ +global hit_str probe begin { println("systemtap starting probe"); + hit_str = "" } probe kprobe.function("vfs_read") { + hit_str = "probe point hit" exit(); } probe end { println("systemtap ending probe"); + println(hit_str); + delete hit_str; } -- cgit