Commit Graph

6844 Commits

Author SHA1 Message Date
bors
d6b750e48d Auto merge of #2467 - RalfJung:home, r=RalfJung
add support for env::home_dir

and a bit of cleanup
2022-08-06 13:04:19 +00:00
Ralf Jung
889c073aa6 really, clippy?!? 2022-08-06 09:03:33 -04:00
Ralf Jung
d61e55a1d4 add support for env::home_dir
and a bit of cleanup
2022-08-06 08:29:00 -04:00
bors
42087647d6 Auto merge of #2466 - RalfJung:longsleep, r=RalfJung
fix an ICE in nanosleep()
2022-08-06 00:52:42 +00:00
Ralf Jung
d7875ea530 fix an ICE in nanosleep() 2022-08-05 20:44:54 -04:00
bors
74c5f1b468 Auto merge of #2465 - RalfJung:strerror_r, r=RalfJung
avoid strerror_r failure on unknown errnum

This is an informative function anyway, so as fallback just return a string with the raw errnum. Avoids panics / interpreter aborts in std on unknown errnum in from_raw_os_error.
2022-08-06 00:19:08 +00:00
Ralf Jung
6d14a5e2a7 avoid strerror_r failure on unknown errnum 2022-08-05 20:18:37 -04:00
bors
1a87926a31 Auto merge of #2460 - LegNeato:sysconf, r=RalfJung
Add additional raw error mappings for the nightly `io_error_more` feature

Some crates are using nightly and failing when mapping these errors,
for example <https://miri.saethlin.dev/?crate=remove_dir_all&version=0.7.0>:

```
error: unsupported operation: io error NotADirectory cannot be translated into a raw os error
    --> /root/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/sys/unix/fs.rs:1203:19
```
2022-08-03 15:56:13 +00:00
Ralf Jung
e1e1f42f39 make errno table syntactically more similar to rustc library code 2022-08-03 11:51:39 -04:00
Christian Legnitto
9154f8b22c Add additional raw error mappings for the nightly io_error_more feature
Some crates are using nightly and failing when mapping these errors,
for example <https://miri.saethlin.dev/?crate=remove_dir_all&version=0.7.0>:

```
error: unsupported operation: io error NotADirectory cannot be translated into a raw os error
    --> /root/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/sys/unix/fs.rs:1203:19
```
2022-08-03 11:23:15 -04:00
bors
730a799bf4 Auto merge of #2459 - RalfJung:cargo-miri-split, r=RalfJung
split cargo-miri into multiple files

also greatly extend the 'who calls who' comment
2022-08-03 15:02:34 +00:00
Ralf Jung
29e9a8aa1a split cargo-miri into multiple files
also greatly extend the 'who calls who' comment
2022-08-02 22:01:03 -04:00
bors
c24c638884 Auto merge of #2346 - LegNeato:mkstemp, r=RalfJung
Add `mkstemp` shim for unix
2022-08-03 01:59:38 +00:00
Christian Legnitto
b29e7b8e4e Add mkstemp shim for unix
Co-authored-by: Ralf Jung <post@ralfj.de>
2022-08-02 19:56:05 -04:00
bors
9f4612a29e Auto merge of #2457 - RalfJung:realpath, r=RalfJung
Add shim for realpath on unix

Salvaged from https://github.com/rust-lang/miri/pull/2294 by `@LegNeato`
2022-08-02 23:00:32 +00:00
bors
25df001714 Auto merge of #2458 - RalfJung:less-space, r=RalfJung
avoid double-space in test logging
2022-08-02 22:31:51 +00:00
Ralf Jung
87b9075920 avoid double-space in test logging 2022-08-02 18:27:06 -04:00
Ralf Jung
8356f4cc23 output realpath as a path, and remove a bogus test 2022-08-02 18:08:43 -04:00
Christian Legnitto
b43bede938 Add shim for realpath on unix 2022-08-02 17:27:11 -04:00
bors
7865255b86 Auto merge of #2453 - RalfJung:rustup, r=RalfJung
rustup

Should work again, now that https://github.com/rust-lang/rust/pull/99984 landed.
2022-08-01 13:28:17 +00:00
Ralf Jung
9ffea913b8 clippy 2022-08-01 09:27:56 -04:00
Ralf Jung
f6badf037e rustup 2022-08-01 09:27:34 -04:00
bors
8aab6bb164 Auto merge of #2452 - Hiroki6:eval-rs-comments-typo, r=RalfJung
Fix typo in eval.rs

I just found some typos while reading the code
2022-07-31 16:04:51 +00:00
Hiroki6
66f6fa68fa Fix typo in eval.rs 2022-07-31 16:15:11 +02:00
bors
44dc49febe Auto merge of #2450 - avrong:cargo-metadata, r=oli-obk
Use cargo_metadata in cargo-miri

Closes #2393

Added `cargo_metadata` to `cargo-miri` and changed metadata from manual parsing to `cargo_metadata` invocations. Thus, removed local `Metadata` struct too.

