Message ID | 20180508115237.27129-1-pablo@netfilter.org |
---|---|
State | Accepted |
Delegated to: | Pablo Neira |
Headers | show |
Series | [1/2,nft] tests: shell: delete chain and rule with jump to chain in same transaction | expand |
diff --git a/tests/shell/testcases/transactions/0015chain_0 b/tests/shell/testcases/transactions/0015chain_0 new file mode 100755 index 000000000000..90f87182ef54 --- /dev/null +++ b/tests/shell/testcases/transactions/0015chain_0 @@ -0,0 +1,25 @@ +#!/bin/bash + +set -e + +RULESET="add table x +add chain x y +add chain x z +add rule x z jump y" + +$NFT -f - <<< $RULESET +if [ $? -ne 0 ] ; then + echo "E: unable to load good ruleset" >&2 + exit 1 +fi + +RULESET="delete rule x z handle 3 +delete chain x z +delete chain x y +delete table x" + +$NFT -f - <<< $RULESET +if [ $? -ne 0 ] ; then + echo "E: unable to load good ruleset" >&2 + exit 1 +fi
We should not hit EBUSY in this case. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> --- tests/shell/testcases/transactions/0015chain_0 | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 tests/shell/testcases/transactions/0015chain_0