1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-28 21:47:38 +03:00

Merge pull request #18226 from mrc0mmand/actions-flake-workarounds

ci: assorted workarounds for recent flakes
This commit is contained in:
Luca Boccassi 2021-01-14 10:00:24 +00:00 committed by GitHub
commit c17b2155e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 9 deletions

View File

@ -47,13 +47,15 @@ for phase in "${PHASES[@]}"; do
meson test -C build --print-errorlogs
;;
RUN_ASAN_UBSAN|RUN_GCC_ASAN_UBSAN|RUN_CLANG_ASAN_UBSAN)
MESON_ARGS=(--optimization=1)
if [[ "$phase" = "RUN_CLANG_ASAN_UBSAN" ]]; then
export CC=clang
export CXX=clang++
# Build fuzzer regression tests only with clang (for now),
# see: https://github.com/systemd/systemd/pull/15886#issuecomment-632689604
# -Db_lundef=false: See https://github.com/mesonbuild/meson/issues/764
MESON_ARGS=(-Db_lundef=false -Dfuzz-tests=true --optimization=1)
MESON_ARGS+=(-Db_lundef=false -Dfuzz-tests=true)
fi
meson --werror -Dtests=unsafe -Db_sanitize=address,undefined "${MESON_ARGS[@]}" build
ninja -C build -v
@ -61,12 +63,17 @@ for phase in "${PHASES[@]}"; do
export ASAN_OPTIONS=strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1
# Never remove halt_on_error from UBSAN_OPTIONS. See https://github.com/systemd/systemd/commit/2614d83aa06592aedb.
export UBSAN_OPTIONS=print_stacktrace=1:print_summary=1:halt_on_error=1
# There's some weird stuff going on in GH Actions, where the following
# `meson test` command hangs after test #252 unless it's executed under
# unbuffer or there's something else producing output. So far it happens
# _only_ with ASAn (not with UBSan), both with gcc and clang. I'll
# need to take a closer look later...
unbuffer meson test --timeout-multiplier=3 -C build --print-errorlogs
# FIXME
# For some strange reason the GH Actions VM stops responding after
# executing first ~150 tests, _unless_ there's something producing
# output (either running `meson test` in verbose mode, or something
# else in background). Despite my efforts so far I haven't been able
# to identify the culprit (since the issue is not reproducible
# during debugging, wonderful), so let's at least keep a workaround
# here to make the builds stable for the time being.
(set +x; while :; do echo -ne "\n[WATCHDOG] $(date)\n"; sleep 30; done) &
meson test --timeout-multiplier=3 -C build --print-errorlogs
;;
CLEANUP)
info "Cleanup phase"

View File

@ -897,8 +897,8 @@ int main(int argc, char *argv[]) {
test_setup_logging(LOG_DEBUG);
#if HAS_FEATURE_ADDRESS_SANITIZER
if (strstr_ptr(ci_environment(), "travis")) {
log_notice("Running on TravisCI under ASan, skipping, see https://github.com/systemd/systemd/issues/10696");
if (strstr_ptr(ci_environment(), "travis") || strstr_ptr(ci_environment(), "github-actions")) {
log_notice("Running on Travis CI/GH Actions under ASan, skipping, see https://github.com/systemd/systemd/issues/10696");
return EXIT_TEST_SKIP;
}
#endif