From 76c240281242aa9f15aa379cc5a3e23e8746635f Mon Sep 17 00:00:00 2001 From: Robin Newhouse Date: Fri, 9 Dec 2022 00:26:20 +0000 Subject: [PATCH] Fix build failure in sanitizer on GitLab-CI Sanitizer tests were introduced in 617f45b for GitLab CI, but started failing on latest Fedora version with error: $ yum install -y /usr/lib64/libasan.so.6.0.0 /usr/lib64/libtsan.so.0.0.0 /usr/lib64/libubsan.so.1.0.0 Last metadata expiration check: 0:00:51 ago on Fri Dec 9 20:05:01 2022. No match for argument: /usr/lib64/libasan.so.6.0.0 No match for argument: /usr/lib64/libtsan.so.0.0.0 Error: Unable to find a match: /usr/lib64/libasan.so.6.0.0 /usr/lib64/libtsan.so.0.0.0 The reason for using specific library versions is unknown. Switch to simply using latest package versions, as is works and is likely to work best in the long run. Also, enclose "../rpmlist-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log" in quotes to avoid `ambiguous redirect` error when $CI_JOB_NAME has spaces. Additionally use "needs" statements to allow tests to run immediately after dependent jobs passed instead of waiting for the full stage to complete. All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services --- .gitlab-ci.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 56f11c2917d..ed82104cb7b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -71,7 +71,7 @@ variables: echo "$package" rpm -qlpv "$package" | awk '{print $1 " " $3 "/" $4 " ." $9 " " $10 " " $11}' | sort -k 3 echo "------------------------------------------------" - done >> ../rpmlist-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log + done >> "../rpmlist-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log" # CPackRPM lists contents in build log, so no need to show the output of this, # just store it as a build artifact that can be downloaded and diffed against # other builds to detect which files where added/removed/moved @@ -182,7 +182,7 @@ fedora-sanitizer: GIT_SUBMODULE_STRATEGY: normal script: - yum install -y yum-utils rpm-build openssl-devel clang - - yum install -y /usr/lib64/libasan.so.6.0.0 /usr/lib64/libtsan.so.0.0.0 /usr/lib64/libubsan.so.1.0.0 + - yum install -y libasan libtsan libubsan # This repository does not have any .spec files, so install dependencies based on Fedora spec file - yum-builddep -y mariadb-server - mkdir builddir; cd builddir @@ -305,6 +305,8 @@ mysql-test-run: stage: test dependencies: - fedora + needs: + - fedora <<: *mysql-test-run-def artifacts: when: always # Also show results when tests fail @@ -326,6 +328,8 @@ mysql-test-run-asan: RESTART_POLICY: "--force-restart" dependencies: - "fedora-sanitizer: [-DWITH_ASAN=YES]" + needs: + - "fedora-sanitizer: [-DWITH_ASAN=YES]" <<: *mysql-test-run-def artifacts: when: always # Also show results when tests fail @@ -339,6 +343,8 @@ mysql-test-run-tsan: RESTART_POLICY: "--force-restart" dependencies: - "fedora-sanitizer: [-DWITH_TSAN=YES]" + needs: + - "fedora-sanitizer: [-DWITH_TSAN=YES]" <<: *mysql-test-run-def allow_failure: true artifacts: @@ -353,6 +359,8 @@ mysql-test-run-ubsan: RESTART_POLICY: "--force-restart" dependencies: - "fedora-sanitizer: [-DWITH_UBSAN=YES]" + needs: + - "fedora-sanitizer: [-DWITH_UBSAN=YES]" <<: *mysql-test-run-def allow_failure: true artifacts: @@ -367,6 +375,8 @@ mysql-test-run-msan: RESTART_POLICY: "--force-restart" dependencies: - "fedora-sanitizer: [-DWITH_MSAN=YES]" + needs: + - "fedora-sanitizer: [-DWITH_MSAN=YES]" <<: *mysql-test-run-def allow_failure: true artifacts: @@ -379,6 +389,8 @@ rpmlint: stage: test dependencies: - fedora + needs: + - fedora script: - yum install -y rpmlint - rm -f rpm/*debuginfo* # Not relevant in this test @@ -396,6 +408,8 @@ fedora install: stage: test dependencies: - fedora + needs: + - fedora script: - rm -f rpm/*debuginfo* # Not relevant in this test # Nothing provides galera-4 on Fedora, so this step fails if built with wsrep @@ -429,6 +443,8 @@ fedora upgrade: stage: test dependencies: - fedora + needs: + - fedora script: - dnf install -y mariadb-server # Fedora does not support running services in Docker (like Debian packages do) so start it manually