Page MenuHomeFreeBSD

Skip sys/net/routing/test_rtsock_* regression tests if module if_epair doesn't exist
ClosedPublic

Authored by olivier on Apr 17 2020, 1:45 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Sep 8, 10:30 PM
Unknown Object (File)
Sun, Sep 8, 2:32 AM
Unknown Object (File)
Sat, Sep 7, 8:07 PM
Unknown Object (File)
Sat, Sep 7, 11:32 AM
Unknown Object (File)
Thu, Sep 5, 12:54 PM
Unknown Object (File)
Mon, Sep 2, 2:50 AM
Unknown Object (File)
Thu, Aug 22, 11:00 AM
Unknown Object (File)
Sun, Aug 18, 2:45 PM
Subscribers

Details

Summary

Our custom build doesn't include if_epair.ko, so those tests failed.
Here is a proposal to skip these tests if if_epair.ko failed to load.

Test Plan
# cd /boot/kernel
# kldunload if_epair.ko
# mv if_epair.ko if_epair.ko.bak
# cd /usr/tests
# kyua test sys/net/routing/test_rtsock_lladdr:rtm_del_v6_ll_lle_success
sys/net/routing/test_rtsock_lladdr:rtm_del_v6_ll_lle_success  ->  skipped: module if_epair could not be resolved: No such file or directory  [0.002s]

Results file id is usr_tests.20200417-133802-611148
Results saved to /root/.kyua/store/results.usr_tests.20200417-133802-611148.db

1/1 passed (0 failed)

# mv /boot/kernel/if_epair.ko.bak /boot/kernel/if_epair.ko
# kyua test sys/net/routing/test_rtsock_lladdr:rtm_del_v6_ll_lle_success
sys/net/routing/test_rtsock_lladdr:rtm_del_v6_ll_lle_success  ->  passed  [0.118s]

Results file id is usr_tests.20200417-134410-988676
Results saved to /root/.kyua/store/results.usr_tests.20200417-134410-988676.db

1/1 passed (0 failed)

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Thank you for cleaning it up!

I certainly support skipping the tests if if_epair is not loaded.
I'd just prefer to not require module for all tests by default, as not all of them require epair.

Can you consider moving the check a bit later in the setup, where we know what's the number of interfaces that is needed?

This revision is now accepted and ready to land.Apr 17 2020, 4:02 PM