summaryrefslogtreecommitdiff
path: root/tests/bogo
diff options
context:
space:
mode:
authorLeander Schwarz <lschwarz@mozilla.com>2022-08-26 14:35:35 +0000
committerLeander Schwarz <lschwarz@mozilla.com>2022-08-26 14:35:35 +0000
commit8c01aa55bfaad3326219cd622038a33bcb3b599f (patch)
treed64f86e0b882ba33491460734c0910996a8de7e6 /tests/bogo
parentce6c79df2740d17abfab0fa870056876b56e93f5 (diff)
downloadnss-hg-8c01aa55bfaad3326219cd622038a33bcb3b599f.tar.gz
Bug 1771100 - Update BoGo tests to recent BoringSSL version. r=djackson
It was required to update docker-interop image to ubuntu 20.04 since a newer Go release was required for the BoGo tests to run. See nss/gtests/nss_bogo_shim/config.json for a list of disabled BoGo test, including short descriptions/bug links. A -loose-local-errors falg was added to Bogo (runner.go) to allow usage of more tests by ignoring differences in local errors on the Go side of test connections, similar to the remote error 'suppression' used. The code is patched to the BoGo runner after cloning in nss/tests/bogo/bogo.sh and can be found in nss/gtests/nss_bogo_shim/nss_loose_local_errors.patch. Differential Revision: https://phabricator.services.mozilla.com/D147675
Diffstat (limited to 'tests/bogo')
-rwxr-xr-xtests/bogo/bogo.sh27
1 files changed, 18 insertions, 9 deletions
diff --git a/tests/bogo/bogo.sh b/tests/bogo/bogo.sh
index e3e9c32df..e5b12c2d5 100755
--- a/tests/bogo/bogo.sh
+++ b/tests/bogo/bogo.sh
@@ -12,6 +12,9 @@
#
########################################################################
+# Currently used BorringSSL version
+BOGO_VERSION=48f794765b0df3310649e6a6c6f71c5cd845f445
+
bogo_init()
{
SCRIPTNAME="bogo.sh"
@@ -25,11 +28,12 @@ bogo_init()
BORING=${BORING:=boringssl}
if [ ! -d "$BORING" ]; then
git clone -q https://boringssl.googlesource.com/boringssl "$BORING"
- git -C "$BORING" checkout -q 7f4f41fa81c03e0f8ef1ab5b3d1d566b5968f107
+ git -C "$BORING" checkout -q $BOGO_VERSION
fi
SCRIPTNAME="bogo.sh"
- html_head "bogo test"
+ html_head "bogo test "
+ html_msg $? 0 "Bogo" "Checking out BoringSSL revision $BOGO_VERSION"
}
bogo_cleanup()
@@ -44,11 +48,16 @@ cwd=$(pwd -P)
SOURCE_DIR="$(cd "$cwd"/../..; pwd -P)"
bogo_init
(cd "$BORING"/ssl/test/runner;
- GOPATH="$cwd" go test -pipe -shim-path "${BINDIR}"/nss_bogo_shim \
- -loose-errors -allow-unimplemented \
- -shim-config "${SOURCE_DIR}/gtests/nss_bogo_shim/config.json") \
- 2>bogo.errors | tee bogo.log
-html_msg "${PIPESTATUS[0]}" 0 "Bogo" "Run successfully"
-grep -i 'FAILED\|Assertion failure' bogo.errors
-html_msg $? 1 "Bogo" "No failures"
+git apply ${SOURCE_DIR}/gtests/nss_bogo_shim/nss_loose_local_errors.patch)
+html_msg $? 0 "Bogo" "NSS -loose-local-errors patch application"
+html_head "bogo log "
+echo ""
+(cd "$BORING"/ssl/test/runner;
+GOPATH="$cwd" go test -pipe -shim-path "${BINDIR}"/nss_bogo_shim \
+ -loose-errors -loose-local-errors -allow-unimplemented \
+ -shim-config "${SOURCE_DIR}/gtests/nss_bogo_shim/config.json") \
+ 2>bogo.errors | tee bogo.log | grep -v 'UNIMPLEMENTED'
+RES="${PIPESTATUS[0]}"
+html_head "bogo result"
+html_msg $RES 0 "Bogo" "Test Run"
bogo_cleanup