Skip to content

mention MIRIFLAGS in unsupported operation error and --help #3677

@lolbinarycat

Description

@lolbinarycat

I'm using proptest, which accesses the current directory, unsupported with miri isolation enabled.

test tests::always_has_matches ... error: unsupported operation: `getcwd` not available when isolation is enabled
   --> /home/binarycat/.rustup/toolchains/nightly-2024-05-30-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/os.rs:152:17
    |
152 |             if !libc::getcwd(ptr, buf.capacity()).is_null() {
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `getcwd` not available when isolation is enabled
    |
    = help: pass the flag `-Zmiri-disable-isolation` to disable isolation;

I tried cargo miri test -Zmiri-disable-isolation, cargo miri test -- -Zmiri-disable-isolation, cargo miri -Zmiri-disable-isolation test, and RUSTFLAGS="-Zmiri-disable-isolation" cargo miri test, all to no avail.

I then checked the helptext of cargo miri and of the generated test runner, but found nothing. only after looking through the README of this repo did i find out about the existance of MIRIFLAGS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions