nigoroll / libvmod-dynamic

The Varnish dns/named director continued
BSD 2-Clause "Simplified" License
96 stars 34 forks source link

Test with a dedicated hosts file if possible #18

Closed dridi closed 5 years ago

dridi commented 7 years ago

Ironically, this breaks my setup. I never needed to tweak my NSS configuration or add entries to /etc/hosts to resolve *.localhost to the loop-back interface.

However, we can now guess at configure time whether the test suite is expected to work. Although there's no real guarantee because of the huge TOCTOU race between ./configure and make check.

dridi commented 7 years ago

Needs testing on other platforms than mine.

nigoroll commented 7 years ago

@Dridi did not manage today and won't have a chance for the rest of the week, sorry. But just out of curiosity, for testing just gethostbyname, couldn't we bundle a tiny wrapper ourselves?

dridi commented 7 years ago

No, last time I tried I ran into unforeseen issues, that you pointed out :D

https://www.varnish-cache.org/lists/pipermail/varnish-dev/2015-September/008485.html

I started a little project for that matter while I was traveling this week but I really find it simpler to use an established tool like cwrap and detect at configure time whether the test suite is expected to pass with a smoke test. We make it the developer's or user's job to set up its environment, either by installing cwrap or changing the host: otherwise make check is a no-op.

https://github.com/dridi/etception

Also: just rebased against current master.

nigoroll commented 5 years ago

I will ditch this one as OBE