Skip to content

Commit 41d03a9

Browse files
doublegateclaude
andcommitted
fix(crypto): exclude timing test from coverage builds
The Elligator2 timing consistency test is now properly excluded from coverage builds using cfg_attr(coverage, ignore). Coverage instrumentation adds significant overhead that invalidates timing measurements: Observed in CI coverage build: - Normal build: mean=36ms, max_deviation=18ms - Coverage build: mean=148ms, max_deviation=156ms (4x slower, 8.5x variance) The test remains active in normal builds (including CI Test jobs) to catch timing regressions, but is automatically skipped when running under coverage instrumentation where timing measurements are meaningless. This follows best practices for timing-sensitive tests in instrumented environments. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 316f9fa commit 41d03a9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

crates/wraith-crypto/src/elligator.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,11 @@ mod tests {
449449
/// This test verifies that decoding takes similar time for different inputs,
450450
/// which is an indicator of constant-time behavior. Note that true constant-time
451451
/// verification requires specialized tools (dudect, ctgrind).
452+
///
453+
/// Timing tests are inherently incompatible with coverage instrumentation,
454+
/// so this test is disabled when running under coverage (cfg(coverage)).
452455
#[test]
456+
#[cfg_attr(coverage, ignore = "Timing tests incompatible with coverage instrumentation")]
453457
fn test_decode_timing_consistency() {
454458
use std::time::Instant;
455459

0 commit comments

Comments
 (0)