Repository navigation
Conversation
…Step 0/5 & TSan Split out from DeusData#3210 per maintainer review (Piece 2: test harness, sharding, wave runner, Step 0/5 parallelism, worker caps). Addresses both Piece 2 review items from DeusData#3210: - Makefile.cbm (test-tsan): use explicit `if [ "$$rc1" -ne 0 ] || [ "$$rc2" -ne 0 ]; then exit 1; fi;` instead of an AND list under `set -e` so a failing `pipeline` group can never exit 0 when the second group passes. Also consolidate 4 compiler `-dM -E` probes into one CC_DEFINES probe and make LLVM_BIN lazy. - tests/test_subprocess.c: replace the 2 ms sleep with a deterministic POSIX SIGALRM drain (sigprocmask SIG_BLOCK -> setitimer disable -> sigaction SIG_IGN -> unblock/reblock -> restore) with zero sleeps or timing dependence. Harness, sharding, and lane changes: - scripts/run-test-wave.py & scripts/run-tests-parallel.sh: deterministic LPT bin-packing across PAR/FLEX/EXCL phases, FLEX tail jobs=2 (keeping extraction exclusive at jobs=1), PAR-wave --worker-cap 2 (exempting core-count-asserting suites), and fast Windows stamp_windows_build_dir. - scripts/test.sh & tests/test_{makefile_ts_runtime_dependencies,codeql_retrace,security_fuzz_harness}.sh: parallel Step 0 contracts and Step 5-6 prod guards using temp log files (avoiding Windows pipe EOF hangs), skip redundant Step 0/5-6 on secondary shards while Shard 1 runs all contracts/guards, and parallelize slow Windows contract internals. - scripts/msan.sh & scripts/ci/msan-lane.sh: run MSan suites in parallel via run-test-wave.py with FLEX/EXCL isolation, LPT sharding, shard-manifest emission, union guard, and content-verified ccache pass-through. - .github/workflows/_test.yml & scripts/ci/require-all-green.sh: shard diag/lsan-macos/msan (2 shards each) and right-size PR shard counts with full shard-completeness union verification, wire inputs.skip_perf to diag/lsan-macos/msan, and schedule macos-15-intel first in CORE_UNIX. Signed-off-by: Guillaume Demay <guillaumedemay@hotmail.fr>
2 tasks done
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR authored with AI assistance on behalf of @GDemay; the commit carries Guillaume's DCO sign-off.
What does this PR do?
Split out from #3210 per maintainer review (Piece 2: test harness, sharding, wave runner, Step 0/5 parallelism, worker caps). Standalone on
main, incorporating both Piece 2 review points from #3210:Maintainer review items addressed directly
test-tsanexit-code check (Makefile.cbm): Usesif [ "$$rc1" -ne 0 ] || [ "$$rc2" -ne 0 ]; then exit 1; fi;instead of an AND list underset -e, so a failure inpipeline(rc1 != 0) can never come out green when the second group passes.SIGALRMdrain (tests/test_subprocess.c): Replaced the 2 ms sleep with a deterministic POSIX drain (sigprocmask(SIG_BLOCK)→setitimerdisable →sigaction(SIG_IGN)→sigprocmask(SIG_UNBLOCK)/SIG_BLOCK→ restoreprevious_action& mask) — zero sleeps, no timing dependence.Harness & sharding changes
scripts/run-test-wave.py&scripts/run-tests-parallel.sh:FLEX_FILE(CBM_TAIL_JOBS=2) while keepingextractionstrictly exclusive (jobs=1).--worker-cap(CBM_WORKERS=2in PAR wave, exempting core-count-asserting suitessystem_info,platform,worker_pool,parallel) to prevent 4× oversubscription.stamp_windows_build_dir(nativewhoami.exe /userSID +*.exeonly instead of/Tover thousands of objects).scripts/test.sh&tests/test_{makefile_ts_runtime_dependencies,codeql_retrace,security_fuzz_harness}.sh:CBM_CONTRACTS_SEQUENTIAL=1fallback retained), skip redundant Step 0/5–6 on secondary shards (2/N..N/N) while Shard 1 runs every check, and parallelize slow internal contract loops.scripts/msan.sh&scripts/ci/msan-lane.sh:scripts/run-test-wave.pywith FLEX/EXCL isolation (extractionandc_lspexclusive to avoid 16 GiB swap thrashing), deterministic LPT sharding, shard-manifest emission, union guard, and content-verifiedccachepass-through..github/workflows/_test.yml&scripts/ci/require-all-green.sh:test-diag,test-lsan-macos, andtest-msan(2 shards each), right-size PR shard counts (N_X86=2,N_ARM=2,N_MAC=2,N_MAC_INTEL=2,N_WIN=4), schedulemacos-15-intelfirst inCORE_UNIXto prevent runner-slot starvation, wireinputs.skip_perftodiag/lsan-macos/msan, upload shard manifests toshard-completeness, and map sharded job names inrequire-all-green.sh.Makefile.cbm:-dM -Ecompiler probes into oneCC_DEFINESprobe and makeLLVM_BINlazy (=) for fastermakestartup on Windows contract loops.Local Verification (Apple M3,
darwin/arm64)test-tsanexit-code proof (synthetic runner, all 4 branches):pipelinefail (rc1=1,rc2=0) → exited non-zero ✅memfail (rc1=0,rc2=1) → exited non-zero ✅daemonfail → exited non-zero ✅tests/test_subprocess.cdeterministic drain:-Wall -Wextra -Werror -fsanitize=thread(-fsyntax-only).sigprocmask+SIG_IGNdrain passed 50 / 50 iterations with zero exit 142.scripts/run-tests-parallel.shshards 1/4..4/4 verified byscripts/ci/verify-shard-union.sh:OK: ubuntu-latest-gcc — 4 shard(s), union of slices == full suite list.test_parallel_harness_contract.sh,test_harness_selection.sh,test_failure_report_contract.sh(63 checks),test_makefile_ts_runtime_dependencies.sh,test_codeql_retrace.sh,test_security_fuzz_harness.sh,test_lane_wiring_contract.sh,test_lane_gate_contract.sh,test_venue_parity_contract.sh,test_select_lanes.sh,check-no-test-skips.sh,check-dco.sh,bash -n/py_compile, and YAML validation on_test.yml.Checklist
git commit -s)