The tests all assume that they can pass traffic unless
ipfw is configured otherwise. That's only true if
net.inet.ip.fw.default_to_accept is set (as is the case on
ci.freebsd.org).
Reported by: rscheff
MFC after: 1 week
Differential D43078
netpfil tests: do not run ipfw tests if net.inet.ip.fw.default_to_accept is not set kp on Dec 16 2023, 4:24 PM. Authored by Tags None Referenced Files
Details
Diff Detail
Event TimelineComment Actions Maybe just print a warning instead; But this is indeed the setting preventing the tests to pass, as no accept-all rule is added prior to the sanity checks in the existing ipfw / pf tests.
Comment Actions In principle you are correct that it'd be better to assume the default (i.e. block) behaviour from ipfw. I expect it'd be fairly straightforward to adjust the existing tests to match that assumption. My main concern with that is that we do change the default for ci.freebsd.org (presumably at least in part because otherwise we'd have to configure ipfw rules on the test host/VM), and that'd mean that the assumed test environment wouldn't match the actual environment. I'm going to cc lwhsu here, as he tends to take care of the CI tests. Comment Actions Maybe the middle ground would be to have a printf instead of the atf_skip in that clause, to inform about the possibility of tests failing, but running them nevertheless... Subsequently, the VNET config in the various test cases could add the defaul permit all, to allow executing the tests typically on a system without rebooting... Comment Actions As far as I know there's not really any infrastructure in atf-sh to allow for warnings like this. We could printf it, but that'd only be visible in the test debug output which is not displayed by default.
I've taken a quick look at changing the existing tests to cope with net.inet.ip.fw.default_to_accept being 0, and it ends up adding a fair bit of boilerplate to the tests. Not insurmountably so, but I have a strong desire to keep the tests as simple as possible. dummynet.sh | 154 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------- utils.subr | 18 +++++++++++++++--- 2 files changed, 122 insertions(+), 50 deletions(-)
|