selftests: netfilter: Extend nft_audit.sh
authorPhil Sutter <phil@nwl.cc>
Sat, 23 Sep 2023 01:53:49 +0000 (03:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Oct 2023 20:00:43 +0000 (22:00 +0200)
commite1bbe4afe1a38e679d8704ec16c11e542ad9acc4
treefe493dff1f5ef84ecfb8cc5ae2e2d548c5e138ca
parent82273f15e3db717a03c07d71481354e38babdc17
selftests: netfilter: Extend nft_audit.sh

[ Upstream commit 203bb9d39866d3c5a8135433ce3742fe4f9d5741 ]

Add tests for sets and elements and deletion of all kinds. Also
reorder rule reset tests: By moving the bulk rule add command up, the
two 'reset rules' tests become identical.

While at it, fix for a failing bulk rule add test's error status getting
lost due to its use in a pipe. Avoid this by using a temporary file.

Headings in diff output for failing tests contain no useful data, strip
them.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Florian Westphal <fw@strlen.de>
Stable-dep-of: 0d880dc6f032 ("netfilter: nf_tables: Deduplicate nft_register_obj audit logs")
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/netfilter/nft_audit.sh