test(coverage): run dead + DB_REGISTER groups (lock_deadlock 0.7->66%, env_register 0->55%) - #76
Merged
Merged
Conversation
…_coverage.sh
Add a COV_DEAD_REG block (on by default) that runs the two multi-process
suites reaching the deadlock detector and the process-registry crash/
recovery path, which the single-tclsh COV_TESTS loop cannot:
- dead001..dead006 spawn ddscript.tcl workers via wrap.tcl to build a
ring/clump lock cycle; __lock_detect (src/lock/lock_deadlock.c) then
picks a victim. dead002/003 run detection in-process in each worker.
- env007 + env012 use envscript.tcl to open the env with DB_REGISTER,
"crash" a process, and let a survivor detect the dead slot
(__envreg_register/__envreg_isalive, src/env/env_register.c) and run
recovery/failchk.
Like the COV_REP block these run driver-per-test with a per-test timeout
and orphan-worker cleanup (they reset TESTDIR and a hung worker must not
wedge the run). Proc counts are trimmed to {2 4} ({4} for dead005) so
each finishes well inside the 300s timeout; the full {2 4 10} matrix adds
only minutes, no new lines.
Measured on r-class box (gcc --coverage, lcov from .libs):
lock/lock_deadlock.c 0.7% -> 65.9% line (43.2% branch)
env/env_register.c 0.0% -> 54.7% line (43.1% branch)
env/env_failchk.c 17.4% -> 65.2% line (bonus, DB_REGISTER failchk path)
All eight tests pass reliably under timeout. README documents the block
and updates the least-covered table.
Coccinelle convention checksNo new violations. ✅ Resolved since baseline (2) -- update dist/cocci/baseline.txt to lock these in. |
ABI diff vs
|
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.
Wires the existing
dead(deadlock detector) group andenv007/env012(DB_REGISTER) into the coverage run — they existed but were never measured. NewCOV_DEAD_REGblock (driver-per-test, 300s timeout, orphan-worker cleanup, copying the proven COV_REP pattern).__lock_detectpicks the victim (in-process for dead002/003).-register, kill a process, reopen with-recover/-failchk; the survivor hits__envreg_register/__envreg_isalive+ recovery.All 8 tests PASS under timeout. Proc counts trimmed to
{2 4}(the 10-proc iterations exceed 300s but add zero new coverage — slow, not deadlocked). No bugs found. No coverage artifacts committed.