fix(ci): tarpaulin LLVM engine — coverage without disabling ASLR #26
fix/tarpaulin-llvm-coverage
into main
Closes #21.
The coverage step ran cargo tarpaulin with its default Linux ptrace engine, which calls personality(ADDR_NO_RANDOMIZE) to disable ASLR before launching the test binary. On a self-hosted runner whose job-container seccomp blocks personality() and/or whose host kernel is hardened, that returns EPERM and the whole coverage job dies:
cargo_tarpaulin: Failed to run tests: ASLR disable failed: EPERM: Operation not permitted
(check/test/fmt all passed; only coverage failed — run 780388a8d3.)
Change
Switch to tarpaulin’s LLVM source-based engine (--engine llvm), which instruments via -C instrument-coverage and never ptraces or disables ASLR — so coverage runs fine under a locked-down sandbox without handing the job extra privileges. Adds rustup component add llvm-tools-preview so the engine has llvm-profdata/llvm-cov.
- name: coverage
run: |
+ rustup component add llvm-tools-preview
cargo install cargo-tarpaulin --version 0.32.7
- cargo tarpaulin --out lcov --output-dir coverage/
+ cargo tarpaulin --engine llvm --out lcov --output-dir coverage/
🤖 Generated with Claude Code