diff options
author | Jonas Allmann <jallmann@mozilla.com> | 2018-07-27 16:02:13 +0200 |
---|---|---|
committer | Jonas Allmann <jallmann@mozilla.com> | 2018-07-27 16:02:13 +0200 |
commit | 3095871183918a1fca1c820500d92757bfbbc68d (patch) | |
tree | a44ea20e77c77bcc00f6c96633aa36792bd641b5 /tests/interop | |
parent | 26c4027f91f7d0c79de6875e5b434702eac07a2c (diff) | |
download | nss-hg-3095871183918a1fca1c820500d92757bfbbc68d.tar.gz |
Bug 1476672 - Enabled openssl interop tests, r=franziskus
Reviewers: franziskus
Bug #: 1476672
Differential Revision: https://phabricator.services.mozilla.com/D2223
Diffstat (limited to 'tests/interop')
-rwxr-xr-x | tests/interop/interop.sh | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/tests/interop/interop.sh b/tests/interop/interop.sh index 536b4c969..6533ecce3 100755 --- a/tests/interop/interop.sh +++ b/tests/interop/interop.sh @@ -25,7 +25,7 @@ interop_init() INTEROP=${INTEROP:=tls_interop} if [ ! -d "$INTEROP" ]; then git clone -q https://github.com/jallmann/tls-interop "$INTEROP" - git -C "$INTEROP" checkout -q befbbde4e9e3ff78a6f90dc3170755bddcb1a2ef + git -C "$INTEROP" checkout -q a4878c30db639053fc4f08573d3ae6cbd3cf1d6f fi INTEROP=$(cd "$INTEROP";pwd -P) @@ -33,17 +33,34 @@ interop_init() BORING=${BORING:=boringssl} if [ ! -d "$BORING" ]; then git clone -q https://boringssl.googlesource.com/boringssl "$BORING" - git -C "$BORING" checkout -q 3815720cf31339b1739f8ad1c21205105412c6b5 + git -C "$BORING" checkout -q 9af1edbe2201e6c6d58e5e484bf56281d8c751d9 fi BORING=$(cd "$BORING";pwd -P) mkdir "$BORING/build" cd "$BORING/build" # Build boring explicitly with gcc because it fails on builds where - # CC=clang-5.0, for example asan-builds. + # CC=clang-5.0, for example on asan-builds. export CC=gcc cmake .. - make + make -j$(nproc) + + # Check out and build OpenSSL. + # Build with "enable-external-tests" to include the shim in the build. + cd "${HOSTDIR}" + OSSL=${OSSL:=openssl} + if [ ! -d "$OSSL" ]; then + git clone -q https://github.com/openssl/openssl.git "$OSSL" + git -C "$OSSL" checkout -q 9e6a32025e6e69949ad3e53a29a0b85f61f30b85 + fi + OSSL=$(cd "$OSSL";pwd -P) + cd "$OSSL" + ./config enable-external-tests + make -j$(nproc) + + #Some filenames in the OpenSSL repository contain "core". + #This prevents false positive "core file detected" errors. + detect_core SCRIPTNAME="interop.sh" html_head "interop test" @@ -62,24 +79,27 @@ interop_run() test_name=$1 client=$2 server=$3 - client_writes_first=$4 (cd "$INTEROP"; - cargo run -- --client "$client" --server "$server" --rootdir "$BORING"/ssl/test/runner/ --test-cases cases.json $client_writes_first ) 2>interop-${test_name}.errors | tee interop-${test_name}.log + cargo run -- --client "$client" --server "$server" --rootdir "$BORING"/ssl/test/runner/ --test-cases cases.json $4 $5 ) 2>interop-${test_name}.errors | tee interop-${test_name}.log RESULT=${PIPESTATUS[0]} - html_msg "${RESULT}" 0 "Interop" "Run successfully" + html_msg "${RESULT}" 0 "Interop ${test_name}" "Run successfully" if [ $RESULT -ne 0 ]; then cat interop-${test_name}.errors cat interop-${test_name}.log fi grep -i 'FAILED\|Assertion failure' interop-${test_name}.errors - html_msg $? 1 "Interop" "No failures" + html_msg $? 1 "Interop ${test_name}" "No failures" } interop_init NSS_SHIM="$BINDIR"/nss_bogo_shim BORING_SHIM="$BORING"/build/ssl/test/bssl_shim +OSSL_SHIM="$OSSL"/test/ossl_shim/ossl_shim +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":"$OSSL" interop_run "nss_nss" ${NSS_SHIM} ${NSS_SHIM} interop_run "bssl_nss" ${BORING_SHIM} ${NSS_SHIM} interop_run "nss_bssl" ${NSS_SHIM} ${BORING_SHIM} "--client-writes-first" +interop_run "ossl_nss" ${OSSL_SHIM} ${NSS_SHIM} "--force-IPv4" +interop_run "nss_ossl" ${NSS_SHIM} ${OSSL_SHIM} "--client-writes-first" "--force-IPv4" interop_cleanup |