summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/bitwise/dumps
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/shell/testcases/bitwise/dumps
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/shell/testcases/bitwise/dumps')
-rw-r--r--tests/shell/testcases/bitwise/dumps/0040mark_binop_0.nft6
-rw-r--r--tests/shell/testcases/bitwise/dumps/0040mark_binop_1.nft6
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/shell/testcases/bitwise/dumps/0040mark_binop_0.nft b/tests/shell/testcases/bitwise/dumps/0040mark_binop_0.nft
new file mode 100644
index 00000000..fc0a600a
--- /dev/null
+++ b/tests/shell/testcases/bitwise/dumps/0040mark_binop_0.nft
@@ -0,0 +1,6 @@
+table ip t {
+ chain c {
+ type filter hook output priority filter; policy accept;
+ oif "lo" ct mark set (meta mark | 0x00000010) << 8
+ }
+}
diff --git a/tests/shell/testcases/bitwise/dumps/0040mark_binop_1.nft b/tests/shell/testcases/bitwise/dumps/0040mark_binop_1.nft
new file mode 100644
index 00000000..dbaacefb
--- /dev/null
+++ b/tests/shell/testcases/bitwise/dumps/0040mark_binop_1.nft
@@ -0,0 +1,6 @@
+table ip t {
+ chain c {
+ type filter hook input priority filter; policy accept;
+ iif "lo" ct mark & 0x000000ff == 0x00000010 meta mark set ct mark >> 8
+ }
+}