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

disabling tests incompatible with miri #2288

Closed
wants to merge 1 commit into from

Conversation

devnexen
Copy link
Contributor

No description provided.

@devnexen devnexen force-pushed the fix_miri branch 2 times, most recently from 93b5025 to 75a40aa Compare January 14, 2024 15:26
@devnexen devnexen marked this pull request as ready for review January 14, 2024 15:29
Copy link
Member

@asomers asomers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Frankly, I'm surprised that anything in this crate works with Miri. How are you invoking it, any way?

@@ -0,0 +1 @@
Disabled unit tests incompatible with Miri.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two problems with the changelog message:

  • Integration tests are affected as well as unit tests.
  • You disabled the tests conditionally, not unconditionally.
Suggested change
Disabled unit tests incompatible with Miri.
Fix running tests with Miri.

You should make a similar change to the commit message, too.

@SteveLauC
Copy link
Member

SteveLauC commented Jan 15, 2024

How are you invoking it, any way?

I am also interested in how you test Nix with miri, I tried cargo +nightly miri test --all-features against your branch on my host, but I still got errors:

$ cargo +nightly miri test --all-features
...
test test_fcntl::test_posix_fadvise::test_success ... error: unsupported operation: `open` not available when isolation is enabled
    --> /home/steve/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/fs.rs:1133:36
     |
1133 |         let fd = cvt_r(|| unsafe { open64(path.as_ptr(), flags, opts.mode as c_int) })?;
     |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `open` not available when isolation is enabled
...

And, what is the advantage of doing so if we don't add Miri to our CI?

@devnexen
Copy link
Contributor Author

How are you invoking it, any way?

I am also interested in how you test Nix with miri, I tried cargo +nightly miri test --all-features against your branch on my host, but I still got errors:

$ cargo +nightly miri test --all-features
...
test test_fcntl::test_posix_fadvise::test_success ... error: unsupported operation: `open` not available when isolation is enabled
    --> /home/steve/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/fs.rs:1133:36
     |
1133 |         let fd = cvt_r(|| unsafe { open64(path.as_ptr(), flags, opts.mode as c_int) })?;
     |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `open` not available when isolation is enabled
...

And, what is the advantage of doing so if we don't add Miri to our CI?

Try with the following MIRIFLAGS="-Zmiri-disable-isolation -Zmiri-permissive-provenance"

@asomers
Copy link
Member

asomers commented Jan 31, 2024

I'm inclined not to merge this PR. Not because it's wrong, but because I don't think that miri is of much use to a crate like this one, and the changes included in this PR add a lot of line noise. What do you think, @devnexen ?

@devnexen
Copy link
Contributor Author

yes true that s adding a lot of lines and we ll most likely need to care for this with new tests.

@devnexen devnexen closed this Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants