Skip to content

Commit 290e12f

Browse files
maltesanderclaude
andcommitted
test: skip the raw-path classification scan under Miri
The scan covers the whole u16 range against two backends — 131 072 evaluations — which the stable suite absorbs without noticing and Miri spends 43.7s on, a quarter of that job. common_get_info_raw contains no unsafe, so the interpreter has nothing to check and pays that only to repeat a classification stable already made. Same reasoning as the escape-nesting test, and the same remedy AGENTS.md prescribes for a test whose cost is algorithmic rather than memory-safety-related. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent ea555cd commit 290e12f

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎src/backend.rs‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2724,6 +2724,17 @@ mod tests {
27242724
/// The whole `u16` range is scanned rather than a hand-picked set: what is
27252725
/// answered here is exactly what the function's `match` decides, and a list
27262726
/// maintained beside it would be a second statement of the same fact.
2727+
///
2728+
/// That scan is 131 072 evaluations, which costs nothing on stable (the
2729+
/// whole suite runs in 0.2s) and 43.7s under Miri — a quarter of the job on
2730+
/// its own. `common_get_info_raw` contains no `unsafe`, so Miri has nothing
2731+
/// to check here and pays that purely to re-run a classification stable
2732+
/// already made. Same reasoning as
2733+
/// `escape::tests::pathological_nesting_returns_an_error_rather_than_killing_the_process`.
2734+
#[cfg_attr(
2735+
miri,
2736+
ignore = "131k-evaluation scan; the function under test has no unsafe for Miri to check"
2737+
)]
27272738
#[test]
27282739
fn common_get_info_raw_answers_are_backend_derived_or_declared() {
27292740
use crate::test_utils::MockAltBackend;

0 commit comments

Comments
 (0)