Changeset 6c030c1 in mod_gnutls


Ignore:
Timestamp:
Feb 6, 2017, 12:05:25 PM (10 months ago)
Author:
Thomas Klute <thomas2.klute@…>
Branches:
master
Children:
4ae5b82
Parents:
bbfcbb5
Message:

Test suite: Make timeouts for server locks and HTTPS requests configurable

If TEST_LOCK_WAIT or TEST_QUERY_TIMEOUT are provided at configure
time, their values are stored and used instead of the default.

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • configure.ac

    r0202d6b r6c030c1  
    234234AM_SUBST_NOTMAKE(TEST_IP)
    235235
     236: ${TEST_LOCK_WAIT:="30"}
     237: ${TEST_QUERY_TIMEOUT:="30"}
     238AC_ARG_VAR([TEST_LOCK_WAIT], [Timeout in seconds to acquire locks for \
     239                             Apache instances in the test suite, or the \
     240                             previous instance to remove its PID file if \
     241                             flock is not used. Default is 30.])
     242AC_ARG_VAR([TEST_QUERY_TIMEOUT], [Timeout in seconds for HTTPS requests \
     243                                 sent using gnutls-cli in the test suite. \
     244                                 Default is 30.])
     245
    236246dnl Allow user to set SoftHSM PKCS #11 module
    237247AC_ARG_VAR([SOFTHSM_LIB], [Absolute path of the SoftHSM PKCS @%:@11 module to \
  • test/Makefile.am

    r6c44ed2 r6c030c1  
    199199# Lockfile for the proxy backend Apache process (if any)
    200200backend_lockfile = ./backend.lock
    201 # Maximum wait time in seconds for flock to aquire instance lock
    202 # files, or Apache to remove its PID file
    203 lock_wait = 30
    204201
    205202# port for the main Apache server
     
    215212# wait loop time for MSVA startup (milliseconds)
    216213TEST_MSVA_WAIT ?= 400
    217 # seconds for the HTTP request to be sent and responded to
    218 TEST_QUERY_DELAY ?= 30
    219214
    220215AM_TESTS_ENVIRONMENT = export APACHE2=@APACHE2@; \
    221216        export AP_LIBEXECDIR=@AP_LIBEXECDIR@; \
    222         export TEST_LOCK_WAIT="$(lock_wait)"; \
     217        export TEST_LOCK_WAIT="@TEST_LOCK_WAIT@"; \
    223218        export TEST_HOST="@TEST_HOST@"; \
    224219        export TEST_PORT="$(TEST_PORT)"; \
     
    226221        export TEST_MSVA_MAX_WAIT="$(TEST_MSVA_MAX_WAIT)"; \
    227222        export TEST_MSVA_WAIT="$(TEST_MSVA_WAIT)"; \
    228         export TEST_QUERY_DELAY="$(TEST_QUERY_DELAY)"; \
     223        export TEST_QUERY_TIMEOUT="@TEST_QUERY_TIMEOUT@"; \
    229224        export BACKEND_HOST="@TEST_HOST@"; \
    230225        export HTTP_CLI="@HTTP_CLI@";
  • test/README

    r8ac7c0d r6c030c1  
    130130 * If a machine is particularly slow or under heavy load, it's
    131131   possible that these tests will fail for timing
    132    reasons. [TEST_QUERY_DELAY (seconds for the HTTP request to be sent
    133    and responded to)]
     132   reasons. [TEST_QUERY_TIMEOUT (timeout for the HTTPS request in
     133   seconds)]
    134134
    135135The first two of these issues are avoided when the tests are isolated
  • test/runtests

    rbbfcbb5 r6c030c1  
    1919
    2020BADVARS=0
    21 for v in APACHE2 TEST_HOST TEST_PORT TEST_QUERY_DELAY TEST_MSVA_WAIT \
     21for v in APACHE2 TEST_HOST TEST_PORT TEST_QUERY_TIMEOUT TEST_MSVA_WAIT \
    2222                 MSVA_PORT; do
    2323    if [ ! -v "$v" ]; then
     
    217217# the line ends in the input file.
    218218if (sed -r "s/__HOSTNAME__/${TEST_HOST}/;s/\r?$/\r/" <${t}/input && \
    219            run_with_pidfile "${sleep_pidfile}" sleep "${TEST_QUERY_DELAY}" &) | \
     219           run_with_pidfile "${sleep_pidfile}" sleep "${TEST_QUERY_TIMEOUT}" &) | \
    220220       gnutls-cli -p "${TEST_PORT}" $(cat ${t}/gnutls-cli.args) "${TEST_HOST}" \
    221221       | tee "$output" && test "${PIPESTATUS[1]}" -eq 0;
Note: See TracChangeset for help on using the changeset viewer.