From: Pablo Neira Ayuso Date: Mon, 14 Jun 2021 18:51:11 +0000 (+0200) Subject: tests: shell: cover split chain reference across tables X-Git-Tag: v1.0.0~61 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b4060b2e5649d920ee40b27038a89569cf9e0f85;p=thirdparty%2Fnftables.git 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 --- 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 + } +}