From 2624a4576442d1f98efc21c96b3d7a66eb22af16 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 8 Sep 2023 16:14:25 +0200 Subject: tests/shell: generate and add ".nft" dump files for existing tests Several tests didn't have a ".nft" dump file committed. Generate one and commit it to git. While not all tests have a stable ruleset to compare, many have. Commit the .nft files for the tests where the output appears to be stable. This was generated by running `./tests/shell/run-tests.sh -g` twice, and commit the files that were identical both times. Note that 7 tests on my machine fail, so those are skipped. Also skip the files tests/shell/testcases/maps/dumps/0004interval_map_create_once_0.nft tests/shell/testcases/nft-f/dumps/0011manydefines_0.nft tests/shell/testcases/sets/dumps/0011add_many_elements_0.nft tests/shell/testcases/sets/dumps/0030add_many_elements_interval_0.nft tests/shell/testcases/sets/dumps/0068interval_stack_overflow_0.nft Those files are larger than 100KB, and I don't think we want to blow up the git repository this way. Even if they are only text files and compress well. Signed-off-by: Thomas Haller Signed-off-by: Florian Westphal --- .../testcases/flowtable/dumps/0002create_flowtable_0.nft | 6 ++++++ .../testcases/flowtable/dumps/0003add_after_flush_0.nft | 6 ++++++ .../testcases/flowtable/dumps/0004delete_after_add_0.nft | 2 ++ .../shell/testcases/flowtable/dumps/0005delete_in_use_1.nft | 10 ++++++++++ tests/shell/testcases/flowtable/dumps/0006segfault_0.nft | 2 ++ tests/shell/testcases/flowtable/dumps/0007prio_0.nft | 2 ++ tests/shell/testcases/flowtable/dumps/0008prio_1.nft | 2 ++ .../testcases/flowtable/dumps/0009deleteafterflush_0.nft | 4 ++++ .../shell/testcases/flowtable/dumps/0010delete_handle_0.nft | 2 ++ .../testcases/flowtable/dumps/0011deleteafterflush_0.nft | 4 ++++ .../shell/testcases/flowtable/dumps/0013addafterdelete_0.nft | 7 +++++++ .../shell/testcases/flowtable/dumps/0014addafterdelete_0.nft | 12 ++++++++++++ 12 files changed, 59 insertions(+) create mode 100644 tests/shell/testcases/flowtable/dumps/0002create_flowtable_0.nft create mode 100644 tests/shell/testcases/flowtable/dumps/0003add_after_flush_0.nft create mode 100644 tests/shell/testcases/flowtable/dumps/0004delete_after_add_0.nft create mode 100644 tests/shell/testcases/flowtable/dumps/0005delete_in_use_1.nft create mode 100644 tests/shell/testcases/flowtable/dumps/0006segfault_0.nft create mode 100644 tests/shell/testcases/flowtable/dumps/0007prio_0.nft create mode 100644 tests/shell/testcases/flowtable/dumps/0008prio_1.nft create mode 100644 tests/shell/testcases/flowtable/dumps/0009deleteafterflush_0.nft create mode 100644 tests/shell/testcases/flowtable/dumps/0010delete_handle_0.nft create mode 100644 tests/shell/testcases/flowtable/dumps/0011deleteafterflush_0.nft create mode 100644 tests/shell/testcases/flowtable/dumps/0013addafterdelete_0.nft create mode 100644 tests/shell/testcases/flowtable/dumps/0014addafterdelete_0.nft (limited to 'tests/shell/testcases/flowtable') diff --git a/tests/shell/testcases/flowtable/dumps/0002create_flowtable_0.nft b/tests/shell/testcases/flowtable/dumps/0002create_flowtable_0.nft new file mode 100644 index 00000000..aecfb2ab --- /dev/null +++ b/tests/shell/testcases/flowtable/dumps/0002create_flowtable_0.nft @@ -0,0 +1,6 @@ +table ip t { + flowtable f { + hook ingress priority filter + 10 + devices = { lo } + } +} diff --git a/tests/shell/testcases/flowtable/dumps/0003add_after_flush_0.nft b/tests/shell/testcases/flowtable/dumps/0003add_after_flush_0.nft new file mode 100644 index 00000000..dd904f44 --- /dev/null +++ b/tests/shell/testcases/flowtable/dumps/0003add_after_flush_0.nft @@ -0,0 +1,6 @@ +table ip x { + flowtable y { + hook ingress priority filter + devices = { lo } + } +} diff --git a/tests/shell/testcases/flowtable/dumps/0004delete_after_add_0.nft b/tests/shell/testcases/flowtable/dumps/0004delete_after_add_0.nft new file mode 100644 index 00000000..5d4d2caf --- /dev/null +++ b/tests/shell/testcases/flowtable/dumps/0004delete_after_add_0.nft @@ -0,0 +1,2 @@ +table ip x { +} diff --git a/tests/shell/testcases/flowtable/dumps/0005delete_in_use_1.nft b/tests/shell/testcases/flowtable/dumps/0005delete_in_use_1.nft new file mode 100644 index 00000000..c1d79e7b --- /dev/null +++ b/tests/shell/testcases/flowtable/dumps/0005delete_in_use_1.nft @@ -0,0 +1,10 @@ +table ip x { + flowtable y { + hook ingress priority filter + devices = { lo } + } + + chain x { + flow add @y + } +} diff --git a/tests/shell/testcases/flowtable/dumps/0006segfault_0.nft b/tests/shell/testcases/flowtable/dumps/0006segfault_0.nft new file mode 100644 index 00000000..985768ba --- /dev/null +++ b/tests/shell/testcases/flowtable/dumps/0006segfault_0.nft @@ -0,0 +1,2 @@ +table ip t { +} diff --git a/tests/shell/testcases/flowtable/dumps/0007prio_0.nft b/tests/shell/testcases/flowtable/dumps/0007prio_0.nft new file mode 100644 index 00000000..985768ba --- /dev/null +++ b/tests/shell/testcases/flowtable/dumps/0007prio_0.nft @@ -0,0 +1,2 @@ +table ip t { +} diff --git a/tests/shell/testcases/flowtable/dumps/0008prio_1.nft b/tests/shell/testcases/flowtable/dumps/0008prio_1.nft new file mode 100644 index 00000000..985768ba --- /dev/null +++ b/tests/shell/testcases/flowtable/dumps/0008prio_1.nft @@ -0,0 +1,2 @@ +table ip t { +} diff --git a/tests/shell/testcases/flowtable/dumps/0009deleteafterflush_0.nft b/tests/shell/testcases/flowtable/dumps/0009deleteafterflush_0.nft new file mode 100644 index 00000000..8e818d2d --- /dev/null +++ b/tests/shell/testcases/flowtable/dumps/0009deleteafterflush_0.nft @@ -0,0 +1,4 @@ +table ip x { + chain y { + } +} diff --git a/tests/shell/testcases/flowtable/dumps/0010delete_handle_0.nft b/tests/shell/testcases/flowtable/dumps/0010delete_handle_0.nft new file mode 100644 index 00000000..17838bdf --- /dev/null +++ b/tests/shell/testcases/flowtable/dumps/0010delete_handle_0.nft @@ -0,0 +1,2 @@ +table inet t { +} diff --git a/tests/shell/testcases/flowtable/dumps/0011deleteafterflush_0.nft b/tests/shell/testcases/flowtable/dumps/0011deleteafterflush_0.nft new file mode 100644 index 00000000..8e818d2d --- /dev/null +++ b/tests/shell/testcases/flowtable/dumps/0011deleteafterflush_0.nft @@ -0,0 +1,4 @@ +table ip x { + chain y { + } +} diff --git a/tests/shell/testcases/flowtable/dumps/0013addafterdelete_0.nft b/tests/shell/testcases/flowtable/dumps/0013addafterdelete_0.nft new file mode 100644 index 00000000..83fdd5d0 --- /dev/null +++ b/tests/shell/testcases/flowtable/dumps/0013addafterdelete_0.nft @@ -0,0 +1,7 @@ +table inet filter { + flowtable f { + hook ingress priority filter - 1 + devices = { lo } + counter + } +} diff --git a/tests/shell/testcases/flowtable/dumps/0014addafterdelete_0.nft b/tests/shell/testcases/flowtable/dumps/0014addafterdelete_0.nft new file mode 100644 index 00000000..145aa081 --- /dev/null +++ b/tests/shell/testcases/flowtable/dumps/0014addafterdelete_0.nft @@ -0,0 +1,12 @@ +table inet filter { + flowtable f { + hook ingress priority filter - 1 + devices = { lo } + counter + } + + chain y { + type filter hook forward priority filter; policy accept; + flow add @f counter packets 0 bytes 0 + } +} -- cgit v1.2.3