]> git.ipfire.org Git - thirdparty/libvirt.git/commit
tests: fix broken nftables test data so that individual tests are successful
authorLaine Stump <laine@redhat.com>
Wed, 12 Jun 2024 19:25:46 +0000 (15:25 -0400)
committerDaniel P. Berrangé <berrange@redhat.com>
Mon, 24 Jun 2024 12:49:26 +0000 (13:49 +0100)
commitaabf279ca07d9d5c3d2e6d4efd7d4c5bc2dd471e
tree6c717d5ea25a3ed2a302783e70704ee1c5d83f42
parent3a9095976e1060f95a8a4a985d5e9901e1098547
tests: fix broken nftables test data so that individual tests are successful

When the chain names and table name used by the nftables firewall
backend were changed in commit
958aa7f274904eb8e4678a43eac845044f0dcc38, I forgot to change the test
data file base.nftables, which has the extra "list" and "add
chain/table" commands that are generated for the first test case of
networkxml2firewalltest.c. When the full set of tests is run, the
first test will be an iptables test case, so those extra commands
won't be added to any of the nftables cases, and so the data in
base.nftables never matches, and the tests are all successful.

However, if the test are limited with, e.g. VIR_TEST_RANGE=2 (test #2
will be the nftables version of the 1st test case), then the commands
to add nftables table/chains *will* be generated in the test output,
and so the test will fail. Because I was only running the entire test
series after the initial commits of nftables tests, I didn't notice
this. Until now.

base.nftables has now been updated to reflect the current names for
chains/table, and running individual test cases is once again
successful.

Fixes: 958aa7f274904eb8e4678a43eac845044f0dcc38
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Laine Stump <laine@redhat.com>
tests/networkxml2firewalldata/base.nftables