Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing Heph using Miri #644

Open
Thomasdezeeuw opened this issue Dec 22, 2024 · 0 comments
Open

Testing Heph using Miri #644

Thomasdezeeuw opened this issue Dec 22, 2024 · 0 comments
Labels
Heph Related to the Heph crate.

Comments

@Thomasdezeeuw
Copy link
Owner

Currently fails with

error: unsupported operation: `open` not available when isolation is enabled
    --> /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/fs.rs:1185:36
     |
1185 |         let fd = cvt_r(|| unsafe { open64(path.as_ptr(), flags, opts.mode as c_int) })?;
     |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `open` not available when isolation is enabled
     |
     = help: set `MIRIFLAGS=-Zmiri-disable-isolation` to disable isolation;
     = help: or set `MIRIFLAGS=-Zmiri-isolation-error=warn` to make Miri return an error code from isolated operations (if supported for that operation) and continue with a warning
     = note: BACKTRACE on thread `test_1_hello_wo`:
     = note: inside closure at /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/fs.rs:1185:36: 1185:84
     = note: inside `std::sys::pal::unix::cvt_r::<i32, {closure@std::sys::pal::unix::fs::File::open_c::{closure#0}}>` at /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/mod.rs:325:19: 325:22
     = note: inside `std::sys::pal::unix::fs::File::open_c` at /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/fs.rs:1185:18: 1185:87
     = note: inside `std::sys::pal::unix::process::process_common::Stdio::to_child_stdio` at /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs:481:26: 481:55
     = note: inside `std::sys::pal::unix::process::process_common::Command::setup_io` at /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs:384:40: 384:66
     = note: inside `std::sys::pal::unix::process::process_inner::<impl std::sys::pal::unix::process::process_common::Command>::spawn` at /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_unix.rs:70:30: 70:65
     = note: inside `std::process::Command::spawn` at /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/process.rs:1037:9: 1037:52
note: inside `run_example`
    --> tests/examples.rs:124:23
     |
124  |               let res = Command::new(path)
     |  _______________________^
125  | |                 .stdin(Stdio::null())
126  | |                 .stderr(Stdio::piped())
127  | |                 .stdout(Stdio::piped())
128  | |                 .spawn()
     | |________________________^
note: inside `run_example_output`
    --> tests/examples.rs:103:17
     |
103  |     let child = run_example(name);
     |                 ^^^^^^^^^^^^^^^^^
note: inside `test_1_hello_world`
    --> tests/examples.rs:11:18
     |
11   |     let output = run_example_output("1_hello_world");
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside closure
    --> tests/examples.rs:10:24
     |
9    | #[test]
     | ------- in this procedural macro expansion
10   | fn test_1_hello_world() {
     |                        ^
     = note: this error originates in the attribute macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to 1 previous error

error: test failed, to rerun pass `--test examples`
@Thomasdezeeuw Thomasdezeeuw added the Heph Related to the Heph crate. label Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Heph Related to the Heph crate.
Projects
Status: No status
Development

No branches or pull requests

1 participant