When building light FreeBSD without if_epair, this regression test fail because
it can't load the module.
Uses the helper macro to skip this test if the module doesn't exist.
Details
- Reviewers
kp - Commits
- rS358589: Skip if_epair regression test if module doesn't exist
- mv /boot/kernel/if_epair.ko /boot/kernel/if_epair.ko.bak
- kyua test -k /usr/tests/sys/net/Kyuafile if_epair
if_epair:params -> skipped: module if_epair could not be resolved: No such file or directory [0.002s]
Results file id is usr_tests_sys_net.20200228-164520-615708
Results saved to /root/.kyua/store/results.usr_tests_sys_net.20200228-164520-615708.db
1/1 passed (0 failed)
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
This does change the behaviour of the test: if the if_epair module isn't loaded yet it doesn't load it, it skips the test.
Arguably that's better, because that's what we do for other modules (e.g. pf). On the other hand, other tests load it implicitly (e.g. the pf tests) in the process of making their test setup.
I'm torn on the best way to deal with this. Perhaps the best fix is to keep the kldload(), but to skip the test if the load fails rather than failing the test.
If we do go with this approach we should change freebsd-ci so that it loads if_epair (just as it already loads pf) for the automated tests.
And what about re-introducing the kldload("if_epair") (without testing the result code) just before the ATF_REQUIRE_KERNEL_MODULE ?