Page MenuHomeFreeBSD

Avoid the DNS lookup for "localhost"
ClosedPublic

Authored by ngie on Jan 29 2019, 11:19 PM.

Details

Summary

ci.FreeBSD.org does not have access to a DNS resolver/network (unlike my test
VM), so in order for the test to pass on the host, it needs to avoid the DNS
lookup by using the numeric host address representation.

PR: 235200
MFC after: 25 days
MFC with: r343362, r343365, r343367-r343368, r343461

Test Plan

Tested with the interface linked to the default gateway up and down, e.g.,

$ sudo ifconfig em0 up
$ kyua test -k /usr/tests/lib/libc/sys/Kyuafile sendfile_test
$ sudo ifconfig em0 down
$ kyua test -k /usr/tests/lib/libc/sys/Kyuafile sendfile_test

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 22264
Build 21465: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Jan 29 2019, 11:21 PM

Also tested fine in the test VM. Thanks!

I don't object to this patch but shouldn't we be able to prevent any DNS use via nsswitch.conf?

I don't object to this patch but shouldn't we be able to prevent any DNS use via nsswitch.conf?

That would require everyone make a corresponding change to prevent any DNS use when running this test.

It's better to focus on what needs to be tested, instead of what's nice to test by side-effect. There are other tests that exercise DNS lookups (which currently fail after a long timeout due to a lacking external connection).

This is a quick hack to set this test on a working path. The right path is the suggestion @asomers provided in the previous review, to use if_tap.

Is it possible for us to get this workaround in the tree first? Or I have to check each time if there is new regression on each test job complete since they are all in unstable status now.

This revision was automatically updated to reflect the committed changes.