Commit Graph

254068 Commits

Author SHA1 Message Date
bors
7eda989cc9 Auto merge of #3557 - RalfJung:getaffinity, r=RalfJung
Move sched_getaffinity back to Linux

This reverts commit c1a3f8576ea12b0bed68ad3dedf4069ca3d9816f. The shim isn't actually useful for anything, and it is untested on FreeBSD. On Linux it exists solely because std and num_cpus are trying this before falling back to `sysconf`, but on FreeBSD that's not how they work, so there's no reason I can see to have this stub shim on FreeBSD.
2024-05-04 17:11:02 +00:00
bors
c3f270174c Auto merge of #3560 - RalfJung:sync-check-id, r=RalfJung
sync: better error in invalid synchronization primitive ID

`@devnexen` this should fix the ICE in your PR (but it won't fix the code, it will just report proper UB instead).
2024-05-04 16:30:38 +00:00
Ralf Jung
9503c41ecc also test pthread_condattr_getclock 2024-05-04 18:28:37 +02:00
Ralf Jung
86d7dff0b8 factor some pthread offset into constants 2024-05-04 18:08:41 +02:00
Ralf Jung
98bb8acb5b sync: better error in invalid synchronization primitive ID 2024-05-04 17:52:50 +02:00
bors
37537d1485 Auto merge of #3559 - RalfJung:weak-extern-static, r=RalfJung
add helper function to declare an extern static for a weak symbol

and use it to make `statx` a regular function and get rid of the syscall
2024-05-04 13:22:53 +00:00
Ralf Jung
19aa8a021d make statx a regular function (so we don't need to support the syscall) 2024-05-04 15:21:08 +02:00
Ralf Jung
823e31d9fa add helper function to declare an extern static for a weak symbol 2024-05-04 14:42:58 +02:00
bors
3a6faee1e2 Auto merge of #3554 - RalfJung:freebsd, r=RalfJung
document unofficially supported OSes

Also tweak the freeBSD testing a bit.
2024-05-04 12:33:22 +00:00
bors
fd15dc391b Auto merge of #3558 - RalfJung:unsupported, r=RalfJung
update 'unsupported' message

Instead of "the interpreter", just say Miri.

Also be a more more clear about what is expected to be supported and what not (Cc https://github.com/rust-lang/miri/issues/2325).
2024-05-04 12:07:24 +00:00
Ralf Jung
05e7850d7a make some tests not need output (so they work on wasm) 2024-05-04 14:07:17 +02:00
Ralf Jung
38598e68c5 document unofficially supported OSes 2024-05-04 14:07:17 +02:00
Ralf Jung
6df585ade5 freebsd: test std threadname and fs APIs
also reorder foreign_items to fix the grouping, and reorder the tests_minimal invocations to be more consistent
2024-05-04 14:07:17 +02:00
Ralf Jung
8b4b259da2 update 'unsupported' message 2024-05-04 13:45:54 +02:00
Ralf Jung
e1c3d67d21 Revert "moving out sched_getaffinity interception from linux'shim, FreeBSD supporting it too."
This reverts commit c1a3f8576ea12b0bed68ad3dedf4069ca3d9816f.
2024-05-04 13:36:39 +02:00
bors
49cd705189 Auto merge of #3552 - RalfJung:ci, r=RalfJung
even out CI runner times
2024-05-04 11:18:42 +00:00
bors
9d4eea1369 Auto merge of #3556 - RalfJung:intrinsics, r=RalfJung
move intrinsics tests into dedicated folder

And separate them from "shims" (which are for extern functions we link against).
2024-05-04 10:48:35 +00:00
Ralf Jung
52bf84f3cf move some minimal targets over to the macOS runner, to even out CI times 2024-05-04 12:43:48 +02:00
Ralf Jung
a4355bbbb1 fix grouping of target-specific LLVM shims 2024-05-04 12:39:37 +02:00
Ralf Jung
3046dbe7de move intrinsics implementations and tests into dedicated folder
and make them separate from 'shims'
2024-05-04 12:34:42 +02:00
Ralf Jung
57ff16bb5f rename integer test 2024-05-04 12:30:52 +02:00
Ralf Jung
be874a468b move available-parallelism tests into shims/ folder 2024-05-04 12:01:18 +02:00
bors
7b57f122b9 Auto merge of #3533 - Luv-Ray:file-descriptors-to-refcount-references, r=RalfJung
Make file descriptors into refcount references

fixes #3525

Remove `fn dup` in `trait FileDescription`, define `struct FileDescriptor(Rc<RefCell<dyn FileDescription>>)`, and use `BTreeMap<i32, FileDescriptor>` in `FdTable`.

---

There are some refactors similar to the following form:
```rust
{  // origin:
    if let Some(file_descriptor) = this.machine.fds.get_mut(fd) {
        // write file_descriptor
        this.try_unwrap_io_result(result)
    } else {
        this.fd_not_found()
    }
}
{  // now:
    let Some(mut file_descriptor) = this.machine.fds.get_mut(fd) else {
        return this.fd_not_found();
    };
    // write file_descriptor
    drop(file_descriptor);
    this.try_unwrap_io_result(result)
}
```
The origin form can't compile because as using `RefCell` to get interior mutability, `fn get_mut` return `Option<std::cell::RefMut<'_, dyn FileDescription>>` instead of `Option<&mut dyn FileDescription>` now, and the `deref_mut` on `file_descriptor: RefMut` will cause borrow `this` as mutable more than once at a time.
So this form of refactors and manual drops are are implemented to avoid borrowing `this` at the same time.
2024-05-04 09:52:39 +00:00
Ralf Jung
502ed4965f show time taken in run_tests_minimal 2024-05-04 11:46:52 +02:00
Ralf Jung
d130eaac1f speed up Windows runner: don't run GC_STRESS test 2024-05-04 11:46:52 +02:00
Luv-Ray
459c6ce944 Make file descriptors into refcount references
take ownership of self and return `io::Result<()>` in `FileDescription::close`

Co-authored-by: Ralf Jung <post@ralfj.de>
2024-05-04 17:24:18 +08:00
bors
705d48cff9 Auto merge of #3551 - RalfJung:getentropy, r=RalfJung
macos: use getentropy from libc

This has been added in the mean time.
2024-05-04 09:20:04 +00:00
Ralf Jung
07a517a6ba macos: use getentropy from libc 2024-05-04 10:52:25 +02:00
bors
82456b4ce3 Auto merge of #3550 - RalfJung:unix-tls, r=RalfJung
tls dtors: treat all unixes uniformly
2024-05-04 08:50:21 +00:00
Ralf Jung
6559342058 tls dtors: treat all unixes uniformly 2024-05-04 10:45:54 +02:00
bors
38715f714f Auto merge of #3548 - RalfJung:many-seeds, r=RalfJung
make many-seeds a mode of ./miri run rather than a separate command

Also parallelize it so we use all cores to try seeds at the same time.

Fixes https://github.com/rust-lang/miri/issues/3509 by not alternating between different build modes (with/without dev-dependencies) all the time.
2024-05-04 07:04:10 +00:00
Ralf Jung
f7a3aa9811 remove a hack that is no longer needed 2024-05-04 09:02:51 +02:00
Ralf Jung
6ce00aa992 make many-seeds a mode of ./miri run rather than a separate command 2024-05-04 08:23:05 +02:00
bors
74701dcef2 Auto merge of #3547 - RalfJung:ci, r=RalfJung
CI: no need to surround if: condition in expansion braces

That seems to be implicit for `if:` (but interestingly, redundant braces are tolerated).
2024-05-03 20:57:06 +00:00
Ralf Jung
aa71f9b033 CI: no need to surround if: condition in expansion braces 2024-05-03 21:45:03 +02:00
bors
692b769d61 Auto merge of #3545 - RalfJung:miri-run, r=RalfJung
./miri run: support -v flag to print what it is doing
2024-05-03 18:50:28 +00:00
Ralf Jung
eaf30cee7e ./miri run: support -v flag to print what it is doing 2024-05-03 20:31:27 +02:00
bors
dcf956c365 Auto merge of #3544 - RalfJung:rustup, r=RalfJung
Preparing for merge from rustc

Unblocks https://github.com/rust-lang/miri/pull/3526.
2024-05-03 18:18:27 +00:00
Ralf Jung
0de07d80ff Preparing for merge from rustc 2024-05-03 19:52:08 +02:00
bors
8a31014b9f Auto merge of #3542 - RalfJung:clippy-win, r=RalfJung
run clippy on a Windows host

Fixes https://github.com/rust-lang/miri/issues/3324
2024-05-03 17:45:09 +00:00
Ralf Jung
03589bfe98 run clippy on a Windows host 2024-05-03 19:36:33 +02:00
bors
5ce8532c26 Auto merge of #3537 - rust-lang:rustup-2024-05-03, r=RalfJung
Automatic Rustup
2024-05-03 06:34:17 +00:00
Ralf Jung
4af1ba0204 update lockfile 2024-05-03 08:10:16 +02:00
bors
3c6d194186 Auto merge of #3536 - tiif:add_rustbot_feat, r=RalfJung
Add rustbot claim feature

Add rustbot ``claim``, ``release-assignment`` and ``assign-user`` as mentioned in #3528.

rustbot issue assignment documentation: https://forge.rust-lang.org/triagebot/issue-assignment.html
pr trigger option documentation: https://forge.rust-lang.org/triagebot/pr-assignment.html#additional-new-pr-trigger-options
2024-05-03 06:02:10 +00:00
Ralf Jung
b348e41861
update comments and URL 2024-05-03 08:00:24 +02:00
The Miri Cronjob Bot
3e2164fef2 Merge from rustc 2024-05-03 05:03:41 +00:00
Urgau
f43e3e2023 Fix ignored tests for formatting 2024-05-04 12:37:30 +02:00
bors
d6d3b342e8 Auto merge of #124660 - matthiaskrgr:rollup-j8bfzfn, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #124461 (handle the targets that are missing in stage0)
 - #124492 (Generalize `adjust_from_tcx` for `Allocation`)
 - #124588 (Use `ObligationCtxt` in favor of `TraitEngine` in many more places)
 - #124612 (Add support for inputing via stdin with run-make-support)
 - #124613 (Allow fmt to run on rmake.rs test files)
 - #124649 (Fix HorizonOS build broken by #124210)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-05-03 15:37:22 +00:00
Matthias Krüger
a7f4a2edc6
Rollup merge of #124649 - Meziu:master, r=ChrisDenton
Fix HorizonOS build broken by #124210

HorizonOS (for the Tier-3 target `armv6k-nintendo-3ds`) does not support `dirfd()`, as many other similar targets.
2024-05-03 15:26:11 +02:00
Matthias Krüger
82030f2dd4
Rollup merge of #124613 - GuillaumeGomez:fmt-run-make, r=onur-ozkan
Allow fmt to run on rmake.rs test files

As discussed with `@jieyouxu,` `rmake.rs` from the `run-make` testsuite would benefit from being formatted as well.

Only thing needed to be done for it to work: allow support for `!` in our `rustfmt.toml` file parsing.

r? `@onur-ozkan`
2024-05-03 15:26:11 +02:00