Skip to content

Miri errors when trying to run tests on proc macro #5122

Description

@nazar-pc

After #5101 was mostly fixed by rust-lang/cargo#17123 I discovered that cross-compilation is still problematic.

Reproduction is the same repo: https://github.com/nazar-pc/miri-5101-reproduction

nazar-pc@nazar-pc:/w/g/miri-5101-reproduction> RUSTFLAGS="-Znext-solver=globally" MIRIFLAGS="-Znext-solver=globally" cargo miri test -Ztarget-applies-to-host -Zhost-config --config 'host.rustflags=["-Znext-solver=globally"]' --lib -Zjson-target-spec --target riscv64a23-unknown-linux-gnu
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.00s
     Running unittests src/lib.rs (/home/nazar-pc/.cache/cargo/target/miri/debug/deps/repro_proc_macro-c89753020fd7ddbf)
error: test failed, to rerun pass `-p repro-proc-macro --lib`

Caused by:
  could not execute process `/home/nazar-pc/.cache/cargo/target/miri/debug/deps/repro_proc_macro-c89753020fd7ddbf` (never executed)

Caused by:
  Permission denied (os error 13)
Exit code 101
nazar-pc@nazar-pc:/w/g/miri-5101-reproduction> cat /home/nazar-pc/.cache/cargo/target/miri/debug/deps/repro_proc_macro-c89753020fd7ddbf
"SkipProcMacroTest"

I'm not sure if it is Miri or Cargo to blame here, but something is definitely off.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions