diff options
| author | Ralf Jung <post@ralfj.de> | 2023-11-16 19:32:27 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2023-11-16 21:32:04 +0100 |
| commit | 6985431923ccd3111cc16680db441c55f9aaf6b4 (patch) | |
| tree | a7e1b34e209fce44b83cc04f0244272c5250bc61 | |
| parent | 7338c55052edd113a1933228167ffcda7ed3bb1b (diff) | |
| download | rust-6985431923ccd3111cc16680db441c55f9aaf6b4.tar.gz rust-6985431923ccd3111cc16680db441c55f9aaf6b4.zip | |
make libc-misc pass under FreeBSD
| -rwxr-xr-x | src/tools/miri/ci.sh | 2 | ||||
| -rw-r--r-- | src/tools/miri/tests/pass-dep/shims/libc-misc.rs | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/tools/miri/ci.sh b/src/tools/miri/ci.sh index 5f55f1af73f..2bb151c3464 100755 --- a/src/tools/miri/ci.sh +++ b/src/tools/miri/ci.sh @@ -108,7 +108,7 @@ case $HOST_TARGET in MIRI_TEST_TARGET=aarch64-unknown-linux-gnu run_tests MIRI_TEST_TARGET=aarch64-apple-darwin run_tests MIRI_TEST_TARGET=i686-pc-windows-gnu run_tests - MIRI_TEST_TARGET=x86_64-unknown-freebsd run_tests_minimal hello integer vec panic/panic concurrency/simple pthreads-threadname libc-getentropy libc-getrandom libc-reallocarray atomic env/var + MIRI_TEST_TARGET=x86_64-unknown-freebsd run_tests_minimal hello integer vec panic/panic concurrency/simple pthreads-threadname libc-getentropy libc-getrandom libc-reallocarray libc-misc atomic env/var MIRI_TEST_TARGET=aarch64-linux-android run_tests_minimal hello integer vec panic/panic MIRI_TEST_TARGET=wasm32-wasi run_tests_minimal no_std integer strings wasm MIRI_TEST_TARGET=wasm32-unknown-unknown run_tests_minimal no_std integer strings wasm diff --git a/src/tools/miri/tests/pass-dep/shims/libc-misc.rs b/src/tools/miri/tests/pass-dep/shims/libc-misc.rs index 40d3fa19e53..0374158ea56 100644 --- a/src/tools/miri/tests/pass-dep/shims/libc-misc.rs +++ b/src/tools/miri/tests/pass-dep/shims/libc-misc.rs @@ -172,6 +172,7 @@ fn test_thread_local_errno() { } /// Tests whether clock support exists at all +#[cfg(not(target_os = "freebsd"))] fn test_clocks() { let mut tp = std::mem::MaybeUninit::<libc::timespec>::uninit(); let is_error = unsafe { libc::clock_gettime(libc::CLOCK_REALTIME, tp.as_mut_ptr()) }; @@ -237,6 +238,7 @@ fn test_isatty() { } } +#[cfg(not(target_os = "freebsd"))] fn test_posix_mkstemp() { use std::ffi::CString; use std::ffi::OsStr; @@ -390,6 +392,8 @@ fn test_dlsym() { fn main() { test_posix_gettimeofday(); + + #[cfg(not(target_os = "freebsd"))] // FIXME we should support this on FreeBSD as well test_posix_mkstemp(); test_posix_realpath_alloc(); @@ -399,7 +403,10 @@ fn main() { test_thread_local_errno(); test_isatty(); + + #[cfg(not(target_os = "freebsd"))] // FIXME we should support this on FreeBSD as well test_clocks(); + test_dlsym(); test_memcpy(); |
