Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion library/core/src/mem/maybe_dangling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ use crate::{mem, ptr};
///
/// To fix this we could use `MaybeDangling`:
///
/// ```rust
// FIXME: remove `no_run` once the semantics are actually implemented
/// ```rust,no_run
/// #![feature(maybe_dangling, box_as_ptr)]
/// # use std::alloc::{dealloc, Layout};
/// # use std::mem::{self, MaybeDangling};
Expand Down
6 changes: 2 additions & 4 deletions src/bootstrap/mk/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,15 @@ check-aux:
# Run standard library tests in Miri.
$(Q)MIRIFLAGS="-Zmiri-strict-provenance" \
$(BOOTSTRAP) miri --stage 2 \
library/coretests \
library/alloctests \
library/core \
Copy link
Member Author

Choose a reason for hiding this comment

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

This is wired up to run the tests from the separate crates, right?

Copy link
Member

Choose a reason for hiding this comment

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

I don't think that is implemented for ./x.py miri. ./x.py test has this code:

// The core and alloc crates can't directly be tested. We
// could silently ignore them, but adding their own test
// crates is less confusing for users. We still keep core and
// alloc themself for doctests
if crates.iter().any(|crate_| crate_ == "core") {
crates.push("coretests".to_owned());
}
if crates.iter().any(|crate_| crate_ == "alloc") {
crates.push("alloctests".to_owned());
}
But ./x.py miri doesn't.

Copy link
Member Author

Choose a reason for hiding this comment

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

That code also runs for ./x miri though?

Copy link
Member Author

Choose a reason for hiding this comment

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

I tried ./x miri library/core -- mem and it said

     Running tests/lib.rs (build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/debug/deps/coretests-d8eae4d2db388c62)

running 71 tests
.......................................................................

test result: ok. 71 passed; 0 failed; 0 ignored; 0 measured; 2201 filtered out; finished in 24.46s

     Running benches/lib.rs (build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/debug/deps/corebenches-41b71a0680fbdcd6)

running 0 tests


test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 29.49ms

   Doc-tests core

running 113 tests
........................................................................................  88/113
.........................

test result: ok. 113 passed; 0 failed; 0 ignored; 0 measured; 5467 filtered out; finished in 2.43s

all doctests ran in 2.50s; merged doctests compilation took 0.04s
   Doc-tests coretests

running 0 tests


test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 12.47µs

	finished in 55.808 seconds

That looks good to me?

Copy link
Member

Choose a reason for hiding this comment

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

Indeed. I was looking at build_steps::test::Miri, which is for ./x.py test src/tools/miri, not ./x.py miri.

library/alloc \
$(BOOTSTRAP_ARGS) \
--no-doc
# Some doctests use file system operations to demonstrate dealing with `Result`,
# so we have to run them with isolation disabled.
$(Q)MIRIFLAGS="-Zmiri-disable-isolation" \
$(BOOTSTRAP) miri --stage 2 \
library/coretests \
library/alloctests \
library/core \
library/alloc \
$(BOOTSTRAP_ARGS) \
--doc
Expand Down
Loading