]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: shell: Fix for maps/typeof_maps_add_delete with ASAN
authorPhil Sutter <phil@nwl.cc>
Wed, 24 Apr 2024 21:41:59 +0000 (23:41 +0200)
committerPhil Sutter <phil@nwl.cc>
Wed, 24 Apr 2024 21:59:00 +0000 (23:59 +0200)
With both KASAN and ASAN enabled, my VM is too slow so the ping-induced
set entry times out before the test checks its existence. Increase its
timeout to 2s, seems to do the trick.

Signed-off-by: Phil Sutter <phil@nwl.cc>
tests/shell/testcases/maps/dumps/typeof_maps_add_delete.json-nft
tests/shell/testcases/maps/dumps/typeof_maps_add_delete.nft
tests/shell/testcases/maps/typeof_maps_add_delete

index 8130c46c154cd9cd6df527ebeef81c218ff55253..b3204a283d0ad6687008f44f5605d92b3f6edf31 100644 (file)
               "elem": {
                 "elem": {
                   "val": "10.2.3.4",
-                  "timeout": 1
+                  "timeout": 2
                 }
               },
               "data": 2,
index 9134673cf48a10c20f263051320a82cc15816bdd..e80366b8bf2a4387d8959059fc0cf08c1ba32413 100644 (file)
@@ -16,7 +16,7 @@ table ip dynset {
 
        chain input {
                type filter hook input priority filter; policy accept;
-               add @dynmark { 10.2.3.4 timeout 1s : 0x00000002 } comment "also check timeout-gc"
+               add @dynmark { 10.2.3.4 timeout 2s : 0x00000002 } comment "also check timeout-gc"
                meta l4proto icmp ip daddr 127.0.0.42 jump test_ping
        }
 }
index d2ac9f1ce8c92e94c51c0a0d0c08efdbff486955..2d718c5fecbf36f7532c945ea9a44fdaa18eb812 100755 (executable)
@@ -30,7 +30,7 @@ EXPECTED="table ip dynset {
        chain input {
                type filter hook input priority 0; policy accept;
 
-               add @dynmark { 10.2.3.4 timeout 1s : 0x2 } comment \"also check timeout-gc\"
+               add @dynmark { 10.2.3.4 timeout 2s : 0x2 } comment \"also check timeout-gc\"
                meta l4proto icmp ip daddr 127.0.0.42 jump test_ping
        }
 }"
@@ -45,7 +45,7 @@ ping -c 1 127.0.0.42
 $NFT get element ip dynset dynmark { 10.2.3.4 }
 
 # wait so that 10.2.3.4 times out.
-sleep 2
+sleep 3
 
 set +e
 $NFT get element ip dynset dynmark { 10.2.3.4 } && exit 1