* [nft PATCH] tests: shell: Fix for spurious fail in maps/typeof_maps_add_delete
@ 2026-10-23 10:36 Phil Sutter
2026-10-23 11:56 ` Florian Westphal
2026-10-23 13:26 ` Phil Sutter
0 siblings, 2 replies; 4+ messages in thread
From: Phil Sutter @ 2026-10-23 10:36 UTC (permalink / raw)
To: netfilter-devel
Testing on a (probably slow) aarch64 machine yielded dump failure since
ruleset listing had '# count 1' appended to map size statement. The 3s
delay supposedly wasn't long enough for the element to be reapped after
disabling.
The test itself seems to perform all desired ruleset checks though, so
just drop the stored dumps to avoid this problem.
Fixes: a8260c056a69a ("tests: add dynmap datapath add/delete test case")
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
.../dumps/typeof_maps_add_delete.json-nft | 290 ------------------
.../maps/dumps/typeof_maps_add_delete.nft | 22 --
.../maps/dumps/typeof_maps_add_delete.nodump | 0
3 files changed, 312 deletions(-)
delete mode 100644 tests/shell/testcases/maps/dumps/typeof_maps_add_delete.json-nft
delete mode 100644 tests/shell/testcases/maps/dumps/typeof_maps_add_delete.nft
create mode 100644 tests/shell/testcases/maps/dumps/typeof_maps_add_delete.nodump
diff --git a/tests/shell/testcases/maps/dumps/typeof_maps_add_delete.json-nft b/tests/shell/testcases/maps/dumps/typeof_maps_add_delete.json-nft
deleted file mode 100644
index 08c10819f1b9c..0000000000000
--- a/tests/shell/testcases/maps/dumps/typeof_maps_add_delete.json-nft
+++ /dev/null
@@ -1,290 +0,0 @@
-{
- "nftables": [
- {
- "metainfo": {
- "version": "VERSION",
- "release_name": "RELEASE_NAME",
- "json_schema_version": 1
- }
- },
- {
- "table": {
- "family": "ip",
- "name": "dynset",
- "handle": 0
- }
- },
- {
- "chain": {
- "family": "ip",
- "table": "dynset",
- "name": "test_ping",
- "handle": 0
- }
- },
- {
- "chain": {
- "family": "ip",
- "table": "dynset",
- "name": "input",
- "handle": 0,
- "type": "filter",
- "hook": "input",
- "prio": 0,
- "policy": "accept"
- }
- },
- {
- "map": {
- "family": "ip",
- "name": "dynmark",
- "table": "dynset",
- "type": {
- "typeof": {
- "payload": {
- "protocol": "ip",
- "field": "daddr"
- }
- }
- },
- "handle": 0,
- "map": "mark",
- "size": 64,
- "flags": [
- "timeout"
- ],
- "timeout": 300,
- "stmt": [
- {
- "counter": null
- }
- ]
- }
- },
- {
- "rule": {
- "family": "ip",
- "table": "dynset",
- "chain": "test_ping",
- "handle": 0,
- "comment": "should not increment",
- "expr": [
- {
- "match": {
- "op": "==",
- "left": {
- "payload": {
- "protocol": "ip",
- "field": "saddr"
- }
- },
- "right": "@dynmark"
- }
- },
- {
- "counter": {
- "packets": 0,
- "bytes": 0
- }
- }
- ]
- }
- },
- {
- "rule": {
- "family": "ip",
- "table": "dynset",
- "chain": "test_ping",
- "handle": 0,
- "expr": [
- {
- "match": {
- "op": "!=",
- "left": {
- "payload": {
- "protocol": "ip",
- "field": "saddr"
- }
- },
- "right": "@dynmark"
- }
- },
- {
- "map": {
- "op": "add",
- "elem": {
- "payload": {
- "protocol": "ip",
- "field": "saddr"
- }
- },
- "data": 1,
- "map": "@dynmark"
- }
- },
- {
- "counter": {
- "packets": 1,
- "bytes": 84
- }
- }
- ]
- }
- },
- {
- "rule": {
- "family": "ip",
- "table": "dynset",
- "chain": "test_ping",
- "handle": 0,
- "comment": "should increment",
- "expr": [
- {
- "match": {
- "op": "==",
- "left": {
- "payload": {
- "protocol": "ip",
- "field": "saddr"
- }
- },
- "right": "@dynmark"
- }
- },
- {
- "counter": {
- "packets": 1,
- "bytes": 84
- }
- }
- ]
- }
- },
- {
- "rule": {
- "family": "ip",
- "table": "dynset",
- "chain": "test_ping",
- "handle": 0,
- "expr": [
- {
- "match": {
- "op": "==",
- "left": {
- "payload": {
- "protocol": "ip",
- "field": "saddr"
- }
- },
- "right": "@dynmark"
- }
- },
- {
- "map": {
- "op": "delete",
- "elem": {
- "payload": {
- "protocol": "ip",
- "field": "saddr"
- }
- },
- "data": 1,
- "map": "@dynmark"
- }
- }
- ]
- }
- },
- {
- "rule": {
- "family": "ip",
- "table": "dynset",
- "chain": "test_ping",
- "handle": 0,
- "comment": "delete should be instant but might fail under memory pressure",
- "expr": [
- {
- "match": {
- "op": "==",
- "left": {
- "payload": {
- "protocol": "ip",
- "field": "saddr"
- }
- },
- "right": "@dynmark"
- }
- },
- {
- "counter": {
- "packets": 0,
- "bytes": 0
- }
- }
- ]
- }
- },
- {
- "rule": {
- "family": "ip",
- "table": "dynset",
- "chain": "input",
- "handle": 0,
- "comment": "also check timeout-gc",
- "expr": [
- {
- "map": {
- "op": "add",
- "elem": {
- "elem": {
- "val": "10.2.3.4",
- "timeout": 2
- }
- },
- "data": 2,
- "map": "@dynmark"
- }
- }
- ]
- }
- },
- {
- "rule": {
- "family": "ip",
- "table": "dynset",
- "chain": "input",
- "handle": 0,
- "expr": [
- {
- "match": {
- "op": "==",
- "left": {
- "meta": {
- "key": "l4proto"
- }
- },
- "right": 1
- }
- },
- {
- "match": {
- "op": "==",
- "left": {
- "payload": {
- "protocol": "ip",
- "field": "daddr"
- }
- },
- "right": "127.0.0.42"
- }
- },
- {
- "jump": {
- "target": "test_ping"
- }
- }
- ]
- }
- }
- ]
-}
diff --git a/tests/shell/testcases/maps/dumps/typeof_maps_add_delete.nft b/tests/shell/testcases/maps/dumps/typeof_maps_add_delete.nft
deleted file mode 100644
index 3f3ef17dd5493..0000000000000
--- a/tests/shell/testcases/maps/dumps/typeof_maps_add_delete.nft
+++ /dev/null
@@ -1,22 +0,0 @@
-table ip dynset {
- map dynmark {
- typeof ip daddr : meta mark
- size 64
- counter
- timeout 5m
- }
-
- chain test_ping {
- ip saddr @dynmark counter packets 0 bytes 0 comment "should not increment"
- ip saddr != @dynmark add @dynmark { ip saddr : 0x00000001 } counter packets 1 bytes 84
- ip saddr @dynmark counter packets 1 bytes 84 comment "should increment"
- ip saddr @dynmark delete @dynmark { ip saddr : 0x00000001 }
- ip saddr @dynmark counter packets 0 bytes 0 comment "delete should be instant but might fail under memory pressure"
- }
-
- chain input {
- type filter hook input priority filter; policy accept;
- add @dynmark { 10.2.3.4 timeout 2s : 0x00000002 } comment "also check timeout-gc"
- meta l4proto 1 ip daddr 127.0.0.42 jump test_ping
- }
-}
diff --git a/tests/shell/testcases/maps/dumps/typeof_maps_add_delete.nodump b/tests/shell/testcases/maps/dumps/typeof_maps_add_delete.nodump
new file mode 100644
index 0000000000000..e69de29bb2d1d
--
2.54.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [nft PATCH] tests: shell: Fix for spurious fail in maps/typeof_maps_add_delete
2026-10-23 10:36 [nft PATCH] tests: shell: Fix for spurious fail in maps/typeof_maps_add_delete Phil Sutter
@ 2026-10-23 11:56 ` Florian Westphal
2026-10-23 13:04 ` Phil Sutter
2026-10-23 13:26 ` Phil Sutter
1 sibling, 1 reply; 4+ messages in thread
From: Florian Westphal @ 2026-10-23 11:56 UTC (permalink / raw)
To: Phil Sutter; +Cc: netfilter-devel
Phil Sutter <phil@nwl.cc> wrote:
> Testing on a (probably slow) aarch64 machine yielded dump failure since
> ruleset listing had '# count 1' appended to map size statement. The 3s
> delay supposedly wasn't long enough for the element to be reapped after
> disabling.
>
> The test itself seems to perform all desired ruleset checks though, so
> just drop the stored dumps to avoid this problem.
Annoying, but spurious failures suck more:
Acked-by: Florian Westphal <fw@strlen.de>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [nft PATCH] tests: shell: Fix for spurious fail in maps/typeof_maps_add_delete
2026-10-23 11:56 ` Florian Westphal
@ 2026-10-23 13:04 ` Phil Sutter
0 siblings, 0 replies; 4+ messages in thread
From: Phil Sutter @ 2026-10-23 13:04 UTC (permalink / raw)
To: Florian Westphal; +Cc: netfilter-devel
On Fri, Oct 23, 2026 at 01:56:26PM +0200, Florian Westphal wrote:
> Phil Sutter <phil@nwl.cc> wrote:
> > Testing on a (probably slow) aarch64 machine yielded dump failure since
> > ruleset listing had '# count 1' appended to map size statement. The 3s
> > delay supposedly wasn't long enough for the element to be reapped after
> > disabling.
> >
> > The test itself seems to perform all desired ruleset checks though, so
> > just drop the stored dumps to avoid this problem.
>
> Annoying, but spurious failures suck more:
Well, there might be another way involving timeout and gc-interval
tweaks, but AIUI the test didn't intend to check gc reliability or
"performance". Moreover, delayed execution of gc due to high system load
is expected, right?
Sadly, it's not the only test which becomes unstable with system load
and delays. Looking at estimate_timeout in sets/0044interval_overlap_0,
variance in system load may also reduce test stability. :(
> Acked-by: Florian Westphal <fw@strlen.de>
Thanks, Phil
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [nft PATCH] tests: shell: Fix for spurious fail in maps/typeof_maps_add_delete
2026-10-23 10:36 [nft PATCH] tests: shell: Fix for spurious fail in maps/typeof_maps_add_delete Phil Sutter
2026-10-23 11:56 ` Florian Westphal
@ 2026-10-23 13:26 ` Phil Sutter
1 sibling, 0 replies; 4+ messages in thread
From: Phil Sutter @ 2026-10-23 13:26 UTC (permalink / raw)
To: netfilter-devel
On Fri, Oct 23, 2026 at 12:36:03PM +0200, Phil Sutter wrote:
> Testing on a (probably slow) aarch64 machine yielded dump failure since
> ruleset listing had '# count 1' appended to map size statement. The 3s
> delay supposedly wasn't long enough for the element to be reapped after
> disabling.
>
> The test itself seems to perform all desired ruleset checks though, so
> just drop the stored dumps to avoid this problem.
>
> Fixes: a8260c056a69a ("tests: add dynmap datapath add/delete test case")
> Signed-off-by: Phil Sutter <phil@nwl.cc>
Patch applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-10-23 13:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-23 10:36 [nft PATCH] tests: shell: Fix for spurious fail in maps/typeof_maps_add_delete Phil Sutter
2026-10-23 11:56 ` Florian Westphal
2026-10-23 13:04 ` Phil Sutter
2026-10-23 13:26 ` Phil Sutter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.