summaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/ChangeLog6
-rwxr-xr-xtestsuite/parseko/preprocess08.stp4
-rwxr-xr-xtestsuite/parseko/preprocess08b.stp4
-rw-r--r--testsuite/systemtap.base/cmd_parse.exp37
4 files changed, 49 insertions, 2 deletions
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog
index bdae76e3..48f6fbcb 100644
--- a/testsuite/ChangeLog
+++ b/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2008-06-10 Frank Ch. Eigler <fche@elastic.org>
+
+ PR 6470.
+ * parseko/preprocess08.stp, ...08b.stp: Revised/new test.
+ * systemtap.base/cmd_parse.exp: Added some argv[] tests.
+
2008-06-09 Stan Cox <scox@redhat.com>
* systemtap.base/stmt_rel.stp: New test.
diff --git a/testsuite/parseko/preprocess08.stp b/testsuite/parseko/preprocess08.stp
index 6665983d..ba0d68e2 100755
--- a/testsuite/parseko/preprocess08.stp
+++ b/testsuite/parseko/preprocess08.stp
@@ -1,4 +1,4 @@
#! stap -p1
-# missing "then" token
-%( arch == "2.6" %?
+# premature EOF during THEN tokens
+%( 0 == 0 %?
diff --git a/testsuite/parseko/preprocess08b.stp b/testsuite/parseko/preprocess08b.stp
new file mode 100755
index 00000000..a9697c28
--- /dev/null
+++ b/testsuite/parseko/preprocess08b.stp
@@ -0,0 +1,4 @@
+#! stap -p1
+
+# premature EOF during ELSE tokens
+%( 0 == 1 %? %:
diff --git a/testsuite/systemtap.base/cmd_parse.exp b/testsuite/systemtap.base/cmd_parse.exp
index cbce0455..e33bfa85 100644
--- a/testsuite/systemtap.base/cmd_parse.exp
+++ b/testsuite/systemtap.base/cmd_parse.exp
@@ -84,3 +84,40 @@ expect {
eof {fail "cmd_parse8: unexpected EOF"}
}
wait
+
+spawn stap -e {probe begin { printf("%d %s\n", argc, argv[$1]) exit() }} 1
+expect {
+ -timeout 60
+ "1 1" { pass cmd_parse9 }
+ timeout { fail "cmd_parse9 timeout" }
+ eof { fail "cmd_parse9 eof" }
+}
+wait
+
+spawn stap -e {probe begin { printf("%d %s\n", argc, argv[$1]) exit() }} 5 a b c d
+expect {
+ -timeout 60
+ "5 d" { pass cmd_parse10 }
+ timeout { fail "cmd_parse10 timeout" }
+ eof { fail "cmd_parse10 eof" }
+}
+wait
+
+spawn stap -e {probe begin { printf("%d %s\n", argc, argv[$1]) exit() }} 10 a b c d
+expect {
+ -timeout 60
+ "5 " { pass cmd_parse11 }
+ timeout { fail "cmd_parse11 timeout" }
+ eof { fail "cmd_parse11 eof" }
+}
+wait
+
+spawn stap -e {probe begin { printf("%d %s\n", argc, argv[0]) exit() }}
+expect {
+ -timeout 60
+ "0 " { pass cmd_parse12 }
+ timeout { fail "cmd_parse12 timeout" }
+ eof { fail "cmd_parse12 eof" }
+}
+wait
+