Skip to content

Commit

Permalink
turns out Solarish targets support our entire test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Jan 12, 2025
1 parent 6853c9f commit 3935790
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ degree documented below):
- For every other target with OS `linux`, `macos`, or `windows`, Miri should generally work, but we
make no promises and we don't run tests for such targets.
- We have unofficial support (not maintained by the Miri team itself) for some further operating systems.
- `solaris` / `illumos`: maintained by @devnexen. Supports `std::{env, thread, sync}`, but not `std::fs`.
- `solaris` / `illumos`: maintained by @devnexen. Supports the entire test suite.
- `freebsd`: maintained by @YohDeadfall. Supports `std::env` and parts of `std::{thread, fs}`, but not `std::sync`.
- `android`: **maintainer wanted**. Support very incomplete, but a basic "hello world" works.
- `wasi`: **maintainer wanted**. Support very incomplete, not even standard output works, but an empty `main` function works.
Expand Down
5 changes: 3 additions & 2 deletions ci/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,14 @@ case $HOST_TARGET in
# Extra tier 2
TEST_TARGET=arm-unknown-linux-gnueabi run_tests
TEST_TARGET=s390x-unknown-linux-gnu run_tests # big-endian architecture of choice
# Not officially supported tier 2
TEST_TARGET=x86_64-unknown-illumos run_tests
TEST_TARGET=x86_64-pc-solaris run_tests
# Partially supported targets (tier 2)
BASIC="empty_main integer heap_alloc libc-mem vec string btreemap" # ensures we have the basics: pre-main code, system allocator
UNIX="hello panic/panic panic/unwind concurrency/simple atomic libc-mem libc-misc libc-random env num_cpus" # the things that are very similar across all Unixes, and hence easily supported there
TEST_TARGET=x86_64-unknown-freebsd run_tests_minimal $BASIC $UNIX time hashmap random threadname pthread fs libc-pipe
TEST_TARGET=i686-unknown-freebsd run_tests_minimal $BASIC $UNIX time hashmap random threadname pthread fs libc-pipe
TEST_TARGET=x86_64-unknown-illumos run_tests_minimal $BASIC $UNIX time hashmap random thread sync available-parallelism tls libc-pipe fs
TEST_TARGET=x86_64-pc-solaris run_tests_minimal $BASIC $UNIX time hashmap random thread sync available-parallelism tls libc-pipe fs
TEST_TARGET=aarch64-linux-android run_tests_minimal $BASIC $UNIX time hashmap random sync threadname pthread epoll eventfd
TEST_TARGET=wasm32-wasip2 run_tests_minimal $BASIC wasm
TEST_TARGET=wasm32-unknown-unknown run_tests_minimal no_std empty_main wasm # this target doesn't really have std
Expand Down
8 changes: 8 additions & 0 deletions src/shims/unix/solarish/foreign_items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,14 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
this.write_scalar(result, dest)?;
}

// Sockets and pipes
"__xnet_socketpair" => {
let [domain, type_, protocol, sv] =
this.check_shim(abi, Conv::C, link_name, args)?;
let result = this.socketpair(domain, type_, protocol, sv)?;
this.write_scalar(result, dest)?;
}

// Miscellaneous
"___errno" => {
let [] = this.check_shim(abi, Conv::C, link_name, args)?;
Expand Down
3 changes: 1 addition & 2 deletions tests/fail-dep/libc/affinity.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//@ignore-target: windows # only very limited libc on Windows
//@ignore-target: apple # `sched_setaffinity` is not supported on macOS
//@only-target: linux # these are Linux-specific APIs
//@compile-flags: -Zmiri-disable-isolation -Zmiri-num-cpus=4

fn main() {
Expand Down
5 changes: 2 additions & 3 deletions tests/fail-dep/libc/memrchr_null.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
//@ignore-target: windows # No `memrchr` on Windows
//@ignore-target: apple # No `memrchr` on some apple targets
//@only-target: linux # `memrchr` is a GNU extension

use std::ptr;

// null is explicitly called out as UB in the C docs.
// null is explicitly called out as UB in the C docs for `memchr`.
fn main() {
unsafe {
libc::memrchr(ptr::null(), 0, 0); //~ERROR: null pointer
Expand Down
3 changes: 1 addition & 2 deletions tests/pass-dep/libc/libc-affinity.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//@ignore-target: windows # only very limited libc on Windows
//@ignore-target: apple # `sched_{g, s}etaffinity` are not supported on macOS
//@only-target: linux # these are Linux-specific APIs
//@compile-flags: -Zmiri-disable-isolation -Zmiri-num-cpus=4
#![feature(io_error_more)]
#![feature(pointer_is_aligned_to)]
Expand Down

0 comments on commit 3935790

Please sign in to comment.