diff options
author | Thomas Haller <thaller@redhat.com> | 2023-11-21 14:22:54 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2023-11-22 12:15:54 +0100 |
commit | 485efcd3df69999d713031433d862147eba15cde (patch) | |
tree | bec7f837b12e5e508871d3e34f2474b6757ffb60 /tests/shell/testcases/flowtable | |
parent | cb2c37ca3adb7809035ec4ff5d01ffa532839875 (diff) |
tests/shell: sanitize "handle" in JSON output
The "handle" in JSON output is not stable. Sanitize/normalize to zero.
Adjust the sanitize code, and regenerate the .json-nft files.
Signed-off-by: Thomas Haller <thaller@redhat.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/shell/testcases/flowtable')
15 files changed, 15 insertions, 15 deletions
diff --git a/tests/shell/testcases/flowtable/dumps/0001flowtable_0.json-nft b/tests/shell/testcases/flowtable/dumps/0001flowtable_0.json-nft index ddd46b1c..94609e9a 100644 --- a/tests/shell/testcases/flowtable/dumps/0001flowtable_0.json-nft +++ b/tests/shell/testcases/flowtable/dumps/0001flowtable_0.json-nft @@ -1 +1 @@ -{"nftables": [{"metainfo": {"version": "VERSION", "release_name": "RELEASE_NAME", "json_schema_version": 1}}, {"table": {"family": "inet", "name": "t", "handle": 1}}, {"flowtable": {"family": "inet", "name": "f", "table": "t", "handle": 2, "hook": "ingress", "prio": 10, "dev": "lo"}}, {"chain": {"family": "inet", "table": "t", "name": "c", "handle": 1}}, {"rule": {"family": "inet", "table": "t", "chain": "c", "handle": 3, "expr": [{"flow": {"op": "add", "flowtable": "@f"}}]}}]} +{"nftables": [{"metainfo": {"version": "VERSION", "release_name": "RELEASE_NAME", "json_schema_version": 1}}, {"table": {"family": "inet", "name": "t", "handle": 0}}, {"flowtable": {"family": "inet", "name": "f", "table": "t", "handle": 0, "hook": "ingress", "prio": 10, "dev": "lo"}}, {"chain": {"family": "inet", "table": "t", "name": "c", "handle": 0}}, {"rule": {"family": "inet", "table": "t", "chain": "c", "handle": 0, "expr": [{"flow": {"op": "add", "flowtable": "@f"}}]}}]} diff --git a/tests/shell/testcases/flowtable/dumps/0002create_flowtable_0.json-nft b/tests/shell/testcases/flowtable/dumps/0002create_flowtable_0.json-nft index 752d10df..5d11a5e8 100644 --- a/tests/shell/testcases/flowtable/dumps/0002create_flowtable_0.json-nft +++ b/tests/shell/testcases/flowtable/dumps/0002create_flowtable_0.json-nft @@ -1 +1 @@ -{"nftables": [{"metainfo": {"version": "VERSION", "release_name": "RELEASE_NAME", "json_schema_version": 1}}, {"table": {"family": "ip", "name": "t", "handle": 1}}, {"flowtable": {"family": "ip", "name": "f", "table": "t", "handle": 1, "hook": "ingress", "prio": 10, "dev": "lo"}}]} +{"nftables": [{"metainfo": {"version": "VERSION", "release_name": "RELEASE_NAME", "json_schema_version": 1}}, {"table": {"family": "ip", "name": "t", "handle": 0}}, {"flowtable": {"family": "ip", "name": "f", "table": "t", "handle": 0, "hook": "ingress", "prio": 10, "dev": "lo"}}]} diff --git a/tests/shell/testcases/flowtable/dumps/0003add_after_flush_0.json-nft b/tests/shell/testcases/flowtable/dumps/0003add_after_flush_0.json-nft index c1596fc4..557b2e56 100644 --- a/tests/shell/testcases/flowtable/dumps/0003add_after_flush_0.json-nft +++ b/tests/shell/testcases/flowtable/dumps/0003add_after_flush_0.json-nft @@ -1 +1 @@ -{"nftables": [{"metainfo": {"version": "VERSION", "release_name": "RELEASE_NAME", "json_schema_version": 1}}, {"table": {"family": "ip", "name": "x", "handle": 2}}, {"flowtable": {"family": "ip", "name": "y", "table": "x", "handle": 1, "hook": "ingress", "prio": 0, "dev": "lo"}}]} +{"nftables": [{"metainfo": {"version": "VERSION", "release_name": "RELEASE_NAME", "json_schema_version": 1}}, {"table": {"family": "ip", "name": "x", "handle": 0}}, {"flowtable": {"family": "ip", "name": "y", "table": "x", "handle": 0, "hook": "ingress", "prio": 0, "dev": "lo"}}]} diff --git a/tests/shell/testcases/flowtable/dumps/0004delete_after_add_0.json-nft b/tests/shell/testcases/flowtable/dumps/0004delete_after_add_0.json-nft index 170a5783..0de45a8a 100644 --- a/tests/shell/testcases/flowtable/dumps/0004delete_after_add_0.json-nft +++ b/tests/shell/testcases/flowtable/dumps/0004delete_after_add_0.json-nft @@ -1 +1 @@ -{"nftables": [{"metainfo": {"version": "VERSION", "release_name": "RELEASE_NAME", "json_schema_version": 1}}, {"table": {"family": "ip", "name": "x", "handle": 1}}]} +{"nftables": [{"metainfo": {"version": "VERSION", "release_name": "RELEASE_NAME", "json_schema_version": 1}}, {"table": {"family": "ip", "name": "x", "handle": 0}}]} diff --git a/tests/shell/testcases/flowtable/dumps/0005delete_in_use_1.json-nft b/tests/shell/testcases/flowtable/dumps/0005delete_in_use_1.json-nft index 752c6b53..23ae7115 100644 --- a/tests/shell/testcases/flowtable/dumps/0005delete_in_use_1.json-nft +++ b/tests/shell/testcases/flowtable/dumps/0005delete_in_use_1.json-nft @@ -1 +1 @@ -{"nftables": [{"metainfo": {"version": "VERSION", "release_name": "RELEASE_NAME", "json_schema_version": 1}}, {"table": {"family": "ip", "name": "x", "handle": 1}}, {"flowtable": {"family": "ip", "name": "y", "table": "x", "handle": 2, "hook": "ingress", "prio": 0, "dev": "lo"}}, {"chain": {"family": "ip", "table": "x", "name": "x", "handle": 1}}, {"rule": {"family": "ip", "table": "x", "chain": "x", "handle": 3, "expr": [{"flow": {"op": "add", "flowtable": "@y"}}]}}]} +{"nftables": [{"metainfo": {"version": "VERSION", "release_name": "RELEASE_NAME", "json_schema_version": 1}}, {"table": {"family": "ip", "name": "x", "handle": 0}}, {"flowtable": {"family": "ip", "name": "y", "table": "x", "handle": 0, "hook": "ingress", "prio": 0, "dev": "lo"}}, {"chain": {"family": "ip", "table": "x", "name": "x", "handle": 0}}, {"rule": {"family": "ip", "table": "x", "chain": "x", "handle": 0, "expr": [{"flow": {"op": "add", "flowtable": "@y"}}]}}]} diff --git a/tests/shell/testcases/flowtable/dumps/0006segfault_0.json-nft b/tests/shell/testcases/flowtable/dumps/0006segfault_0.json-nft index e34102c3..5696ef28 100644 --- a/tests/shell/testcases/flowtable/dumps/0006segfault_0.json-nft +++ b/tests/shell/testcases/flowtable/dumps/0006segfault_0.json-nft @@ -1 +1 @@ -{"nftables": [{"metainfo": {"version": "VERSION", "release_name": "RELEASE_NAME", "json_schema_version": 1}}, {"table": {"family": "ip", "name": "t", "handle": 1}}]} +{"nftables": [{"metainfo": {"version": "VERSION", "release_name": "RELEASE_NAME", "json_schema_version": 1}}, {"table": {"family": "ip", "name": "t", "handle": 0}}]} diff --git a/tests/shell/testcases/flowtable/dumps/0007prio_0.json-nft b/tests/shell/testcases/flowtable/dumps/0007prio_0.json-nft index e34102c3..5696ef28 100644 --- a/tests/shell/testcases/flowtable/dumps/0007prio_0.json-nft +++ b/tests/shell/testcases/flowtable/dumps/0007prio_0.json-nft @@ -1 +1 @@ -{"nftables": [{"metainfo": {"version": "VERSION", "release_name": "RELEASE_NAME", "json_schema_version": 1}}, {"table": {"family": "ip", "name": "t", "handle": 1}}]} +{"nftables": [{"metainfo": {"version": "VERSION", "release_name": "RELEASE_NAME", "json_schema_version": 1}}, {"table": {"family": "ip", "name": "t", "handle": 0}}]} diff --git a/tests/shell/testcases/flowtable/dumps/0008prio_1.json-nft b/tests/shell/testcases/flowtable/dumps/0008prio_1.json-nft index e34102c3..5696ef28 100644 --- a/tests/shell/testcases/flowtable/dumps/0008prio_1.json-nft +++ b/tests/shell/testcases/flowtable/dumps/0008prio_1.json-nft @@ -1 +1 @@ -{"nftables": [{"metainfo": {"version": "VERSION", "release_name": "RELEASE_NAME", "json_schema_version": 1}}, {"table": {"family": "ip", "name": "t", "handle": 1}}]} +{"nftables": [{"metainfo": {"version": "VERSION", "release_name": "RELEASE_NAME", "json_schema_version": 1}}, {"table": {"family": "ip", "name": "t", "handle": 0}}]} diff --git a/tests/shell/testcases/flowtable/dumps/0009deleteafterflush_0.json-nft b/tests/shell/testcases/flowtable/dumps/0009deleteafterflush_0.json-nft index ee19cb85..e6b3a36d 100644 --- a/tests/shell/testcases/flowtable/dumps/0009deleteafterflush_0.json-nft +++ b/tests/shell/testcases/flowtable/dumps/0009deleteafterflush_0.json-nft @@ -1 +1 @@ -{"nftables": [{"metainfo": {"version": "VERSION", "release_name": "RELEASE_NAME", "json_schema_version": 1}}, {"table": {"family": "ip", "name": "x", "handle": 1}}, {"chain": {"family": "ip", "table": "x", "name": "y", "handle": 1}}]} +{"nftables": [{"metainfo": {"version": "VERSION", "release_name": "RELEASE_NAME", "json_schema_version": 1}}, {"table": {"family": "ip", "name": "x", "handle": 0}}, {"chain": {"family": "ip", "table": "x", "name": "y", "handle": 0}}]} diff --git a/tests/shell/testcases/flowtable/dumps/0010delete_handle_0.json-nft b/tests/shell/testcases/flowtable/dumps/0010delete_handle_0.json-nft index 8673e599..6de121c8 100644 --- a/tests/shell/testcases/flowtable/dumps/0010delete_handle_0.json-nft +++ b/tests/shell/testcases/flowtable/dumps/0010delete_handle_0.json-nft @@ -1 +1 @@ -{"nftables": [{"metainfo": {"version": "VERSION", "release_name": "RELEASE_NAME", "json_schema_version": 1}}, {"table": {"family": "inet", "name": "t", "handle": 1}}]} +{"nftables": [{"metainfo": {"version": "VERSION", "release_name": "RELEASE_NAME", "json_schema_version": 1}}, {"table": {"family": "inet", "name": "t", "handle": 0}}]} diff --git a/tests/shell/testcases/flowtable/dumps/0011deleteafterflush_0.json-nft b/tests/shell/testcases/flowtable/dumps/0011deleteafterflush_0.json-nft index ee19cb85..e6b3a36d 100644 --- a/tests/shell/testcases/flowtable/dumps/0011deleteafterflush_0.json-nft +++ b/tests/shell/testcases/flowtable/dumps/0011deleteafterflush_0.json-nft @@ -1 +1 @@ -{"nftables": [{"metainfo": {"version": "VERSION", "release_name": "RELEASE_NAME", "json_schema_version": 1}}, {"table": {"family": "ip", "name": "x", "handle": 1}}, {"chain": {"family": "ip", "table": "x", "name": "y", "handle": 1}}]} +{"nftables": [{"metainfo": {"version": "VERSION", "release_name": "RELEASE_NAME", "json_schema_version": 1}}, {"table": {"family": "ip", "name": "x", "handle": 0}}, {"chain": {"family": "ip", "table": "x", "name": "y", "handle": 0}}]} diff --git a/tests/shell/testcases/flowtable/dumps/0012flowtable_variable_0.json-nft b/tests/shell/testcases/flowtable/dumps/0012flowtable_variable_0.json-nft index 1c4331e3..562a94fd 100644 --- a/tests/shell/testcases/flowtable/dumps/0012flowtable_variable_0.json-nft +++ b/tests/shell/testcases/flowtable/dumps/0012flowtable_variable_0.json-nft @@ -1 +1 @@ -{"nftables": [{"metainfo": {"version": "VERSION", "release_name": "RELEASE_NAME", "json_schema_version": 1}}, {"table": {"family": "ip", "name": "filter1", "handle": 1}}, {"flowtable": {"family": "ip", "name": "Main_ft1", "table": "filter1", "handle": 1, "hook": "ingress", "prio": 0, "dev": "lo"}}, {"table": {"family": "ip", "name": "filter2", "handle": 2}}, {"flowtable": {"family": "ip", "name": "Main_ft2", "table": "filter2", "handle": 1, "hook": "ingress", "prio": 0, "dev": "lo"}}]} +{"nftables": [{"metainfo": {"version": "VERSION", "release_name": "RELEASE_NAME", "json_schema_version": 1}}, {"table": {"family": "ip", "name": "filter1", "handle": 0}}, {"flowtable": {"family": "ip", "name": "Main_ft1", "table": "filter1", "handle": 0, "hook": "ingress", "prio": 0, "dev": "lo"}}, {"table": {"family": "ip", "name": "filter2", "handle": 0}}, {"flowtable": {"family": "ip", "name": "Main_ft2", "table": "filter2", "handle": 0, "hook": "ingress", "prio": 0, "dev": "lo"}}]} diff --git a/tests/shell/testcases/flowtable/dumps/0013addafterdelete_0.json-nft b/tests/shell/testcases/flowtable/dumps/0013addafterdelete_0.json-nft index 6d79157d..24a1aa39 100644 --- a/tests/shell/testcases/flowtable/dumps/0013addafterdelete_0.json-nft +++ b/tests/shell/testcases/flowtable/dumps/0013addafterdelete_0.json-nft @@ -1 +1 @@ -{"nftables": [{"metainfo": {"version": "VERSION", "release_name": "RELEASE_NAME", "json_schema_version": 1}}, {"table": {"family": "inet", "name": "filter", "handle": 1}}, {"flowtable": {"family": "inet", "name": "f", "table": "filter", "handle": 2, "hook": "ingress", "prio": -1, "dev": "lo"}}]} +{"nftables": [{"metainfo": {"version": "VERSION", "release_name": "RELEASE_NAME", "json_schema_version": 1}}, {"table": {"family": "inet", "name": "filter", "handle": 0}}, {"flowtable": {"family": "inet", "name": "f", "table": "filter", "handle": 0, "hook": "ingress", "prio": -1, "dev": "lo"}}]} diff --git a/tests/shell/testcases/flowtable/dumps/0014addafterdelete_0.json-nft b/tests/shell/testcases/flowtable/dumps/0014addafterdelete_0.json-nft index e66962b6..06ce1d5f 100644 --- a/tests/shell/testcases/flowtable/dumps/0014addafterdelete_0.json-nft +++ b/tests/shell/testcases/flowtable/dumps/0014addafterdelete_0.json-nft @@ -1 +1 @@ -{"nftables": [{"metainfo": {"version": "VERSION", "release_name": "RELEASE_NAME", "json_schema_version": 1}}, {"table": {"family": "inet", "name": "filter", "handle": 1}}, {"flowtable": {"family": "inet", "name": "f", "table": "filter", "handle": 4, "hook": "ingress", "prio": -1, "dev": "lo"}}, {"chain": {"family": "inet", "table": "filter", "name": "y", "handle": 1, "type": "filter", "hook": "forward", "prio": 0, "policy": "accept"}}, {"rule": {"family": "inet", "table": "filter", "chain": "y", "handle": 5, "expr": [{"flow": {"op": "add", "flowtable": "@f"}}, {"counter": {"packets": 0, "bytes": 0}}]}}]} +{"nftables": [{"metainfo": {"version": "VERSION", "release_name": "RELEASE_NAME", "json_schema_version": 1}}, {"table": {"family": "inet", "name": "filter", "handle": 0}}, {"flowtable": {"family": "inet", "name": "f", "table": "filter", "handle": 0, "hook": "ingress", "prio": -1, "dev": "lo"}}, {"chain": {"family": "inet", "table": "filter", "name": "y", "handle": 0, "type": "filter", "hook": "forward", "prio": 0, "policy": "accept"}}, {"rule": {"family": "inet", "table": "filter", "chain": "y", "handle": 0, "expr": [{"flow": {"op": "add", "flowtable": "@f"}}, {"counter": {"packets": 0, "bytes": 0}}]}}]} diff --git a/tests/shell/testcases/flowtable/dumps/0015destroy_0.json-nft b/tests/shell/testcases/flowtable/dumps/0015destroy_0.json-nft index e34102c3..5696ef28 100644 --- a/tests/shell/testcases/flowtable/dumps/0015destroy_0.json-nft +++ b/tests/shell/testcases/flowtable/dumps/0015destroy_0.json-nft @@ -1 +1 @@ -{"nftables": [{"metainfo": {"version": "VERSION", "release_name": "RELEASE_NAME", "json_schema_version": 1}}, {"table": {"family": "ip", "name": "t", "handle": 1}}]} +{"nftables": [{"metainfo": {"version": "VERSION", "release_name": "RELEASE_NAME", "json_schema_version": 1}}, {"table": {"family": "ip", "name": "t", "handle": 0}}]} |