source: mod_gnutls/test/base_apache.conf @ a08b25e

debian/masterdebian/stretch-backportsjessie-backportsupstream
Last change on this file since a08b25e was a08b25e, checked in by Thomas Klute <thomas2.klute@…>, 4 years ago

Test suite: Listen on IPv6 and IPv4 loopback by default

Distributions handle host names for loopback addresses and their
resolution differently, which caused trouble with the previous
defaults of TEST_HOST=localhost and TEST_IP=[::1]. While they work
fine on Debian, tests on Ubuntu failed apparently randomly because
connections to localhost sometimes used 127.0.0.1, and setting
TEST_IP=127.0.0.1 would sometimes be hit by the opposite effect.

The best solution seems to be to let the test servers listen on both
IPv4 and IPv6 loopback addresses (127.0.0.1 and [::1]): "localhost"
should always resolve to at least one of them, so we don't have to
care about the details. Apache handles the transport layer anyway, so
this change will not hide bugs in mod_gnutls itself.

Listening on both addresses is achieved by treating TEST_IP as a list
of addresses to listen on, changing the default to "[::1] 127.0.0.1",
and building a config file containing "Listen" directives for the test
servers from that. With this change there is no need to export TEST_IP
to the test environment any more.

Users who want to set their own TEST_IP can do so as before, but
should note that IPv6 addresses must be enclosed in square brackets.

  • Property mode set to 100644
File size: 648 bytes
Line 
1ServerRoot ${PWD}
2
3LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
4CustomLog logs/${TEST_NAME}.access.log combined
5ErrorLog logs/${TEST_NAME}.error.log
6HostnameLookups Off
7PidFile apache2.pid
8KeepAlive Off
9LogLevel debug
10LoadModule      mpm_worker_module       ${AP_LIBEXECDIR}/mod_mpm_worker.so
11LoadModule      authn_core_module       ${AP_LIBEXECDIR}/mod_authn_core.so
12LoadModule      authz_core_module       ${AP_LIBEXECDIR}/mod_authz_core.so
13LoadModule      mime_module             ${AP_LIBEXECDIR}/mod_mime.so
14TypesConfig ${srcdir}/mime.types
15
16Include ${srcdir}/listen.conf
17
18DocumentRoot ${srcdir}/data
19LoadModule gnutls_module ../src/.libs/libmod_gnutls.so
Note: See TracBrowser for help on using the repository browser.