From c20142bba09b72f398ccf8260715cd6ed9a0e865 Mon Sep 17 00:00:00 2001 From: Shyam Saini Date: Sat, 17 Jun 2017 01:05:42 +0530 Subject: tests: py: Add test for ambiguity while setting the value This test checks bug identified and fixed in the commit mentioned below In a statement if there are multiple src data then it would be totally ambiguous to decide which value to set. Before the commit was made it returned 134(BUG), but now it returns 1 i.e, an error message. Following rules tests ambiguity while setting the value: $ sudo nft add rule ip test-ip4 output ct mark set {0x11333, 0x11} :1:41-55: Error: you cannot use a set here, unknown value to use add rule ip test-ip4 output ct mark set {0x11333, 0x11} ~~~~~~~~~~~~^^^^^^^^^^^^^^^ Test: 986dea8 ("evaluate: avoid reference to multiple src data in statements which set values") Signed-off-by: Shyam Saini Signed-off-by: Pablo Neira Ayuso --- tests/py/any/ct.t | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/py/any/ct.t') diff --git a/tests/py/any/ct.t b/tests/py/any/ct.t index 20f047a2..275d2e71 100644 --- a/tests/py/any/ct.t +++ b/tests/py/any/ct.t @@ -58,6 +58,11 @@ ct mark set 0x11;ok;ct mark set 0x00000011 ct mark set mark;ok;ct mark set mark ct mark set mark map { 1 : 10, 2 : 20, 3 : 30 };ok;ct mark set mark map { 0x00000003 : 0x0000001e, 0x00000002 : 0x00000014, 0x00000001 : 0x0000000a} +ct mark set {0x11333, 0x11};fail +ct zone set {123, 127};fail +ct label set {123, 127};fail +ct event set {new, related, destroy, label};fail + ct expiration 30;ok;ct expiration 30s ct expiration 22;ok;ct expiration 22s ct expiration != 233;ok;ct expiration != 3m53s -- cgit v1.2.3