diff options
author | Mark Wielaard <mjw@redhat.com> | 2010-02-18 23:22:18 +0100 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2010-02-19 12:48:17 +0100 |
commit | 717a457b697a46b8904792d59cf568d848fb2a73 (patch) | |
tree | 124c5d034b201b1f438d3f89fc037d8acbae0080 /testsuite | |
parent | 215c7a01b0d88eae2b0e3529412f3d95525b8ede (diff) | |
download | systemtap-steved-717a457b697a46b8904792d59cf568d848fb2a73.tar.gz systemtap-steved-717a457b697a46b8904792d59cf568d848fb2a73.tar.xz systemtap-steved-717a457b697a46b8904792d59cf568d848fb2a73.zip |
Allow CONFIG_foo COMPARISON-OP number in preprocessor conditionals.
* parse.cxx (eval_pp_conditional): Handle r->type == tok_number when
l->type == tok_identifier.
* testsuite/semok/config_number.stp: New test.
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/semok/config_number.stp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/testsuite/semok/config_number.stp b/testsuite/semok/config_number.stp new file mode 100755 index 00000000..b384c3e5 --- /dev/null +++ b/testsuite/semok/config_number.stp @@ -0,0 +1,20 @@ +#! stap -p2 + +# check that number comparisons work in CONFIG checks +probe + %( CONFIG_NR_CPUS == 13 %? + noprobe + %: + %( CONFIG_NR_CPUS < 1 %? + nonoprobe + %: + %( CONFIG_NR_CPUS >= 0 %? + begin + %: + nononoprobe + %) + %) + %) +{ + exit() +} |