From b4060b2e5649d920ee40b27038a89569cf9e0f85 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Mon, 14 Jun 2021 20:51:11 +0200 Subject: tests: shell: cover split chain reference across tables Add a test to cover table T1 containing the definition of chain C1, and table T1' (actually the same definition as T1) that contains a (jump) reference to chain C1. Signed-off-by: Pablo Neira Ayuso --- tests/shell/testcases/nft-f/0027split_chains_0 | 17 +++++++++++++++++ .../shell/testcases/nft-f/dumps/0027split_chains_0.nft | 9 +++++++++ 2 files changed, 26 insertions(+) create mode 100755 tests/shell/testcases/nft-f/0027split_chains_0 create mode 100644 tests/shell/testcases/nft-f/dumps/0027split_chains_0.nft (limited to 'tests/shell') diff --git a/tests/shell/testcases/nft-f/0027split_chains_0 b/tests/shell/testcases/nft-f/0027split_chains_0 new file mode 100755 index 00000000..de1e5a00 --- /dev/null +++ b/tests/shell/testcases/nft-f/0027split_chains_0 @@ -0,0 +1,17 @@ +#!/bin/bash + +set -e + +RULESET="table inet filter { + chain x { + } +} +table inet filter { + chain input { + type filter hook input priority filter; policy accept; + jump x + } +}" + +$NFT -f - <<< "$RULESET" && exit 0 +exit 1 diff --git a/tests/shell/testcases/nft-f/dumps/0027split_chains_0.nft b/tests/shell/testcases/nft-f/dumps/0027split_chains_0.nft new file mode 100644 index 00000000..39198be1 --- /dev/null +++ b/tests/shell/testcases/nft-f/dumps/0027split_chains_0.nft @@ -0,0 +1,9 @@ +table inet filter { + chain x { + } + + chain input { + type filter hook input priority filter; policy accept; + jump x + } +} -- cgit v1.2.3