summaryrefslogtreecommitdiffstats
path: root/testsuite/parseok/twenty.stp
diff options
context:
space:
mode:
authorPrzemyslaw Pawelczyk <przemyslaw@pawelczyk.it>2009-08-28 02:11:47 +0200
committerJosh Stone <jistone@redhat.com>2009-08-28 11:21:24 -0700
commit2d7881bf6e14d14fa1394f65f11b4d1dce4e2623 (patch)
tree85ca79b32737d42779c3b02fe0d290f6f9f25579 /testsuite/parseok/twenty.stp
parenta4433a9da1f21c6536266531308ba231e5efae81 (diff)
downloadsystemtap-steved-2d7881bf6e14d14fa1394f65f11b4d1dce4e2623.tar.gz
systemtap-steved-2d7881bf6e14d14fa1394f65f11b4d1dce4e2623.tar.xz
systemtap-steved-2d7881bf6e14d14fa1394f65f11b4d1dce4e2623.zip
Support || and && in preprocessor's conditions.
* parse.cxx (parser::scan_pp): Add || and &&. * stap.1.in: Document || and && in PREPROCESSING. * testsuite/parseok/twenty.stp: Test case. * testsuite/parseko/preprocess14.stp: Ditto. * testsuite/parseko/preprocess15.stp: Ditto. Signed-off-by: Josh Stone <jistone@redhat.com>
Diffstat (limited to 'testsuite/parseok/twenty.stp')
-rwxr-xr-xtestsuite/parseok/twenty.stp12
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/parseok/twenty.stp b/testsuite/parseok/twenty.stp
new file mode 100755
index 00000000..d474ad5d
--- /dev/null
+++ b/testsuite/parseok/twenty.stp
@@ -0,0 +1,12 @@
+#! stap -p1
+
+global
+%( kernel_v > "2.6" && kernel_vr != "2.9.77-2873NOTHING" && kernel_v <= "3.5" && kernel_vr == "2.3.5-2.43.54.2" %? "FAIL1" %: PASS %)
+
+global
+%( arch == "i386" || arch == "i686" || arch == "x86_64" %? x86 %: other %)
+
+global
+%( $# != 2 && @# < "1" && @# == "0" && $# >= 3 %?
+ %( $2 >= "12" %? $3 FAIL2 %: $2 FAIL3 %) #This line must not be evaluated
+%: PASS2 %)