Skip to content

Optimize expensive Miri tests #391

@joshlf

Description

@joshlf

Some tests are either marked #[cfg_attr(miri, ignore)] or have parameters set to smaller values under cfg!(miri). Even still, they are often expensive when executed, and it would be good to optimize them to save time in CI.

EDIT: It looks like this and related Miri optimizations are backwards, doing the expensive thing under Miri rather than the cheap thing:

zerocopy/src/lib.rs

Lines 3389 to 3393 in 524b2e2

let assert_msg = if cfg!(miri) {
format!("\n{args:?}\nsize:{size}, align:{align}")
} else {
String::new()
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    compatibility-nonbreakingChanges that are (likely to be) non-breakingexperience-mediumThis issue is of medium difficulty, and requires some experiencehelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions