Changeset 5fd0170 in mod_gnutls

Jan 2, 2020, 2:51:05 PM (3 years ago)
Fiona Klute <fiona.klute@…>
asyncio, main, master, proxy-ticket

Update outdated information in test/README

1 edited


  • test/README

    r5d5a7c8 r5fd0170  
    4747Please add more tests!
    49 The simplest way to add a test is (from test/):
     49The simplest way to add a test is (from the directory containing this
    5152  ./newtest
    5354This will prompt you for a simple name for the test and then copy a
    5455starting set of files from tests/00_basic, and create a script which
    55 you can add to TESTS in when your test is ready for
    56 inclusion in the test suite.
     56you can add to the test_scripts variable in when your test
     57is ready for inclusion in the test suite. The files in the test
     58directory must be added to EXTRA_DIST in tests/
    62 Each test consists of a script in test/ and a directory in
    63 test/tests/, which the test suite uses to spin up an isolated Apache
    64 instance or two (for proxy tests) and try to connect to it with
    65 gnutls-cli and make a simple HTTP 1.1 or 1.0 request.
     64Each test consists of a script in the directory containing this README
     65and a directory in tests/, which the test suite uses to spin up an
     66isolated Apache instance (or more, for tests that need a proxy or OCSP
     67responder) and try to connect to it with gnutls-cli and make a simple
     68HTTP 1.1 or 1.0 request.
    6770Test directories usually contain the following files:
    6972 * apache.conf -- Apache configuration to be used
    71  * gnutls-cli.args -- the arguments to pass to gnutls-cli
    73  * input -- the full HTTP request (including the final blank line)
     74 * test.yml -- Defines the client connection(s) including parameters
     75   for gnutls-cli, the request(s), and expected response(s)
    7577 * backend.conf [optional] -- Apache configuration for the proxy
    7678   backend server, if any
    78  * output [optional] -- the lines of this file will be checked against
    79    the same number of lines at the end of the output produced by the
    80    gnutls-cli process. "Date" and "Server" headers are filtered from
    81    the response because they are expected to change between runs
    82    (date) or builds (server version).
     80 * ocsp.conf [optional] -- Apache configuration for the OCSP
     81   responder, if any
    8483 * fail.server [optional] -- if this file exists, it means we expect
    8685   configuration problem.
    88  * fail.client [optional] -- if this file exists, it means we expect
    89    the client to fail to fetch its file.  If you already have
    90    fail.server, do not also specify this; we know that a failed server
    91    should result in a failed file retrieval.
     87 * [optional] -- Defines hook functions that modify or
     88   override the default behavior of
    93 The "runtests" script is used to start one Apache instance and send a
    94 request based on the files described above. Note that some tests take
    95 additional steps, e.g. starting another server to act as proxy
    96 backend, and at least one does not use "runtests" at all.
     90The "" program is used to start the required services send a
     91request (or more) based on the files described above. Note that
     92currently some tests take additional steps in their test scripts,
     93though is the preferred mechanism.
    9895By default (if "unshare" is available and has the permissions required
    9996to create network and user namespaces), each test case is run inside
    10097its own network namespace. This avoids address and port conflicts with
    101 other tests as well has the host system.
     98other tests as well has the host system. Otherwise the tests use a
     99lock file to prevent port conflicts between themselves.
    103 When writing your own tests, make sure to call netns_reexec (defined
    104 in common.bash) if you need to start any network services outside of
    105 runtests (which will create the namespace if it doesn't exist
    106 already). However, some architectures might not support namespaces, so
    107 traditional locking (using flock) and serial execution are still
    108 supported.
     101When writing your own tests, make sure to call through
     102netns_py.bash like the current tests do to ensure compatibility with
     103the namespace and lock file mechanisms.
    111105Robustness and Tuning
    118112 * They need a functioning loopback device.
    120  * They expect (by default) to have port 9932 [TEST_PORT] available
     114 * They expect to have ports 9932 (TEST_PORT as defined in
     115 through 9936 available for test services to bind to,
    121116   and open for connections on the addresses listed in TEST_IP.
    130125 * If a machine is particularly slow or under heavy load, it's
    131    possible that these tests will fail for timing
    132    reasons. [TEST_QUERY_TIMEOUT (timeout for the HTTPS request in
    133    seconds)]
     126   possible that tests fail for timing reasons. [TEST_QUERY_TIMEOUT
     127   (timeout for the HTTPS request in seconds)]
    135129The first two of these issues are avoided when the tests are isolated
Note: See TracChangeset for help on using the changeset viewer.