From 25f34daca210c78fea5c346724438ac36e32433b Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Mon, 9 Sep 2024 17:26:01 +0200 Subject: [PATCH] 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 --- tests/shell/features/elem_timeout_update.sh | 22 ++++ .../set_element_timeout_updates.json-nft | 43 +++++++ .../dumps/set_element_timeout_updates.nft | 10 ++ .../sets/set_element_timeout_updates | 120 ++++++++++++++++++ 4 files changed, 195 insertions(+) create mode 100755 tests/shell/features/elem_timeout_update.sh create mode 100644 tests/shell/testcases/sets/dumps/set_element_timeout_updates.json-nft create mode 100644 tests/shell/testcases/sets/dumps/set_element_timeout_updates.nft create mode 100755 tests/shell/testcases/sets/set_element_timeout_updates diff --git a/tests/shell/features/elem_timeout_update.sh b/tests/shell/features/elem_timeout_update.sh new file mode 100755 index 00000000..6243170a --- /dev/null +++ b/tests/shell/features/elem_timeout_update.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# 4201f3938914 ("netfilter: nf_tables: set element timeout update support") + +$NFT -f - <