From 4227f98d2100dbae5009a39e05177c090886ed3f Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Fri, 19 Feb 2010 00:11:18 +0100 Subject: 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. --- testsuite/semok/config_config.stp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 testsuite/semok/config_config.stp (limited to 'testsuite/semok/config_config.stp') 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() +} -- cgit