Skip to content

Commit 945e7ed

Browse files
committed
ci: restore single leak sanitizer run
1 parent 897e904 commit 945e7ed

1 file changed

Lines changed: 13 additions & 30 deletions

File tree

.github/workflows/ci.yml

Lines changed: 13 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ jobs:
326326
# Keep source locations in sanitizer backtraces. The repository-wide
327327
# default is optimized for normal CI logs, but an unsymbolized LSan
328328
# report cannot identify the leaking test/helper.
329-
CARGO_PROFILE_DEV_DEBUG: 0
329+
CARGO_PROFILE_DEV_DEBUG: 2
330330
# AddressSanitizer enables leak detection by default. Leak checks run in
331331
# the dedicated leak sanitizer job, where third-party suppressions are
332332
# applied explicitly.
@@ -348,35 +348,18 @@ jobs:
348348
"$ASAN_SYMBOLIZER_PATH" --version || true
349349
fi
350350
if [[ "${{ matrix.sanitizer }}" == "leak" ]]; then
351-
# Repeat the unchanged full-workspace command to distinguish a
352-
# stable leak from process-teardown variance. Keep the first Cargo
353-
# failure status while allowing all three symbolized runs to finish.
354-
: > sanitizer.log
355-
first_failure_status=0
356-
for attempt in 1 2 3; do
357-
echo "::group::LSan full workspace attempt ${attempt}/3"
358-
set +e
359-
cargo +${SANITIZER_TOOLCHAIN} test -Z build-std --target x86_64-unknown-linux-gnu \
360-
--workspace --exclude storage \
361-
-- --skip cursor_snapshot_roundtrip \
362-
--skip install_snapshot_with_existing_data \
363-
--skip install_snapshot_rearms_append_log_hook \
364-
--skip test_snapshot_with_logindex_state \
365-
--skip test_on_binlog_write_updates_collector \
366-
--skip test_collector_state_export_restore \
367-
--skip storage_command_e2e_ \
368-
2>&1 | tee -a sanitizer.log
369-
attempt_status=${PIPESTATUS[0]}
370-
set -e
371-
echo "LSan full workspace attempt ${attempt}/3 exit status: ${attempt_status}" | tee -a sanitizer.log
372-
echo "::endgroup::"
373-
if [[ $attempt_status -ne 0 && $first_failure_status -eq 0 ]]; then
374-
first_failure_status=$attempt_status
375-
fi
376-
done
377-
if [[ $first_failure_status -ne 0 ]]; then
378-
exit "$first_failure_status"
379-
fi
351+
# Run the complete leak-sanitizer scope after the symbolized
352+
# diagnostic experiments; this is the final validation for the PR.
353+
cargo +${SANITIZER_TOOLCHAIN} test -Z build-std --target x86_64-unknown-linux-gnu \
354+
--workspace --exclude storage \
355+
-- --skip cursor_snapshot_roundtrip \
356+
--skip install_snapshot_with_existing_data \
357+
--skip install_snapshot_rearms_append_log_hook \
358+
--skip test_snapshot_with_logindex_state \
359+
--skip test_on_binlog_write_updates_collector \
360+
--skip test_collector_state_export_restore \
361+
--skip storage_command_e2e_ \
362+
2>&1 | tee sanitizer.log
380363
cargo +${SANITIZER_TOOLCHAIN} test -Z build-std --target x86_64-unknown-linux-gnu \
381364
-p storage --lib 2>&1 | tee -a sanitizer.log
382365
elif [[ "${{ matrix.sanitizer }}" == "thread" ]]; then

0 commit comments

Comments
 (0)