From 3db78dc301c06920fb765ba1f75946e17b8feac3 Mon Sep 17 00:00:00 2001 From: Kevin Albertson Date: Fri, 18 Apr 2025 15:00:56 -0400 Subject: [PATCH 1/3] CDRIVER-5990 skip tests depending on DEVPROD-16954 on zSeries --- .evergreen/scripts/run-auth-tests.sh | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/.evergreen/scripts/run-auth-tests.sh b/.evergreen/scripts/run-auth-tests.sh index c5f60688317..9a3da800be5 100755 --- a/.evergreen/scripts/run-auth-tests.sh +++ b/.evergreen/scripts/run-auth-tests.sh @@ -7,7 +7,7 @@ set +o xtrace # Don't echo commands # shellcheck source=.evergreen/scripts/env-var-utils.sh . "$(dirname "${BASH_SOURCE[0]}")/env-var-utils.sh" -. "$(dirname "${BASH_SOURCE[0]}")/use-tools.sh" paths +. "$(dirname "${BASH_SOURCE[0]}")/use-tools.sh" platform paths declare script_dir script_dir="$(to_absolute "$(dirname "${BASH_SOURCE[0]}")")" @@ -99,11 +99,21 @@ elif command -v otool >/dev/null; then LD_LIBRARY_PATH="${openssl_lib_prefix}" otool -L "${test_gssapi}" | grep "libssl" || true fi +# TODO: Remove `skip_for_zseries` when resolving CDRIVER-5990. +function skip_for_zseries() { + if $IS_ZSERIES; then + echo "Skipping test until DEVPROD-16954 is resolved." + return + fi + # Run the test command: + "$@" +} + if [[ "${ssl}" != "OFF" ]]; then # FIXME: CDRIVER-2008 for the cygwin check if [[ "${OSTYPE}" != "cygwin" ]]; then echo "Authenticating using X.509" - LD_LIBRARY_PATH="${openssl_lib_prefix}" "${ping}" "mongodb://CN=client,OU=kerneluser,O=10Gen,L=New York City,ST=New York,C=US@${auth_host}/?ssl=true&authMechanism=MONGODB-X509&sslClientCertificateKeyFile=src/libmongoc/tests/x509gen/ldaptest-client-key-and-cert.pem&sslCertificateAuthorityFile=src/libmongoc/tests/x509gen/ldaptest-ca-cert.crt&sslAllowInvalidHostnames=true&${c_timeout}" + LD_LIBRARY_PATH="${openssl_lib_prefix}" skip_for_zseries "${ping}" "mongodb://CN=client,OU=kerneluser,O=10Gen,L=New York City,ST=New York,C=US@${auth_host}/?ssl=true&authMechanism=MONGODB-X509&sslClientCertificateKeyFile=src/libmongoc/tests/x509gen/ldaptest-client-key-and-cert.pem&sslCertificateAuthorityFile=src/libmongoc/tests/x509gen/ldaptest-ca-cert.crt&sslAllowInvalidHostnames=true&${c_timeout}" fi echo "Connecting to Atlas Free Tier" LD_LIBRARY_PATH="${openssl_lib_prefix}" "${ping}" "${atlas_free:?}&${c_timeout}" @@ -145,18 +155,18 @@ if [[ "${ssl}" != "OFF" ]]; then fi echo "Authenticating using PLAIN" -LD_LIBRARY_PATH="${openssl_lib_prefix}" "${ping}" "mongodb://${auth_plain:?}@${auth_host}/?authMechanism=PLAIN&${c_timeout}" +LD_LIBRARY_PATH="${openssl_lib_prefix}" skip_for_zseries "${ping}" "mongodb://${auth_plain:?}@${auth_host}/?authMechanism=PLAIN&${c_timeout}" echo "Authenticating using default auth mechanism" # Though the auth source is named "mongodb-cr", authentication uses the default mechanism (currently SCRAM-SHA-1). -LD_LIBRARY_PATH="${openssl_lib_prefix}" "${ping}" "mongodb://${auth_mongodbcr:?}@${auth_host}/mongodb-cr?${c_timeout}" +LD_LIBRARY_PATH="${openssl_lib_prefix}" skip_for_zseries "${ping}" "mongodb://${auth_mongodbcr:?}@${auth_host}/mongodb-cr?${c_timeout}" if [[ "${sasl}" != "OFF" ]]; then echo "Authenticating using GSSAPI" - LD_LIBRARY_PATH="${openssl_lib_prefix}" "${ping}" "mongodb://${auth_gssapi:?}@${auth_host}/?authMechanism=GSSAPI&${c_timeout}" + LD_LIBRARY_PATH="${openssl_lib_prefix}" skip_for_zseries "${ping}" "mongodb://${auth_gssapi:?}@${auth_host}/?authMechanism=GSSAPI&${c_timeout}" echo "Authenticating with CANONICALIZE_HOST_NAME" - LD_LIBRARY_PATH="${openssl_lib_prefix}" "${ping}" "mongodb://${auth_gssapi:?}@${ip_addr}/?authMechanism=GSSAPI&authMechanismProperties=CANONICALIZE_HOST_NAME:true&${c_timeout}" + LD_LIBRARY_PATH="${openssl_lib_prefix}" skip_for_zseries "${ping}" "mongodb://${auth_gssapi:?}@${ip_addr}/?authMechanism=GSSAPI&authMechanismProperties=CANONICALIZE_HOST_NAME:true&${c_timeout}" declare ld_preload="${LD_PRELOAD:-}" if [[ "${ASAN:-}" == "on" ]]; then @@ -164,13 +174,13 @@ if [[ "${sasl}" != "OFF" ]]; then fi echo "Test threaded GSSAPI auth" - LD_LIBRARY_PATH="${openssl_lib_prefix}" MONGOC_TEST_GSSAPI_HOST="${auth_host}" MONGOC_TEST_GSSAPI_USER="${auth_gssapi}" LD_PRELOAD="${ld_preload:-}" "${test_gssapi}" + LD_LIBRARY_PATH="${openssl_lib_prefix}" skip_for_zseries MONGOC_TEST_GSSAPI_HOST="${auth_host}" MONGOC_TEST_GSSAPI_USER="${auth_gssapi}" LD_PRELOAD="${ld_preload:-}" "${test_gssapi}" echo "Threaded GSSAPI auth OK" if [[ "${OSTYPE}" == "cygwin" ]]; then echo "Authenticating using GSSAPI (service realm: LDAPTEST.10GEN.CC)" - LD_LIBRARY_PATH="${openssl_lib_prefix}" "${ping}" "mongodb://${auth_crossrealm:?}@${auth_host}/?authMechanism=GSSAPI&authMechanismProperties=SERVICE_REALM:LDAPTEST.10GEN.CC&${c_timeout}" + LD_LIBRARY_PATH="${openssl_lib_prefix}" skip_for_zseries "${ping}" "mongodb://${auth_crossrealm:?}@${auth_host}/?authMechanism=GSSAPI&authMechanismProperties=SERVICE_REALM:LDAPTEST.10GEN.CC&${c_timeout}" echo "Authenticating using GSSAPI (UTF-8 credentials)" - LD_LIBRARY_PATH="${openssl_lib_prefix}" "${ping}" "mongodb://${auth_gssapi_utf8:?}@${auth_host}/?authMechanism=GSSAPI&${c_timeout}" + LD_LIBRARY_PATH="${openssl_lib_prefix}" skip_for_zseries "${ping}" "mongodb://${auth_gssapi_utf8:?}@${auth_host}/?authMechanism=GSSAPI&${c_timeout}" fi fi From 07f4a01916de32d3d411807adc75c1594bf827e0 Mon Sep 17 00:00:00 2001 From: Kevin Albertson Date: Fri, 18 Apr 2025 16:48:03 -0400 Subject: [PATCH 2/3] remove redundant `function` Co-authored-by: Ezra Chung <88335979+eramongodb@users.noreply.github.com> --- .evergreen/scripts/run-auth-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.evergreen/scripts/run-auth-tests.sh b/.evergreen/scripts/run-auth-tests.sh index 9a3da800be5..d04ca04b7de 100755 --- a/.evergreen/scripts/run-auth-tests.sh +++ b/.evergreen/scripts/run-auth-tests.sh @@ -100,7 +100,7 @@ elif command -v otool >/dev/null; then fi # TODO: Remove `skip_for_zseries` when resolving CDRIVER-5990. -function skip_for_zseries() { +skip_for_zseries() { if $IS_ZSERIES; then echo "Skipping test until DEVPROD-16954 is resolved." return From 05d9bb1b9e47b1d44d0d9000df356563661b81c1 Mon Sep 17 00:00:00 2001 From: Kevin Albertson Date: Mon, 21 Apr 2025 07:19:21 -0400 Subject: [PATCH 3/3] fix placement --- .evergreen/scripts/run-auth-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.evergreen/scripts/run-auth-tests.sh b/.evergreen/scripts/run-auth-tests.sh index d04ca04b7de..5a3f6279e4f 100755 --- a/.evergreen/scripts/run-auth-tests.sh +++ b/.evergreen/scripts/run-auth-tests.sh @@ -174,7 +174,7 @@ if [[ "${sasl}" != "OFF" ]]; then fi echo "Test threaded GSSAPI auth" - LD_LIBRARY_PATH="${openssl_lib_prefix}" skip_for_zseries MONGOC_TEST_GSSAPI_HOST="${auth_host}" MONGOC_TEST_GSSAPI_USER="${auth_gssapi}" LD_PRELOAD="${ld_preload:-}" "${test_gssapi}" + LD_LIBRARY_PATH="${openssl_lib_prefix}" MONGOC_TEST_GSSAPI_HOST="${auth_host}" MONGOC_TEST_GSSAPI_USER="${auth_gssapi}" LD_PRELOAD="${ld_preload:-}" skip_for_zseries "${test_gssapi}" echo "Threaded GSSAPI auth OK" if [[ "${OSTYPE}" == "cygwin" ]]; then