Skip to content

Commit 76c2402

Browse files
robinnewhouseLinuxJedi
authored andcommitted
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
1 parent 0a67daa commit 76c2402

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

.gitlab-ci.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ variables:
7171
echo "$package"
7272
rpm -qlpv "$package" | awk '{print $1 " " $3 "/" $4 " ." $9 " " $10 " " $11}' | sort -k 3
7373
echo "------------------------------------------------"
74-
done >> ../rpmlist-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log
74+
done >> "../rpmlist-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log"
7575
# CPackRPM lists contents in build log, so no need to show the output of this,
7676
# just store it as a build artifact that can be downloaded and diffed against
7777
# other builds to detect which files where added/removed/moved
@@ -182,7 +182,7 @@ fedora-sanitizer:
182182
GIT_SUBMODULE_STRATEGY: normal
183183
script:
184184
- yum install -y yum-utils rpm-build openssl-devel clang
185-
- yum install -y /usr/lib64/libasan.so.6.0.0 /usr/lib64/libtsan.so.0.0.0 /usr/lib64/libubsan.so.1.0.0
185+
- yum install -y libasan libtsan libubsan
186186
# This repository does not have any .spec files, so install dependencies based on Fedora spec file
187187
- yum-builddep -y mariadb-server
188188
- mkdir builddir; cd builddir
@@ -305,6 +305,8 @@ mysql-test-run:
305305
stage: test
306306
dependencies:
307307
- fedora
308+
needs:
309+
- fedora
308310
<<: *mysql-test-run-def
309311
artifacts:
310312
when: always # Also show results when tests fail
@@ -326,6 +328,8 @@ mysql-test-run-asan:
326328
RESTART_POLICY: "--force-restart"
327329
dependencies:
328330
- "fedora-sanitizer: [-DWITH_ASAN=YES]"
331+
needs:
332+
- "fedora-sanitizer: [-DWITH_ASAN=YES]"
329333
<<: *mysql-test-run-def
330334
artifacts:
331335
when: always # Also show results when tests fail
@@ -339,6 +343,8 @@ mysql-test-run-tsan:
339343
RESTART_POLICY: "--force-restart"
340344
dependencies:
341345
- "fedora-sanitizer: [-DWITH_TSAN=YES]"
346+
needs:
347+
- "fedora-sanitizer: [-DWITH_TSAN=YES]"
342348
<<: *mysql-test-run-def
343349
allow_failure: true
344350
artifacts:
@@ -353,6 +359,8 @@ mysql-test-run-ubsan:
353359
RESTART_POLICY: "--force-restart"
354360
dependencies:
355361
- "fedora-sanitizer: [-DWITH_UBSAN=YES]"
362+
needs:
363+
- "fedora-sanitizer: [-DWITH_UBSAN=YES]"
356364
<<: *mysql-test-run-def
357365
allow_failure: true
358366
artifacts:
@@ -367,6 +375,8 @@ mysql-test-run-msan:
367375
RESTART_POLICY: "--force-restart"
368376
dependencies:
369377
- "fedora-sanitizer: [-DWITH_MSAN=YES]"
378+
needs:
379+
- "fedora-sanitizer: [-DWITH_MSAN=YES]"
370380
<<: *mysql-test-run-def
371381
allow_failure: true
372382
artifacts:
@@ -379,6 +389,8 @@ rpmlint:
379389
stage: test
380390
dependencies:
381391
- fedora
392+
needs:
393+
- fedora
382394
script:
383395
- yum install -y rpmlint
384396
- rm -f rpm/*debuginfo* # Not relevant in this test
@@ -396,6 +408,8 @@ fedora install:
396408
stage: test
397409
dependencies:
398410
- fedora
411+
needs:
412+
- fedora
399413
script:
400414
- rm -f rpm/*debuginfo* # Not relevant in this test
401415
# Nothing provides galera-4 on Fedora, so this step fails if built with wsrep
@@ -429,6 +443,8 @@ fedora upgrade:
429443
stage: test
430444
dependencies:
431445
- fedora
446+
needs:
447+
- fedora
432448
script:
433449
- dnf install -y mariadb-server
434450
# Fedora does not support running services in Docker (like Debian packages do) so start it manually

0 commit comments

Comments
 (0)