From 0b9de424717c2e526473a5387429392611cbb2fa Mon Sep 17 00:00:00 2001 From: samuel40791765 Date: Wed, 28 Jun 2023 17:44:36 +0000 Subject: [PATCH 1/4] turn on patching and testing for mySQL CI --- .../github_ci_integration_omnibus.yaml | 3 +- .../mysql_patch/dh-params-off.patch | 20 ++++++++++++ .../stateful-session-reuse-off.patch | 22 +++++++++++++ tests/ci/integration/run_mysql_integration.sh | 32 +++++++++++++++++-- 4 files changed, 72 insertions(+), 5 deletions(-) create mode 100644 tests/ci/integration/mysql_patch/dh-params-off.patch create mode 100644 tests/ci/integration/mysql_patch/stateful-session-reuse-off.patch diff --git a/tests/ci/cdk/cdk/codebuild/github_ci_integration_omnibus.yaml b/tests/ci/cdk/cdk/codebuild/github_ci_integration_omnibus.yaml index e9189525231..86467589d81 100644 --- a/tests/ci/cdk/cdk/codebuild/github_ci_integration_omnibus.yaml +++ b/tests/ci/cdk/cdk/codebuild/github_ci_integration_omnibus.yaml @@ -30,8 +30,7 @@ batch: compute-type: BUILD_GENERAL1_MEDIUM image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-linux-x86:ubuntu-22.04_gcc-12x_latest - # Only runs the build for now, tests are disabled. MySQL build is bloated without any obvious build configurations we can - # use to speed up the build, so we use a larger instance here. + # MySQL build is bloated without any obvious build configurations we can use to speed up the build, so we use a larger instance here. - identifier: mysql_integration buildspec: ./tests/ci/codebuild/integration/mysql_integration.yml env: diff --git a/tests/ci/integration/mysql_patch/dh-params-off.patch b/tests/ci/integration/mysql_patch/dh-params-off.patch new file mode 100644 index 00000000000..72e8ae1ff70 --- /dev/null +++ b/tests/ci/integration/mysql_patch/dh-params-off.patch @@ -0,0 +1,20 @@ +diff --git a/router/tests/component/test_http_server.cc b/router/tests/component/test_http_server.cc +index 65a04739..93545f52 100644 +--- a/router/tests/component/test_http_server.cc ++++ b/router/tests/component/test_http_server.cc +@@ -1382,6 +1382,7 @@ const HttpServerSecureParams http_server_secure_params[]{ + }, + false, + "setting ssl_dh_params failed"}, ++#if !defined (OPENSSL_IS_AWSLC) + {"dh ciphers, default dh-params", + "WL12524::TS_CR_09", + { +@@ -1416,6 +1417,7 @@ const HttpServerSecureParams http_server_secure_params[]{ + // success otherwise + is_with_ssl_support(), + is_with_ssl_support() ? "" : kSslSupportIsDisabled}, ++#endif + {"non-dh-cipher, strong dh-params", + "WL12524::TS_SR4_01,WL12524::TS_SR3_01", + { diff --git a/tests/ci/integration/mysql_patch/stateful-session-reuse-off.patch b/tests/ci/integration/mysql_patch/stateful-session-reuse-off.patch new file mode 100644 index 00000000000..88a50ee4730 --- /dev/null +++ b/tests/ci/integration/mysql_patch/stateful-session-reuse-off.patch @@ -0,0 +1,22 @@ +diff --git a/router/tests/component/test_metadata_ttl.cc b/router/tests/component/test_metadata_ttl.cc +index 1fbf8928..7aeacf33 100644 +--- a/router/tests/component/test_metadata_ttl.cc ++++ b/router/tests/component/test_metadata_ttl.cc +@@ -2562,6 +2562,8 @@ INSTANTIATE_TEST_SUITE_P( + "GR_V1", ClusterType::GR_V1)), + get_test_description); + ++#if !defined (OPENSSL_IS_AWSLC) ++ + struct SessionReuseTestParams { + std::string router_ssl_mode; + bool server_ssl_enabled; +@@ -2657,6 +2659,8 @@ INSTANTIATE_TEST_SUITE_P( + /*server_ssl_enabled*/ true, + /*expected_session_reuse*/ false})); + ++#endif ++ + int main(int argc, char *argv[]) { + init_windows_sockets(); + ProcessManager::set_origin(Path(argv[0]).dirname()); diff --git a/tests/ci/integration/run_mysql_integration.sh b/tests/ci/integration/run_mysql_integration.sh index 5b7c877568a..ae07b845d29 100755 --- a/tests/ci/integration/run_mysql_integration.sh +++ b/tests/ci/integration/run_mysql_integration.sh @@ -25,10 +25,12 @@ BOOST_INSTALL_FOLDER=/home/dependencies/boost # Assumes script is executed from the root of aws-lc directory SCRATCH_FOLDER=${SYS_ROOT}/"MYSQL_BUILD_ROOT" MYSQL_SRC_FOLDER="${SCRATCH_FOLDER}/mysql-server" -MYSQL_BUILD_FOLDER="${SCRATCH_FOLDER}/server/mysql-aws-lc" +MYSQL_BUILD_FOLDER="${SCRATCH_FOLDER}/mysql-aws-lc" +MYSQL_PATCH_FOLDER=${SRC_ROOT}/"tests/ci/integration/mysql_patch" AWS_LC_BUILD_FOLDER="${SCRATCH_FOLDER}/aws-lc-build" AWS_LC_INSTALL_FOLDER="${MYSQL_SRC_FOLDER}/aws-lc-install" + mkdir -p ${SCRATCH_FOLDER} rm -rf ${SCRATCH_FOLDER}/* cd ${SCRATCH_FOLDER} @@ -54,6 +56,29 @@ function mysql_run_tests() { popd } +# MySQL tests expect the OpenSSL style of error messages. We patch this to expect AWS-LC's style. +# TODO: Remove this when we make an upstream contribution. +function mysql_patch_error_strings() { + MYSQL_TEST_FILES=("test_routing_splicer.cc" "test_http_server.cc") + MYSQL_ERROR_STRING=("certificate verify failed" "no start line" "ee key too small") + AWS_LC_EXPECTED_ERROR_STRING=("CERTIFICATE_VERIFY_FAILED" "NO_START_LINE" "key-size too small") + for file in "${MYSQL_TEST_FILES[@]}"; do + for i in "${!MYSQL_ERROR_STRING[@]}"; do + find ./ -type f -name "$file" | xargs sed -i -e "s|${MYSQL_ERROR_STRING[$i]}|${AWS_LC_EXPECTED_ERROR_STRING[$i]}|g" + done + done +} + +# MySQL relies on some behaviour that AWS-LC intentionally does not provide support for. Some of these known gaps are listed below: +# * DH cipher suites in libssl +# * Stateful session resumption +function mysql_patch_tests() { + for patchfile in $(find -L "${MYSQL_PATCH_FOLDER}" -type f -name '*.patch'); do + echo "Apply patch $patchfile..." + patch -p1 --quiet -i "$patchfile" + done +} + # Get latest MySQL version. MySQL often updates with large changes depending on OpenSSL all at once, so we pin to a specific version. mysql_patch_reminder git clone https://github.com/mysql/mysql-server.git ${MYSQL_SRC_FOLDER} -b ${MYSQL_VERSION_TAG} --depth 1 @@ -62,7 +87,8 @@ ls aws_lc_build ${SRC_ROOT} ${AWS_LC_BUILD_FOLDER} ${AWS_LC_INSTALL_FOLDER} pushd ${MYSQL_SRC_FOLDER} +mysql_patch_tests +mysql_patch_error_strings mysql_build -# TODO: There are still pending test failures that need to be resolved. Turn this on once we resolve them. -# mysql_run_tests +mysql_run_tests popd From 7f1fefce7ad6b89cdefdbb1dc7369eeba49c6905 Mon Sep 17 00:00:00 2001 From: samuel40791765 Date: Wed, 28 Jun 2023 21:52:24 +0000 Subject: [PATCH 2/4] dump out logs --- tests/ci/integration/run_mysql_integration.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/ci/integration/run_mysql_integration.sh b/tests/ci/integration/run_mysql_integration.sh index ae07b845d29..326564e9861 100755 --- a/tests/ci/integration/run_mysql_integration.sh +++ b/tests/ci/integration/run_mysql_integration.sh @@ -4,6 +4,8 @@ source tests/ci/common_posix_setup.sh +trap dump_log EXIT + MYSQL_VERSION_TAG="mysql-8.0.33" # This directory is specific to the docker image used. Use -DDOWNLOAD_BOOST=1 -DWITH_BOOST= # with mySQL to download a compatible boost version locally. @@ -56,6 +58,15 @@ function mysql_run_tests() { popd } +# Used to access debugging logs. +function dump_log() { + ls ${MYSQL_BUILD_FOLDER}/Testing/Temporary/LastTest.log + for logfile in $(find -L "${MYSQL_BUILD_FOLDER}/Testing/Temporary" -type f -name '*.log'); do + echo "Dumping out logs to observe:" + cat $logfile + done +} + # MySQL tests expect the OpenSSL style of error messages. We patch this to expect AWS-LC's style. # TODO: Remove this when we make an upstream contribution. function mysql_patch_error_strings() { @@ -80,7 +91,7 @@ function mysql_patch_tests() { } # Get latest MySQL version. MySQL often updates with large changes depending on OpenSSL all at once, so we pin to a specific version. -mysql_patch_reminder +#mysql_patch_reminder git clone https://github.com/mysql/mysql-server.git ${MYSQL_SRC_FOLDER} -b ${MYSQL_VERSION_TAG} --depth 1 mkdir -p ${AWS_LC_BUILD_FOLDER} ${AWS_LC_INSTALL_FOLDER} ${MYSQL_BUILD_FOLDER} ls From fd3c9de62a16b3f06402864de1ecba26f543d66d Mon Sep 17 00:00:00 2001 From: samuel40791765 Date: Wed, 28 Jun 2023 23:19:37 +0000 Subject: [PATCH 3/4] try non-root user --- .../codebuild/integration/mysql_integration.yml | 8 ++++++++ .../integration/mysql_patch/localhost-ipv6.patch | 15 +++++++++++++++ tests/ci/integration/run_mysql_integration.sh | 4 ++-- 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 tests/ci/integration/mysql_patch/localhost-ipv6.patch diff --git a/tests/ci/codebuild/integration/mysql_integration.yml b/tests/ci/codebuild/integration/mysql_integration.yml index 074d6f2eaae..83a743a20f2 100644 --- a/tests/ci/codebuild/integration/mysql_integration.yml +++ b/tests/ci/codebuild/integration/mysql_integration.yml @@ -8,6 +8,14 @@ env: GOPROXY: https://proxy.golang.org,direct phases: + install: + run-as: root + commands: + # Let postgres user in docker image take ownership of codebuild artifacts. + - chown -R postgres:postgres /codebuild/output + # Go caches build objects in /root/.cache. + - chown -R postgres:postgres /root/ build: + run-as: postgres commands: - ./tests/ci/integration/run_mysql_integration.sh diff --git a/tests/ci/integration/mysql_patch/localhost-ipv6.patch b/tests/ci/integration/mysql_patch/localhost-ipv6.patch new file mode 100644 index 00000000000..7c61eaa1c68 --- /dev/null +++ b/tests/ci/integration/mysql_patch/localhost-ipv6.patch @@ -0,0 +1,15 @@ +diff --git a/storage/ndb/src/common/portlib/NdbTCP.cpp b/storage/ndb/src/common/portlib/NdbTCP.cpp +index 24c02843..e4871698 100644 +--- a/storage/ndb/src/common/portlib/NdbTCP.cpp ++++ b/storage/ndb/src/common/portlib/NdbTCP.cpp +@@ -504,8 +504,8 @@ TAPTEST(NdbGetInAddr) + { + NdbTCP_set_preferred_IP_version(4); + CHECK("localhost", 0, "127.0.0.1"); +- NdbTCP_set_preferred_IP_version(6); +- CHECK("localhost", 0, "::1"); ++ // NdbTCP_set_preferred_IP_version(6); ++ // CHECK("localhost", 0, "::1"); + NdbTCP_set_preferred_IP_version(4); + } + CHECK("127.0.0.1", 0); diff --git a/tests/ci/integration/run_mysql_integration.sh b/tests/ci/integration/run_mysql_integration.sh index 326564e9861..2ac1735ec8f 100755 --- a/tests/ci/integration/run_mysql_integration.sh +++ b/tests/ci/integration/run_mysql_integration.sh @@ -54,7 +54,7 @@ function mysql_build() { function mysql_run_tests() { pushd ${MYSQL_BUILD_FOLDER} - ninja test + ninja test-unit popd } @@ -63,7 +63,7 @@ function dump_log() { ls ${MYSQL_BUILD_FOLDER}/Testing/Temporary/LastTest.log for logfile in $(find -L "${MYSQL_BUILD_FOLDER}/Testing/Temporary" -type f -name '*.log'); do echo "Dumping out logs to observe:" - cat $logfile +# cat $logfile done } From ed663b9a08f6c8e87208860fbcf963377135d455 Mon Sep 17 00:00:00 2001 From: samuel40791765 Date: Wed, 5 Jul 2023 22:30:11 +0000 Subject: [PATCH 4/4] run mtr tests instead like the internal RDS repository --- .../integration/mysql_integration.yml | 8 --- .../linux-x86/ubuntu-22.04_base/Dockerfile | 2 +- .../mysql_patch/dh-params-off.patch | 20 ------- .../mysql_patch/localhost-ipv6.patch | 15 ----- .../stateful-session-reuse-off.patch | 22 ------- .../mysql_patch/test_wl13075-off.patch | 32 +++++++++++ tests/ci/integration/run_mysql_integration.sh | 57 ++++++++++++++----- 7 files changed, 75 insertions(+), 81 deletions(-) delete mode 100644 tests/ci/integration/mysql_patch/dh-params-off.patch delete mode 100644 tests/ci/integration/mysql_patch/localhost-ipv6.patch delete mode 100644 tests/ci/integration/mysql_patch/stateful-session-reuse-off.patch create mode 100644 tests/ci/integration/mysql_patch/test_wl13075-off.patch diff --git a/tests/ci/codebuild/integration/mysql_integration.yml b/tests/ci/codebuild/integration/mysql_integration.yml index 83a743a20f2..074d6f2eaae 100644 --- a/tests/ci/codebuild/integration/mysql_integration.yml +++ b/tests/ci/codebuild/integration/mysql_integration.yml @@ -8,14 +8,6 @@ env: GOPROXY: https://proxy.golang.org,direct phases: - install: - run-as: root - commands: - # Let postgres user in docker image take ownership of codebuild artifacts. - - chown -R postgres:postgres /codebuild/output - # Go caches build objects in /root/.cache. - - chown -R postgres:postgres /root/ build: - run-as: postgres commands: - ./tests/ci/integration/run_mysql_integration.sh diff --git a/tests/ci/docker_images/linux-x86/ubuntu-22.04_base/Dockerfile b/tests/ci/docker_images/linux-x86/ubuntu-22.04_base/Dockerfile index 41f32fbc28f..8040fed36a8 100644 --- a/tests/ci/docker_images/linux-x86/ubuntu-22.04_base/Dockerfile +++ b/tests/ci/docker_images/linux-x86/ubuntu-22.04_base/Dockerfile @@ -39,6 +39,7 @@ RUN set -ex && \ llvm-dev \ libicu-dev \ libipc-run-perl \ + libjson-perl \ libreadline-dev \ libudev-dev \ zlib1g-dev \ @@ -61,7 +62,6 @@ RUN set -ex && \ # Download a copy of LLVM's libcxx which is required for building and running with Memory Sanitizer git clone https://github.com/llvm/llvm-project.git --branch llvmorg-11.1.0 --depth 1 && \ cd llvm-project && rm -rf $(ls -A | grep -Ev "(libcxx|libcxxabi)") && \ - apt-get --purge remove -y unzip && \ apt-get autoremove --purge -y && \ apt-get clean && \ apt-get autoclean && \ diff --git a/tests/ci/integration/mysql_patch/dh-params-off.patch b/tests/ci/integration/mysql_patch/dh-params-off.patch deleted file mode 100644 index 72e8ae1ff70..00000000000 --- a/tests/ci/integration/mysql_patch/dh-params-off.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/router/tests/component/test_http_server.cc b/router/tests/component/test_http_server.cc -index 65a04739..93545f52 100644 ---- a/router/tests/component/test_http_server.cc -+++ b/router/tests/component/test_http_server.cc -@@ -1382,6 +1382,7 @@ const HttpServerSecureParams http_server_secure_params[]{ - }, - false, - "setting ssl_dh_params failed"}, -+#if !defined (OPENSSL_IS_AWSLC) - {"dh ciphers, default dh-params", - "WL12524::TS_CR_09", - { -@@ -1416,6 +1417,7 @@ const HttpServerSecureParams http_server_secure_params[]{ - // success otherwise - is_with_ssl_support(), - is_with_ssl_support() ? "" : kSslSupportIsDisabled}, -+#endif - {"non-dh-cipher, strong dh-params", - "WL12524::TS_SR4_01,WL12524::TS_SR3_01", - { diff --git a/tests/ci/integration/mysql_patch/localhost-ipv6.patch b/tests/ci/integration/mysql_patch/localhost-ipv6.patch deleted file mode 100644 index 7c61eaa1c68..00000000000 --- a/tests/ci/integration/mysql_patch/localhost-ipv6.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/storage/ndb/src/common/portlib/NdbTCP.cpp b/storage/ndb/src/common/portlib/NdbTCP.cpp -index 24c02843..e4871698 100644 ---- a/storage/ndb/src/common/portlib/NdbTCP.cpp -+++ b/storage/ndb/src/common/portlib/NdbTCP.cpp -@@ -504,8 +504,8 @@ TAPTEST(NdbGetInAddr) - { - NdbTCP_set_preferred_IP_version(4); - CHECK("localhost", 0, "127.0.0.1"); -- NdbTCP_set_preferred_IP_version(6); -- CHECK("localhost", 0, "::1"); -+ // NdbTCP_set_preferred_IP_version(6); -+ // CHECK("localhost", 0, "::1"); - NdbTCP_set_preferred_IP_version(4); - } - CHECK("127.0.0.1", 0); diff --git a/tests/ci/integration/mysql_patch/stateful-session-reuse-off.patch b/tests/ci/integration/mysql_patch/stateful-session-reuse-off.patch deleted file mode 100644 index 88a50ee4730..00000000000 --- a/tests/ci/integration/mysql_patch/stateful-session-reuse-off.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/router/tests/component/test_metadata_ttl.cc b/router/tests/component/test_metadata_ttl.cc -index 1fbf8928..7aeacf33 100644 ---- a/router/tests/component/test_metadata_ttl.cc -+++ b/router/tests/component/test_metadata_ttl.cc -@@ -2562,6 +2562,8 @@ INSTANTIATE_TEST_SUITE_P( - "GR_V1", ClusterType::GR_V1)), - get_test_description); - -+#if !defined (OPENSSL_IS_AWSLC) -+ - struct SessionReuseTestParams { - std::string router_ssl_mode; - bool server_ssl_enabled; -@@ -2657,6 +2659,8 @@ INSTANTIATE_TEST_SUITE_P( - /*server_ssl_enabled*/ true, - /*expected_session_reuse*/ false})); - -+#endif -+ - int main(int argc, char *argv[]) { - init_windows_sockets(); - ProcessManager::set_origin(Path(argv[0]).dirname()); diff --git a/tests/ci/integration/mysql_patch/test_wl13075-off.patch b/tests/ci/integration/mysql_patch/test_wl13075-off.patch new file mode 100644 index 00000000000..e99a44eb634 --- /dev/null +++ b/tests/ci/integration/mysql_patch/test_wl13075-off.patch @@ -0,0 +1,32 @@ +diff --git a/testclients/mysql_client_test.cc b/testclients/mysql_client_test.cc +index f1e6744b..26021419 100644 +--- a/testclients/mysql_client_test.cc ++++ b/testclients/mysql_client_test.cc +@@ -23050,6 +23050,9 @@ static void test_bug32915973() { + mysql_stmt_close(stmt); + } + ++/* This test uses stateful session resumption, which is not supported in AWS-LC. */ ++#if !defined (OPENSSL_IS_AWSLC) ++ + static void test_wl13075() { + int rc; + myheader("test_wl13075"); +@@ -23182,6 +23185,7 @@ static void test_wl13075() { + DIE_UNLESS(ret_ses_data == nullptr); + } + } ++#endif + + static void finish_with_error(MYSQL *con) { + fprintf(stderr, "[%i] %s\n", mysql_errno(con), mysql_error(con)); +@@ -23841,7 +23845,9 @@ static struct my_tests_st my_tests[] = { + {"test_bug32892045", test_bug32892045}, + {"test_bug33164347", test_bug33164347}, + {"test_bug32915973", test_bug32915973}, ++#if !defined (OPENSSL_IS_AWSLC) + {"test_wl13075", test_wl13075}, ++#endif + {"test_bug34007830", test_bug34007830}, + {"test_bug33535746", test_bug33535746}, + {"test_server_telemetry_traces", test_server_telemetry_traces}, diff --git a/tests/ci/integration/run_mysql_integration.sh b/tests/ci/integration/run_mysql_integration.sh index 2ac1735ec8f..c8af70d075e 100755 --- a/tests/ci/integration/run_mysql_integration.sh +++ b/tests/ci/integration/run_mysql_integration.sh @@ -4,8 +4,6 @@ source tests/ci/common_posix_setup.sh -trap dump_log EXIT - MYSQL_VERSION_TAG="mysql-8.0.33" # This directory is specific to the docker image used. Use -DDOWNLOAD_BOOST=1 -DWITH_BOOST= # with mySQL to download a compatible boost version locally. @@ -47,27 +45,56 @@ function mysql_patch_reminder() { } function mysql_build() { - cmake ${MYSQL_SRC_FOLDER} -GNinja -DENABLED_PROFILING=OFF -DWITH_NDB_JAVA=OFF -DWITH_BOOST=${BOOST_INSTALL_FOLDER} -DWITH_SSL=${AWS_LC_INSTALL_FOLDER} "-B${MYSQL_BUILD_FOLDER}" + cmake ${MYSQL_SRC_FOLDER} -GNinja -DWITH_BOOST=${BOOST_INSTALL_FOLDER} -DWITH_SSL=${AWS_LC_INSTALL_FOLDER} "-B${MYSQL_BUILD_FOLDER}" ninja -C ${MYSQL_BUILD_FOLDER} ls -R ${MYSQL_BUILD_FOLDER} } function mysql_run_tests() { - pushd ${MYSQL_BUILD_FOLDER} - ninja test-unit + pushd ${MYSQL_BUILD_FOLDER}/mysql-test + # More complicated integration tests. mtr expects to be launched in-place and with write access to it's own directories. This is + # what RDS runs interally. + # + # Tests marked with Bug#0000 are tests that have been disabled internally in RDS as well. These tests aren't exactly relevant + # to testing AWS-LC functionality. + # Tests marked with Bug#0001 use DHE cipher suites for the connection. AWS-LC has no intention of supporting DHE cipher suites. + # Tests marked with Bug#0002 use stateful session resumption, otherwise known as session caching. It is known that AWS-LC does not + # currently support this. + echo "main.mysqlpump_bugs : Bug#0000 Can't create/open a file ~/dump.sql' +main.restart_server : Bug#0000 mysqld is not managed by supervisor process +main.file_contents : Bug#0000 Cannot open 'INFO_SRC' in '' +main.resource_group_thr_prio_unsupported : Bug#0000 Invalid thread priority value -5 +main.dd_upgrade_error : Bug#0000 running mysqld as root +main.dd_upgrade_error_cs : Bug#0000 running mysqld as root +main.basedir : Bug#0000 running mysqld as root +main.lowercase_fs_off : Bug#0000 running mysqld as root +main.upgrade : Bug#0000 running mysqld as root +main.mysqld_cmdline_warnings : Bug#0000 running mysqld as root +main.mysqld_daemon : Bug#0000 failed, error: 256, status: 1, errno: 2. +main.mysqld_safe : Bug#0000 nonexistent: No such file or directory +main.grant_user_lock : Bug#0000 Access denied for user root at localhost +main.persisted_variables_bugs_fast : Bug#0000 Unsure +main.mysqldump : Bug#0000 contains nonaggregated column +main.func_math : Bug#0000 should have failed with errno 1690 +main.derived_condition_pushdown : Bug#0000 Fails with OpenSSL as well. Not relevant to AWS-LC. +main.grant_alter_user_qa : Bug#0001 Uses DHE cipher suites in test, which AWS-LC does not support. +main.grant_user_lock_qa : Bug#0001 Uses DHE cipher suites in test, which AWS-LC does not support. +main.openssl_1 : Bug#0001 Uses DHE cipher suites in test, which AWS-LC does not support. +main.ssl : Bug#0001 Uses DHE cipher suites in test, which AWS-LC does not support. +main.ssl_cipher : Bug#0001 Uses DHE cipher suites in test, which AWS-LC does not support. +main.ssl_dynamic : Bug#0001 Uses DHE cipher suites in test, which AWS-LC does not support. +main.ssl-sha512 : Bug#0001 Uses DHE cipher suites in test, which AWS-LC does not support. +main.ssl_cache : Bug#0002 AWS-LC does not support Stateful session resumption (Session Caching). +main.ssl_cache_tls13 : Bug#0002 AWS-LC does not support Stateful session resumption (Session Caching). +"> skiplist + ./mtr --suite=main --force --parallel=auto --skip-test-list=${MYSQL_BUILD_FOLDER}/mysql-test/skiplist --retry-failure=3 popd } -# Used to access debugging logs. -function dump_log() { - ls ${MYSQL_BUILD_FOLDER}/Testing/Temporary/LastTest.log - for logfile in $(find -L "${MYSQL_BUILD_FOLDER}/Testing/Temporary" -type f -name '*.log'); do - echo "Dumping out logs to observe:" -# cat $logfile - done -} - # MySQL tests expect the OpenSSL style of error messages. We patch this to expect AWS-LC's style. +# These are checked as part of mySQL's unit tests, but RDS and us don't actually run them in our CI. They are known to be +# flaky within docker containers. The mtr tests are much more robust and run full server test suites that actually do TLS +# connections end-to-end. # TODO: Remove this when we make an upstream contribution. function mysql_patch_error_strings() { MYSQL_TEST_FILES=("test_routing_splicer.cc" "test_http_server.cc") @@ -91,7 +118,7 @@ function mysql_patch_tests() { } # Get latest MySQL version. MySQL often updates with large changes depending on OpenSSL all at once, so we pin to a specific version. -#mysql_patch_reminder +mysql_patch_reminder git clone https://github.com/mysql/mysql-server.git ${MYSQL_SRC_FOLDER} -b ${MYSQL_VERSION_TAG} --depth 1 mkdir -p ${AWS_LC_BUILD_FOLDER} ${AWS_LC_INSTALL_FOLDER} ${MYSQL_BUILD_FOLDER} ls