Tests: test bytecode linker refusal of non-string arrays and sequences
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 22 Mar 2021 17:23:45 +0000 (13:23 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 23 Mar 2021 15:04:00 +0000 (11:04 -0400)
The bytecode linker should refuse loading arrays and sequences of data
which are not strings for the purpose of comparison against other
strings.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Id3b14cb6674b0e2e1edaf039fbc5f929708e2451

tests/regression/tools/filtering/test_valid_filter

index 8f3e5f4fefa8c1e4a54a44bfddf9bc4be9ea2d1d..ce662180e7dbd615726c6113d6e3fefb1044e2bb 100755 (executable)
@@ -13,8 +13,8 @@ STATS_BIN="$TESTDIR/utils/babelstats.pl"
 SESSION_NAME="valid_filter"
 NR_ITER=100
 NUM_GLOBAL_TESTS=2
-NUM_UST_TESTS=1110
-NUM_KERNEL_TESTS=1044
+NUM_UST_TESTS=1122
+NUM_KERNEL_TESTS=1056
 NUM_TESTS=$(($NUM_UST_TESTS+$NUM_KERNEL_TESTS+$NUM_GLOBAL_TESTS))
 
 source $TESTDIR/utils/utils.sh
@@ -984,6 +984,16 @@ UST_STR_FILTERS=(
        str_has_events
        '"salut vous*" == "salut*"'
 
+       # check that bytecode linker refuses to link against a
+       # non-string array.
+       str_has_no_event
+       'arrfield1 != "dontmatch"'
+
+       # check that bytecode linker refuses to link against a
+       # non-string sequence.
+       str_has_no_event
+       'seqfield1 != "dontmatch"'
+
        ${KIRK_KRAUSS_TESTS[@]}
 
        END
@@ -1426,6 +1436,16 @@ KERNEL_FILTERS=(
        has_no_event
        'stringfield == "test\*"'
 
+       # check that bytecode linker refuses to link against a
+       # non-string array.
+       has_no_event
+       'arrfield1 != "dontmatch"'
+
+       # check that bytecode linker refuses to link against a
+       # non-string sequence.
+       has_no_event
+       'seqfield1 != "dontmatch"'
+
        ${KIRK_KRAUSS_TESTS[@]}
 
        END
This page took 0.029368 seconds and 4 git commands to generate.