diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2023-11-21 20:29:55 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2023-11-22 10:14:10 +0100 |
commit | 8ecf78c181ad7afa727f84460042fba7378d9c0e (patch) | |
tree | e6fc4617f66080e0dbde4b4b34fc8030d6c26540 /tests/shell/features | |
parent | 56e8d84b1c4f923a64adfcfcde5c15d4d25ec47d (diff) |
tests: shell: skip stateful object updates if unsupported
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/shell/features')
-rwxr-xr-x | tests/shell/features/stateful_object_update.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/shell/features/stateful_object_update.sh b/tests/shell/features/stateful_object_update.sh new file mode 100755 index 00000000..62fbf7e3 --- /dev/null +++ b/tests/shell/features/stateful_object_update.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# d62d0ba97b58 ("netfilter: nf_tables: Introduce stateful object update operation") +# v5.4-rc1~131^2~59^2~2 + +set -e +$NFT add table test-ip +$NFT add quota test-ip traffic-quota 25 mbytes +$NFT add quota test-ip traffic-quota 50 mbytes + +EXPECTED="table ip test-ip { + quota traffic-quota { + 50 mbytes + } +}" + +GET="$($NFT list ruleset)" +if [ "$EXPECTED" != "$GET" ] ; then + diff -u <(echo "$EXPECTED") <(echo "$GET") + exit 1 +fi |