Tests: add globbing pattern tests to test_invalid_filter
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 17 Feb 2017 03:43:10 +0000 (22:43 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 5 May 2017 15:30:58 +0000 (11:30 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
tests/regression/tools/filtering/test_invalid_filter

index ebf4c3bb1df7c1e1c96cc9bc2a0afe5b89f394de..68bbdc18cef8558020ac1e2151e3de9fa524a76f 100755 (executable)
@@ -25,8 +25,8 @@ EVENT_NAME="bogus"
 ENABLE_EVENT_STDERR="/tmp/invalid-filters-stderr"
 TRACE_PATH=$(mktemp -d)
 NUM_GLOBAL_TESTS=2
-NUM_UST_TESTS=123
-NUM_KERNEL_TESTS=123
+NUM_UST_TESTS=165
+NUM_KERNEL_TESTS=165
 NUM_TESTS=$(($NUM_UST_TESTS+$NUM_KERNEL_TESTS+$NUM_GLOBAL_TESTS))
 
 source $TESTDIR/utils/utils.sh
@@ -143,8 +143,24 @@ INVALID_FILTERS=(
                # Only \$ctx is supported for now
                "\$global.value == 0"
                "0 == \$global.value"
-               # A wildcard should only appear as the last character in a string literal
-               "msg == \"my_event*_blah\""
+               # Cannot compare two full star globbing patterns
+               '"hello*world" == "yes*man"'
+               '"hello*world" == "yesman*"'
+               '"helloworld*" == "yes*man"'
+               # May only use != and == operators when one of them is a full
+               # star globbing pattern
+               '"hello*world" < field'
+               '"hello*world" <= field'
+               '"hello*world" >= field'
+               '"hello*world" > field'
+               '"hello*world" || field'
+               '"hello*world" && field'
+               'field < "hello*world"'
+               'field <= "hello*world"'
+               'field >= "hello*world"'
+               'field > "hello*world"'
+               'field && "hello*world"'
+               'field || "hello*world"'
 )
 IFS="$OLDIFS"
 
This page took 0.027051 seconds and 4 git commands to generate.