Skip to contentSkip to conversation

tests: shell: Fix for maps/typeof_maps_add_delete with ASAN

PATCH In review Phil Sutter 1 participant 2 messages Apr 24, 2024 – Apr 25, 2024 netfilter

lore
Share & tools
lore

Phil Sutter

author reviewer
#0 lore raw

PATCH 1/1 tests: shell: Fix for maps/typeof_maps_add_delete with ASAN

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.

---
 .../testcases/maps/dumps/typeof_maps_add_delete.json-nft      | 2 +-
 tests/shell/testcases/maps/dumps/typeof_maps_add_delete.nft   | 2 +-
 tests/shell/testcases/maps/typeof_maps_add_delete             | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)
tests/shell/testcases/maps/dumps/typeof_maps_add_delete.json-nft +1 -1
index 8130c46c154cd..b3204a283d0ad 100644
@@ -231,7 +231,7 @@
               "elem": {
                 "elem": {
                   "val": "10.2.3.4",
-                  "timeout": 1
+                  "timeout": 2
                 }
               },
               "data": 2,
tests/shell/testcases/maps/dumps/typeof_maps_add_delete.nft +1 -1
index 9134673cf48a1..e80366b8bf2a4 100644
@@ -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
 	}
 }
tests/shell/testcases/maps/typeof_maps_add_delete +2 -2
index d2ac9f1ce8c92..2d718c5fecbf3 100755
@@ -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
Signature · 1 line
2.43.0
author reviewer
#1 lore raw
Quoted 5 lines · Phil Sutter

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.

Patch applied.