From ddf8036a155613a29603abfe115060ad4c23ef17 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Fri, 15 Feb 2019 11:05:43 +0100 Subject: tests: shell: flush after rule deletion Flush after rule deletion should hit no ENOENT. Signed-off-by: Pablo Neira Ayuso --- tests/shell/testcases/transactions/0044rule_0 | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 tests/shell/testcases/transactions/0044rule_0 (limited to 'tests/shell/testcases') diff --git a/tests/shell/testcases/transactions/0044rule_0 b/tests/shell/testcases/transactions/0044rule_0 new file mode 100755 index 00000000..a4da480b --- /dev/null +++ b/tests/shell/testcases/transactions/0044rule_0 @@ -0,0 +1,22 @@ +#!/bin/bash + +set -e + +RULESET="add table ip test +add chain ip test tc +add rule ip test tc counter" + +$NFT -f - <<< "$RULESET" +if [ $? -ne 0 ] ; then + echo "E: unable to load good ruleset" >&2 + exit 1 +fi + +RULESET="delete rule ip test tc handle 2 +flush ruleset" + +$NFT -f - <<< "$RULESET" +if [ $? -ne 0 ] ; then + echo "E: unable to load good ruleset" >&2 + exit 1 +fi -- cgit v1.2.3