From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [91.216.245.30]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 78833158D7F for ; Mon, 9 Sep 2024 16:31:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.216.245.30 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725899470; cv=none; b=SNw702pua0mRnlai0PGyU59+ZY2AABamUxQ4UsbJTsHtspWvlVjqsfleUh7j99N2/ZbTQzWuA5RjaI80CTR8L4aQl1au8GkeYGU753Ibf7GBMLcpkzAMLsoJaoz0O3vDK4veoHPh5AZjYBB6lCMJXDG+M7YLYThDcfHTi1z+SPg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725899470; c=relaxed/simple; bh=NK8qKQeTrQRO8ogmo5WfenCxErmCM9y5+MzsaQwkBh4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=kLQKKohrFWmxC/G5KHb//ymY1Q2ASvwIVWhs0IZF12tCOwMpFqVPSmy0Rj5g7NrMSTKtWI88zOe4tuEebPwNjjkh3kTOFXWjU5dVLmunOs907SKPjbQTNcXlUlXGj1Xf+O5awLMUZwSg+6QhY2uWs3e9+9siqYNoMAv/EKmnnkg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=strlen.de; spf=pass smtp.mailfrom=breakpoint.cc; arc=none smtp.client-ip=91.216.245.30 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=strlen.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=breakpoint.cc Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1snhIA-0000Ct-Kn; Mon, 09 Sep 2024 18:31:06 +0200 From: Florian Westphal To: Cc: Florian Westphal Subject: [PATCH nft] tests: shell: add test case for timeout updates Date: Mon, 9 Sep 2024 18:16:42 +0200 Message-ID: <20240909161733.4360-1-fw@strlen.de> X-Mailer: git-send-email 2.44.2 Precedence: bulk X-Mailing-List: netfilter-devel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 000000000000..6243170a6023 --- /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 - <