Skip to main content

Module covguard

Module covguard 

Source
Expand description

Coverage-capture resilience for crash-on-shutdown hardware (e.g. the i.MX Vivante EGL driver SIGABRTs during teardown after tests pass). Under coverage instrumentation only, install a SIGABRT handler that flushes the LLVM profile to LLVM_PROFILE_FILE before the abort completes, then restores the default disposition and re-raises so the process exit status is unchanged (the CI workflow already treats JUnit as the source of truth).

No-op unless built with -Cinstrument-coverage (the coverage cfg, set by build.rs) on Linux. Never installed in shipped release builds.

Functionsยง

install
Install the coverage flush-on-abort handler. Idempotent; safe to call from multiple artifact constructors. No-op outside instrumented Linux builds.