Skip to contentSkip to conversation

tests: py: fix json single-flag output for fib & synproxy

PATCH In review Florian Westphal 2 participants 2 messages Jun 2, 2025 – Jun 3, 2025 netfilter

lore
Share & tools
lore

Florian Westphal

author maintainer
#0 lore raw

PATCH 1/1 tests: py: fix json single-flag output for fib & synproxy

Blamed commits change output format but did not adjust existing tests:
inet/fib.t: WARNING: line 16: '{"nftables": ..

Fixes 38f99ee84fe6 ("json: Print single synproxy flags as non-array")
Fixes dbe5c44f2b89 ("json: Print single fib flag as non-array")
---
 tests/py/inet/fib.t.json.output      | 32 ++++++++++++++++++++++++++++
 tests/py/inet/synproxy.t.json.output | 17 +++++++++++++++
 2 files changed, 49 insertions(+)
 create mode 100644 tests/py/inet/synproxy.t.json.output
tests/py/inet/fib.t.json.output +32 -0
index 52cd46bc0e12..e21f1e72c636 100644
@@ -37,3 +37,35 @@
     }
 ]
 
+# fib daddr oif exists
+[
+    {
+        "match": {
+            "left": {
+                "fib": {
+                    "flags": "daddr",
+                    "result": "oif"
+                }
+            },
+            "op": "==",
+            "right": true
+        }
+    }
+]
+
+# fib daddr oif missing
+[
+    {
+        "match": {
+            "left": {
+                "fib": {
+                    "flags": "daddr",
+                    "result": "oif"
+                }
+            },
+            "op": "==",
+            "right": false
+        }
+    }
+]
+
tests/py/inet/synproxy.t.json.output new file +17 -0
new file mode 100644
index 000000000000..e32cdfb885e1
@@ -0,0 +1,17 @@
+# synproxy timestamp
+[
+    {
+        "synproxy": {
+            "flags": "timestamp"
+        }
+    }
+]
+
+# synproxy sack-perm
+[
+    {
+        "synproxy": {
+            "flags": "sack-perm"
+        }
+    }
+]
Signature · 1 line
2.49.0
reviewer Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Florian Westphal

Blamed commits change output format but did not adjust existing tests:
inet/fib.t: WARNING: line 16: '{"nftables": ..

Fixes 38f99ee84fe6 ("json: Print single synproxy flags as non-array")
Fixes dbe5c44f2b89 ("json: Print single fib flag as non-array")

Thanks, Phil