path: root/tests/shell
diff options
authorHarsha Sharma <>2018-01-24 05:16:01 +0530
committerPablo Neira Ayuso <>2018-01-25 20:50:55 +0100
commit0c9a946f51880a7163230cc1929ee4392c6a817f (patch)
tree829230e82850a83618511b0bdf3bb5a9a7d7636f /tests/shell
parent6312c4afd405e6a318b9ca87336b96880e39ab2a (diff)
tests: shell: fetch rule handle with '-a' option and then delete rule
Fetch rule handle and then delete rule via that rule handle. Signed-off-by: Harsha Sharma <> Signed-off-by: Pablo Neira Ayuso <>
Diffstat (limited to 'tests/shell')
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/shell/testcases/cache/0001_cache_handling_0 b/tests/shell/testcases/cache/0001_cache_handling_0
index 9a737695..3693f15a 100755
--- a/tests/shell/testcases/cache/0001_cache_handling_0
+++ b/tests/shell/testcases/cache/0001_cache_handling_0
@@ -24,6 +24,7 @@ table inet test {
set -e
$NFT -f $tmpfile
-$NFT delete rule inet test test handle 2
+rule_handle=$($NFT list ruleset -a | awk '/saddr/{print $NF}')
+$NFT delete rule inet test test handle $rule_handle
$NFT delete set inet test test
$NFT -f $tmpfile