From: Jeremy Sowden Date: Fri, 17 Mar 2023 09:16:50 +0000 (+0100) Subject: tests: shell: rename and move bitwise test-cases X-Git-Tag: v1.0.8~74 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ad8546da23ecdccf31f8a77c8d7906fefd569bf5;p=thirdparty%2Fnftables.git tests: shell: rename and move bitwise test-cases The `0040mark_shift_?` tests are testing not just shifts, but binops more generally, so name them accordingly. Move them to a new folder specifically for bitwise operations. Change the priorities of the chains to match the type. Signed-off-by: Jeremy Sowden Signed-off-by: Pablo Neira Ayuso --- diff --git a/tests/shell/testcases/chains/0040mark_shift_0 b/tests/shell/testcases/bitwise/0040mark_binop_0 similarity index 68% rename from tests/shell/testcases/chains/0040mark_shift_0 rename to tests/shell/testcases/bitwise/0040mark_binop_0 index ef3dccfa0..4280e33ac 100755 --- a/tests/shell/testcases/chains/0040mark_shift_0 +++ b/tests/shell/testcases/bitwise/0040mark_binop_0 @@ -4,7 +4,7 @@ set -e RULESET=" add table t - add chain t c { type filter hook output priority mangle; } + add chain t c { type filter hook output priority filter; } add rule t c oif lo ct mark set (meta mark | 0x10) << 8 " diff --git a/tests/shell/testcases/chains/0040mark_shift_1 b/tests/shell/testcases/bitwise/0040mark_binop_1 similarity index 70% rename from tests/shell/testcases/chains/0040mark_shift_1 rename to tests/shell/testcases/bitwise/0040mark_binop_1 index b609f5ef1..7e71f3eb4 100755 --- a/tests/shell/testcases/chains/0040mark_shift_1 +++ b/tests/shell/testcases/bitwise/0040mark_binop_1 @@ -4,7 +4,7 @@ set -e RULESET=" add table t - add chain t c { type filter hook input priority mangle; } + add chain t c { type filter hook input priority filter; } add rule t c iif lo ct mark & 0xff 0x10 meta mark set ct mark >> 8 " diff --git a/tests/shell/testcases/chains/dumps/0040mark_shift_0.nft b/tests/shell/testcases/bitwise/dumps/0040mark_binop_0.nft similarity index 58% rename from tests/shell/testcases/chains/dumps/0040mark_shift_0.nft rename to tests/shell/testcases/bitwise/dumps/0040mark_binop_0.nft index 52d59d2c6..fc0a600a4 100644 --- a/tests/shell/testcases/chains/dumps/0040mark_shift_0.nft +++ b/tests/shell/testcases/bitwise/dumps/0040mark_binop_0.nft @@ -1,6 +1,6 @@ table ip t { chain c { - type filter hook output priority mangle; policy accept; + type filter hook output priority filter; policy accept; oif "lo" ct mark set (meta mark | 0x00000010) << 8 } } diff --git a/tests/shell/testcases/chains/dumps/0040mark_shift_1.nft b/tests/shell/testcases/bitwise/dumps/0040mark_binop_1.nft similarity index 64% rename from tests/shell/testcases/chains/dumps/0040mark_shift_1.nft rename to tests/shell/testcases/bitwise/dumps/0040mark_binop_1.nft index 56ec8dc76..dbaacefb9 100644 --- a/tests/shell/testcases/chains/dumps/0040mark_shift_1.nft +++ b/tests/shell/testcases/bitwise/dumps/0040mark_binop_1.nft @@ -1,6 +1,6 @@ table ip t { chain c { - type filter hook input priority mangle; policy accept; + type filter hook input priority filter; policy accept; iif "lo" ct mark & 0x000000ff == 0x00000010 meta mark set ct mark >> 8 } }