Happy to fix if anything isn't right :)
2022-07-29 12:51:14 +00:00
Aleksei Trifonov
01a6109925 Fix formatting 2022-07-29 14:42:42 +03:00
Aleksei Trifonov
38e7bcf7f1 Use cargo_metadata in cargo-miri 2022-07-29 05:25:59 +03:00
bors
a719c05816 Auto merge of #2426 - saethlin:unix-exec, r=RalfJung
Use real exec on cfg(unix) targets

Closes https://github.com/rust-lang/miri/issues/2421

The standard library has a platform extension trait that lets us get the behavior we want on cfg(unix), so why not use it?

I tried this out and it produces the correct behavior in concert with nextest.
2022-07-28 22:05:42 +00:00
Ben Kimock
622613f957 Use real exec on cfg(unix) targets
When cargo-miri is executed as a cargo test runner or rustdoc runtool,
external tools expect what they launch as the runner/runtool to be the
process actually running the test. But in the implementation, we launch
the Miri interpreter as a subprocess using std::process::Command. This
tends to confuse other tools (like nextest) and users (like the author).
What we really want is to call POSIX exec so that the cargo-miri process
becomes the interpreter.

So this implements just that; we call execve via a cfg(unix) extension
trait. Windows has no such mechanism, but it also doesn't have POSIX
signals, which is the primary tripping hazard this change fixes.
2022-07-26 23:34:20 -04:00
bors
530abacbf7 Auto merge of #2447 - RalfJung:rustup, r=RalfJung
rustup
2022-07-27 00:39:00 +00:00
Ralf Jung
dd3b8e8b1b rustup 2022-07-26 20:38:25 -04:00
bors
a62f954eeb Auto merge of #2444 - oli-obk:file_descriptor_defaults, r=RalfJung
Add default impls for `FileDescriptor` methods

I felt like it was just noisy to have to write the "can't do this here" defaults
2022-07-26 23:35:05 +00:00
bors
c0cbddc78a Auto merge of #2446 - RalfJung:rustup, r=RalfJung
add test for dyn call issue

Tests for https://github.com/rust-lang/miri/issues/2432
2022-07-26 02:41:55 +00:00
Ralf Jung
5875c0d220 add test for dyn call issue 2022-07-25 22:41:12 -04:00
Oli Scherer
cd6b723bb6 Add default impls for FileDescriptor methods 2022-07-25 17:57:56 +00:00
bors
b938529fb8 Auto merge of #2438 - RalfJung:more-track-caller, r=RalfJung
adjust for more backtrace pruning

The Miri side of https://github.com/rust-lang/rust/pull/99690. Those messages are much nicer. :) And we also need error-pattern much less.
2022-07-25 14:38:57 +00:00
Ralf Jung
39d8c4de35 rustup 2022-07-25 10:38:22 -04:00
Ralf Jung
b514667c36 adjust for more backtrace pruning 2022-07-25 10:24:19 -04:00
bors
6227e1e3a8 Auto merge of #2422 - RalfJung:integers, r=oli-obk
enable clippy lints against integer casts

Cc https://github.com/rust-lang/miri/issues/1236
2022-07-25 11:46:55 +00:00
bors
3d237be15c Auto merge of #2436 - RalfJung:lib-crates, r=oli-obk
fix build.rs invoking RUSTC to do check builds

This makes the Miri driver, when invokved via the RUSTC env var from inside a build script, behave almost entirely like rustc. I had to redo how we propagate sysroot information for this (which is actually back to how we used to do sysroot propagation many years ago).

Fixes https://github.com/rust-lang/miri/issues/2431
2022-07-25 10:39:02 +00:00
bors
30d1c68206 Auto merge of #2434 - RalfJung:ui-test-locked, r=oli-obk
ui_test: build dependencies in locked mode unless bless is enabled

This should help ensure that tests are reproducible.
2022-07-25 09:32:40 +00:00
bors
a591e9fc5b Auto merge of #2440 - RalfJung:up, r=RalfJung
rustup
2022-07-24 21:56:00 +00:00
Ralf Jung
cbff63a694 rustup 2022-07-24 17:51:39 -04:00
bors
fff47429d9 Auto merge of #2439 - RalfJung:ptr-offset-from-unsigned, r=RalfJung
more tests for ptr_offset_from_unsinged
2022-07-24 19:24:55 +00:00
Ralf Jung
8f3b594d1e more tests for ptr_offset_from_unsinged 2022-07-24 15:23:39 -04:00
Ralf Jung
9406b6da68 fmt 2022-07-24 13:58:14 -04:00
Ralf Jung
0b1d5a4957 test all of the autocfg queries 2022-07-24 13:35:05 -04:00
Ralf Jung
d905901d65 make miri a better RUSTC by default inside cargo-miri
this requires a change in sysroot handling: miri driver now requires
MIRI_SYSROOT to be set when it is in 'target' mode, rather than relying on
`--sysroot` always being present.
2022-07-24 13:30:32 -04:00
bors
a5f0a9b7ed Auto merge of #2435 - RalfJung:rustup, r=RalfJung
Rustup
2022-07-24 13:26:38 +00:00
Ralf Jung
3ee56989c7 get rid of some uses of core_intrinsics 2022-07-24 09:26:11 -04:00