httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <>
Subject virtual host test suite
Date Mon, 06 Oct 1997 02:19:22 GMT
We may want to create apache/tests and start sticking test suites under
there ... or not, they're generally more difficult to maintain.

The README follows. 


This is a basic test of the virtual host functionality.

At present it *does not test*:

- ServerPath
- <VirtualHost> DNS lookups (specifically, multiple A records is interesting)

It does test the basic gear that uses ip addresses and ports to decide what
ip-vhost or set of name-vhosts are to be considered.  It tests _default_
behaviour with both explicit and wildcard ports.  It tests the precedence
behaviour -- i.e. earlier vhosts have higher precedence than later vhosts.
It has a basic ServerAlias test.

It also tests some error conditions.

These tests are "white box" tests, i.e. I know how the code is written and
I'm testing very specific cases within the code.  Black box tests would
be nice too.

To use:

    cd conf
    perl -pi.orig -e "s#/home/dgaudet/ap/vhtest#`pwd`#" *.conf
    cd ..
    ./runtest /path/to/httpd

Or to run a specific test:

    ./runtest /path/to/httpd test3

The output looks something like:       ''                   'vhost1'       : passed       'vhost1:8080'        'vhost1'       : passed       'vhost2:8080'        'vhost1'       : passed       ''                   'vhost2'       : passed       'vhost2:8081'        'vhost2'       : passed       'vhost1:8081'        'vhost2'       : passed       ''                   'vhost3'       : passed

The first column is the ipaddr:port connected to.  The second column is
the Host: header sent ('' means no Host: header sent).  The third column
is the vhost expected.

It probably only works on Linux because it uses the loopback interface for
all tests -- and Linux lo0 responds to *all* addresses in 127/8 rather than
just  You'd probably have to add the following aliases to other


View raw message