source: mod_gnutls/debian/patches/0001-Test-suite-Do-not-continue-test-case-if-Apache-insta.patch @ 7235f50

debian/masterdebian/stretch-backports
Last change on this file since 7235f50 was 7235f50, checked in by Daniel Kahn Gillmor <dkg@…>, 23 months ago

cherry-pick patch from upstream for non-parallel test suite

  • Property mode set to 100644
File size: 1.6 KB
  • test/runtests

    From: Thomas Klute <thomas2.klute@uni-dortmund.de>
    Date: Sun, 22 Jan 2017 18:45:57 +0100
    Subject: 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.
    
    (cherry picked from commit d39ea185bc141f880f49a68d77c1413c88fc7120)
    ---
     test/runtests | 18 ++++++++++--------
     1 file changed, 10 insertions(+), 8 deletions(-)
    
    diff --git a/test/runtests b/test/runtests
    index a253686..d530bf8 100755
    a b fi 
    178178printf "TESTING: %s%s\n" "$TEST_NAME" "$EXPECTED_FAILURE"
    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
    191193# check OCSP server
Note: See TracBrowser for help on using the repository browser.