]> git.ipfire.org Git - thirdparty/nftables.git/commit
tests/py: Avoid duplicate records in *.got files
authorPhil Sutter <phil@nwl.cc>
Thu, 4 Feb 2021 14:58:25 +0000 (15:58 +0100)
committerPhil Sutter <phil@nwl.cc>
Tue, 30 Nov 2021 13:57:46 +0000 (14:57 +0100)
commit38f1546ff34ae93d15caf5d003951aeb184a0396
tree24a2084b1e564a7b528c1b5d86afec8987daff53
parent443503f53530c3829e7805018b3f7b55e6dcd3c4
tests/py: Avoid duplicate records in *.got files

If payloads don't contain family-specific bits, they may sit in a single
*.payload file for all tested families. In such case, nft-test.py will
consequently write dissenting payloads into a single *.got file. To
avoid the duplicate entries, check if a matching record exists already
before writing it out.

Signed-off-by: Phil Sutter <phil@nwl.cc>
tests/py/nft-test.py