]> git.ipfire.org Git - thirdparty/nftables.git/commit
tests: shell: add test case for timeout updates
authorFlorian Westphal <fw@strlen.de>
Mon, 9 Sep 2024 15:26:01 +0000 (17:26 +0200)
committerFlorian Westphal <fw@strlen.de>
Tue, 10 Sep 2024 12:32:01 +0000 (14:32 +0200)
commit25f34daca210c78fea5c346724438ac36e32433b
treea25d1c236994a7885bb98f7a4bc37b6089fed1fb
parentdb80037c0279acfba9da1dbfd0bd0868b61e836c
tests: shell: add test case for timeout updates

Needs a feature check file, so add one:
Add element with 1m timeout, then update expiry to 1ms.
If element still exists after 1ms, update request was ignored.

Test case checks timeouts can both be incremented and decremented,
checks error recovery (update request but transaction fails) and
that expiry is restored in addion to timeout.

Signed-off-by: Florian Westphal <fw@strlen.de>
tests/shell/features/elem_timeout_update.sh [new file with mode: 0755]
tests/shell/testcases/sets/dumps/set_element_timeout_updates.json-nft [new file with mode: 0644]
tests/shell/testcases/sets/dumps/set_element_timeout_updates.nft [new file with mode: 0644]
tests/shell/testcases/sets/set_element_timeout_updates [new file with mode: 0755]