path: root/tests/shell/testcases/sets
diff options
authorFlorian Westphal <>2018-04-19 18:18:57 +0200
committerFlorian Westphal <>2018-04-19 21:17:49 +0200
commitbdc77c63d5816fd50ac5a353f6a37d9b6a410b2c (patch)
treee34ea2fe7d95c95721718cd3d39f0eebb08bb6ca /tests/shell/testcases/sets
parent4787edad132c30ae0f6bb00135ae5d970b0ccb74 (diff)
evaluate: clear expression context before cmd evaluation
We also need to clear expr ctx before we eval a command. This is a followup fix to 'evaluate: reset eval context when evaluating set definitions'. The first patch only fixed set evaluation when dealing with a complete table representation rather than individual commands. Reported-by: David Fabian <> Signed-off-by: Florian Westphal <>
Diffstat (limited to 'tests/shell/testcases/sets')
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/shell/testcases/sets/0033add_set_simple_flat_0 b/tests/shell/testcases/sets/0033add_set_simple_flat_0
new file mode 100755
index 00000000..86be0c99
--- /dev/null
+++ b/tests/shell/testcases/sets/0033add_set_simple_flat_0
@@ -0,0 +1,9 @@
+RULESET="add table ip x
+add set x setA {type ipv4_addr . inet_service . ipv4_addr; flags timeout;}
+add set x setB {type ipv4_addr . inet_service; flags timeout;}
+set -e
+$NFT -f - <<< "$RULESET"