summaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2010-03-20 12:29:37 -0700
committerJosh Stone <jistone@redhat.com>2010-03-20 12:29:37 -0700
commit1d844b57ab0a846b6059e682a6a70403aaef6ebc (patch)
tree4570092c1d83cda42c2160934073f007e0ebd792 /testsuite
parent1ae727577edea9441033fd0eff179b06e0a87348 (diff)
downloadsystemtap-steved-1d844b57ab0a846b6059e682a6a70403aaef6ebc.tar.gz
systemtap-steved-1d844b57ab0a846b6059e682a6a70403aaef6ebc.tar.xz
systemtap-steved-1d844b57ab0a846b6059e682a6a70403aaef6ebc.zip
PR11405: Warn and continue for parsing errors in tapsets
When we start seeing tapsets provided by third parties, any errors in their files should not be fatal to us. Since we don't really know which tapsets are our own, this leniency applies to all. * main.cxx (main): Warn on tapset errors, but continue unless -W. * testsuite/parseko/bad_tapset/foo.stp: New bogus tapset. * testsuite/parseko/bad_tapset.stp: Check that "-W -I bad_tapset" fails. * testsuite/parseok/bad_tapset.stp: Check that "-I bad_tapset" succeeds. * testsuite/parseok/all_tapsets.stp: Check -W with the default tapsets.
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/parseko/bad_tapset.stp6
-rw-r--r--testsuite/parseko/bad_tapset/foo.stp2
-rwxr-xr-xtestsuite/parseok/all_tapsets.stp5
-rwxr-xr-xtestsuite/parseok/bad_tapset.stp6
4 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/parseko/bad_tapset.stp b/testsuite/parseko/bad_tapset.stp
new file mode 100755
index 00000000..bd15577f
--- /dev/null
+++ b/testsuite/parseko/bad_tapset.stp
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+# PR11405: with -W, bad tapsets should still be an error
+
+TAPSET=`dirname $0`/bad_tapset/
+stap -p1 -e 'probe begin {}' -I $TAPSET -W
diff --git a/testsuite/parseko/bad_tapset/foo.stp b/testsuite/parseko/bad_tapset/foo.stp
new file mode 100644
index 00000000..c4c77257
--- /dev/null
+++ b/testsuite/parseko/bad_tapset/foo.stp
@@ -0,0 +1,2 @@
+# this is an intentional syntax error for testing PR11405
+probe foo = .bar {}
diff --git a/testsuite/parseok/all_tapsets.stp b/testsuite/parseok/all_tapsets.stp
new file mode 100755
index 00000000..1777cc10
--- /dev/null
+++ b/testsuite/parseok/all_tapsets.stp
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+# PR11405: all the default tapsets should succeed even with -W
+
+stap -p1 -e 'probe begin {}' -W
diff --git a/testsuite/parseok/bad_tapset.stp b/testsuite/parseok/bad_tapset.stp
new file mode 100755
index 00000000..a97c037f
--- /dev/null
+++ b/testsuite/parseok/bad_tapset.stp
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+# PR11405: without -W, bad tapsets will be warned but shouldn't be an error
+
+TAPSET=`dirname $0`/../parseko/bad_tapset/
+stap -p1 -e 'probe begin {}' -I $TAPSET