Changeset b324906 in mod_gnutls for test/runtests


Ignore:
Timestamp:
Feb 16, 2015, 11:17:07 AM (5 years ago)
Author:
Thomas Klute <thomas2.klute@…>
Branches:
debian/master, debian/stretch-backports, jessie-backports, master, upstream
Children:
10b3370
Parents:
b429e4c (diff), eea8a16 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'client-verify-fix' into tls-proxy

Most importantly, this includes the patch for broken TLS client auth
(verification results were ignored). The merged branch also includes the
improved test suite.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • test/runtests

    rb429e4c rb324906  
    66
    77tests="${1##t-}"
     8
     9if [ -n "${TEST_LOCK}" ]; then
     10    TEST_LOCK="$(realpath ${TEST_LOCK})"
     11    flock_cmd="flock -w 10 ${TEST_LOCK}"
     12fi
    813
    914BADVARS=0
     
    2025
    2126if [ . != "$(dirname "$0")" ]; then
    22     printf "You should only run this mod-gnutls test suite from the t/ directory of the mod_gnutls source.\n" >&2
     27    printf "You should only run this mod-gnutls test suite from the test/ directory of the mod_gnutls source.\n" >&2
    2328    exit 1
    2429fi
     
    3742    printf "\nApache error logs:\n"
    3843    tail "../../logs/${TEST_NAME}.error.log"
    39     stop_msva
     44    if [ -n "${USE_MSVA}" ]; then
     45        stop_msva
     46    fi
    4047}
    4148
     
    4653fi
    4754
    48 GNUPGHOME=$(pwd)/msva.gnupghome MSVA_KEYSERVER_POLICY=never monkeysphere-validation-agent &
     55if [ -n "${USE_MSVA}" ]; then
     56    GNUPGHOME=$(pwd)/msva.gnupghome MSVA_KEYSERVER_POLICY=never monkeysphere-validation-agent &
     57    trap stop_msva EXIT
    4958
    50 trap stop_msva EXIT
     59    sleep "$TEST_GAP"
    5160
    52 sleep "$TEST_GAP"
     61    printf "TESTING: initial MSVA verification\n"
     62    MONKEYSPHERE_VALIDATION_AGENT_SOCKET="http://127.0.0.1:$MSVA_PORT" msva-query-agent https "$(cat client.uid)" x509pem client < client/x509.pem
     63    printf "\nSUCCESS: initial MSVA verification\n"
     64fi
    5365
    54 printf "TESTING: initial MSVA verification\n"
    55 MONKEYSPHERE_VALIDATION_AGENT_SOCKET="http://127.0.0.1:$MSVA_PORT" msva-query-agent https "$(cat client.uid)" x509pem client < client/x509.pem 
    56 printf "\nSUCCESS: initial MSVA verification\n"
    57 
    58 for t in $tests; do
    59     sleep "$TEST_GAP"
     66for t in $tests; do
     67    if [ -z "${flock_cmd}" ]; then
     68        echo "Warning: no lock file set"
     69        sleep "$TEST_GAP"
     70    fi
    6071    export TEST_NAME="$(basename "$t")"
    6172    output="../../outputs/${TEST_NAME}.output"
     
    6980    printf "TESTING: %s%s\n" "$TEST_NAME" "$EXPECTED_FAILURE"
    7081    trap apache_down_err EXIT
    71     MONKEYSPHERE_VALIDATION_AGENT_SOCKET="http://127.0.0.1:$MSVA_PORT" /usr/sbin/apache2 -f "$(pwd)/apache.conf" -k start || [ -e fail.server ]
     82    if [ -n "${USE_MSVA}" ]; then
     83        ${flock_cmd} \
     84            MONKEYSPHERE_VALIDATION_AGENT_SOCKET="http://127.0.0.1:$MSVA_PORT" \
     85            /usr/sbin/apache2 -f "$(pwd)/apache.conf" -k start \
     86            || [ -e fail.server ]
     87    else
     88        ${flock_cmd} \
     89            /usr/sbin/apache2 -f "$(pwd)/apache.conf" -k start \
     90            || [ -e fail.server ]
     91    fi
    7292
    7393    if (sed "s/__HOSTNAME__/${TEST_HOST}/" < ./input && sleep "$TEST_QUERY_DELAY") | \
     
    88108    fi
    89109    /usr/sbin/apache2 -f "$(pwd)/apache.conf" -k stop || [ -e fail.server ]
    90     trap stop_msva EXIT
     110    if [ -n "${USE_MSVA}" ]; then
     111        trap stop_msva EXIT
     112    else
     113        trap - EXIT
     114    fi
    91115    printf "SUCCESS: %s\n" "$TEST_NAME"
    92116    cd ../..
    93117done
    94118
    95 stop_msva
     119if [ -n "${USE_MSVA}" ]; then
     120    stop_msva
     121fi
Note: See TracChangeset for help on using the changeset viewer.