Changeset d39ea18 in mod_gnutls


Ignore:
Timestamp:
Jan 22, 2017, 12:45:57 PM (11 months ago)
Author:
Thomas Klute <thomas2.klute@…>
Branches:
master
Children:
26ae700
Parents:
0202d6b
Message:

Test suite: Do not continue test case if Apache instance fails to start

On systems where namespaces aren't available, test cases in which
Apache HTTPD is expected not to start would sometimes fail when
running in parallel. The reason was a possible timing issue, where an
Apache instance for another test case might start before gnutls-cli is
run, and the TLS connection would unexpectedly succeed by connecting
to it.

Not attempting the TLS connection if HTTPD failed avoids this problem,
and also (slightly) speeds up tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/runtests

    r0a12ff8 rd39ea18  
    179179trap apache_down_err EXIT
    180180if [ -n "${USE_MSVA}" ]; then
    181     MONKEYSPHERE_VALIDATION_AGENT_SOCKET="http://127.0.0.1:$MSVA_PORT" \
    182                                         ${flock_cmd} \
    183                                         ${APACHE2} -f "${t}/apache.conf" -k start \
    184         || [ -e "${t}/fail.server" ]
    185 else
    186     ${flock_cmd} \
    187         ${APACHE2} -f "${t}/apache.conf" -k start \
    188         || [ -e "${t}/fail.server" ]
     181    export MONKEYSPHERE_VALIDATION_AGENT_SOCKET="http://127.0.0.1:$MSVA_PORT"
     182fi
     183if ! ${flock_cmd} ${APACHE2} -f "${t}/apache.conf" -k start; then
     184    if [ -e "${t}/fail.server" ]; then
     185        echo "Apache HTTPD failed to start as expected."
     186        exit 0
     187    else
     188        echo "Apache HTTPD unexpectedly failed to start."
     189        exit 1
     190    fi
    189191fi
    190192
Note: See TracChangeset for help on using the changeset viewer.