This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[PATCH] add testcases for prologue and epilogue style alias
- From: Zhou Wenjian <zhouwj-fnst at cn dot fujitsu dot com>
- To: <systemtap at sourceware dot org>
- Date: Wed, 21 Oct 2015 10:33:57 +0800
- Subject: [PATCH] add testcases for prologue and epilogue style alias
- Authentication-results: sourceware.org; auth=none
* testsuite/systemtap.base/alias-epilog.exp: New test case.
* testsuite/systemtap.base/alias-epilog.stp: New test file.
* testsuite/systemtap.base/alias-prolog.exp: New test case.
* testsuite/systemtap.base/alias-prolog.stp: New test file.
---
testsuite/systemtap.base/alias-epilog.exp | 12 ++++++++++++
testsuite/systemtap.base/alias-epilog.stp | 23 +++++++++++++++++++++++
testsuite/systemtap.base/alias-prolog.exp | 12 ++++++++++++
testsuite/systemtap.base/alias-prolog.stp | 23 +++++++++++++++++++++++
4 files changed, 70 insertions(+)
create mode 100755 testsuite/systemtap.base/alias-epilog.exp
create mode 100755 testsuite/systemtap.base/alias-epilog.stp
create mode 100755 testsuite/systemtap.base/alias-prolog.exp
create mode 100755 testsuite/systemtap.base/alias-prolog.stp
diff --git a/testsuite/systemtap.base/alias-epilog.exp b/testsuite/systemtap.base/alias-epilog.exp
new file mode 100755
index 0000000..5a2f8b4
--- /dev/null
+++ b/testsuite/systemtap.base/alias-epilog.exp
@@ -0,0 +1,12 @@
+# Check epilogue style alias
+
+set test "alias-epilog"
+
+foreach runtime [get_runtime_list] {
+ if {$runtime != ""} {
+ stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string \
+ --runtime=$runtime
+ } else {
+ stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string
+ }
+}
diff --git a/testsuite/systemtap.base/alias-epilog.stp b/testsuite/systemtap.base/alias-epilog.stp
new file mode 100755
index 0000000..d734b63
--- /dev/null
+++ b/testsuite/systemtap.base/alias-epilog.stp
@@ -0,0 +1,23 @@
+/*
+ * alias-epilog.stp
+ *
+ * Check epilogue style alias
+ */
+
+probe foo = begin { }
+
+probe begin
+{
+ println("systemtap starting probe")
+ exit()
+}
+
+probe end1 += end
+{
+ println("systemtap test success")
+}
+
+probe end1
+{
+ println("systemtap ending probe")
+}
diff --git a/testsuite/systemtap.base/alias-prolog.exp b/testsuite/systemtap.base/alias-prolog.exp
new file mode 100755
index 0000000..63de3d3
--- /dev/null
+++ b/testsuite/systemtap.base/alias-prolog.exp
@@ -0,0 +1,12 @@
+# Check prologue style alias
+
+set test "alias-prolog"
+
+foreach runtime [get_runtime_list] {
+ if {$runtime != ""} {
+ stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string \
+ --runtime=$runtime
+ } else {
+ stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string
+ }
+}
diff --git a/testsuite/systemtap.base/alias-prolog.stp b/testsuite/systemtap.base/alias-prolog.stp
new file mode 100755
index 0000000..6de91fa
--- /dev/null
+++ b/testsuite/systemtap.base/alias-prolog.stp
@@ -0,0 +1,23 @@
+/*
+ * alias-prolog.stp
+ *
+ * Check prologue style alias
+ */
+
+probe foo = begin { }
+
+probe begin
+{
+ println("systemtap starting probe")
+ exit()
+}
+
+probe end1 = end
+{
+ println("systemtap ending probe")
+}
+
+probe end1
+{
+ println("systemtap test success")
+}
--
1.8.3.1