summaryrefslogtreecommitdiffstats
path: root/testsuite/semok/config_config.stp
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2010-02-19 00:11:18 +0100
committerMark Wielaard <mjw@redhat.com>2010-02-19 12:48:17 +0100
commit4227f98d2100dbae5009a39e05177c090886ed3f (patch)
tree92d8a2b5f91b47a9fa7647ffccafb2b4a5434962 /testsuite/semok/config_config.stp
parent717a457b697a46b8904792d59cf568d848fb2a73 (diff)
downloadsystemtap-steved-4227f98d2100dbae5009a39e05177c090886ed3f.tar.gz
systemtap-steved-4227f98d2100dbae5009a39e05177c090886ed3f.tar.xz
systemtap-steved-4227f98d2100dbae5009a39e05177c090886ed3f.zip
Allow CONFIG_foo COMPARISON-OP CONFIG_bar in preprocessor conditionals.
* parse.cxx (eval_pp_conditional): If rhs and lhs are both CONFIG_... identifiers try to convert them both to numbers or otherwise threat them both as strings for eval_comparison. * testsuite/semok/config_config.stp: New test.
Diffstat (limited to 'testsuite/semok/config_config.stp')
-rwxr-xr-xtestsuite/semok/config_config.stp17
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/semok/config_config.stp b/testsuite/semok/config_config.stp
new file mode 100755
index 00000000..287931e2
--- /dev/null
+++ b/testsuite/semok/config_config.stp
@@ -0,0 +1,17 @@
+#! stap -p2
+
+# check that CONFIGs can match other CONFIGS.
+probe
+ %( CONFIG_HZ == CONFIG_NR_CPUS
+ || CONFIG_NR_CPUS > CONFIG_HZ
+ || CONFIG_NR_CPUS < CONFIG_HZ %?
+ %( CONFIG_NFSD == CONFIG_NFS_COMMON
+ || CONFIG_NFS_COMMON != CONFIG_NFSD
+ %? begin
+ %: noprobe
+ %)
+ %: nonoprobe
+ %)
+{
+ exit()
+}