summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJeremy Sowden <jeremy@azazel.net>2023-03-17 10:16:50 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2023-03-28 10:26:34 +0200
commitad8546da23ecdccf31f8a77c8d7906fefd569bf5 (patch)
tree3591d744bec49a84bdab60f779f0e770e54e5f91 /tests
parent8221d86e616bdd5e9828c3eefb7cfb9abc3d211a (diff)
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 <jeremy@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/shell/testcases/bitwise/0040mark_binop_0 (renamed from tests/shell/testcases/chains/0040mark_shift_0)2
-rwxr-xr-xtests/shell/testcases/bitwise/0040mark_binop_1 (renamed from tests/shell/testcases/chains/0040mark_shift_1)2
-rw-r--r--tests/shell/testcases/bitwise/dumps/0040mark_binop_0.nft (renamed from tests/shell/testcases/chains/dumps/0040mark_shift_0.nft)2
-rw-r--r--tests/shell/testcases/bitwise/dumps/0040mark_binop_1.nft (renamed from tests/shell/testcases/chains/dumps/0040mark_shift_1.nft)2
4 files changed, 4 insertions, 4 deletions
diff --git a/tests/shell/testcases/chains/0040mark_shift_0 b/tests/shell/testcases/bitwise/0040mark_binop_0
index ef3dccfa..4280e33a 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
index b609f5ef..7e71f3eb 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
index 52d59d2c..fc0a600a 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
index 56ec8dc7..dbaacefb 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
}
}