Skip to content

Commit 1aaf0a9

Browse files
authored
Rollup merge of rust-lang#125226 - madsmtm:fix-mac-catalyst-tests, r=workingjubilee
Make more of the test suite run on Mac Catalyst Combined with rust-lang#125225, the only failing parts of the test suite are in `tests/rustdoc-js`, `tests/rustdoc-js-std` and `tests/debuginfo`. Tested with: ```console ./x test --target=aarch64-apple-ios-macabi library/std ./x test --target=aarch64-apple-ios-macabi --skip=tests/rustdoc-js --skip=tests/rustdoc-js-std --skip=tests/debuginfo tests ``` Will probably put up a PR later to enable _running_ on (not just compiling for) Mac Catalyst in CI, though not sure where exactly I should do so? `src/ci/github-actions/jobs.yml`? Note that I've deliberately _not_ enabled stack overflow handlers on iOS/tvOS/watchOS/visionOS (see rust-lang#25872), but rather just skipped those tests, as it uses quite a few APIs that I'd be weary about getting rejected by the App Store (note that Swift doesn't do it on those platforms either). r? ``@workingjubilee`` CC ``@thomcc`` ``@rustbot`` label O-ios O-apple
2 parents 565dce2 + 3170156 commit 1aaf0a9

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

std/src/fs/tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1431,7 +1431,7 @@ fn metadata_access_times() {
14311431
assert_eq!(check!(a.modified()), check!(a.modified()));
14321432
assert_eq!(check!(b.accessed()), check!(b.modified()));
14331433

1434-
if cfg!(target_os = "macos") || cfg!(target_os = "windows") {
1434+
if cfg!(target_vendor = "apple") || cfg!(target_os = "windows") {
14351435
check!(a.created());
14361436
check!(b.created());
14371437
}

std/src/sys/pal/unix/stack_overflow.rs

+8
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,14 @@ mod imp {
491491
}
492492
}
493493

494+
// This is intentionally not enabled on iOS/tvOS/watchOS/visionOS, as it uses
495+
// several symbols that might lead to rejections from the App Store, namely
496+
// `sigaction`, `sigaltstack`, `sysctlbyname`, `mmap`, `munmap` and `mprotect`.
497+
//
498+
// This might be overly cautious, though it is also what Swift does (and they
499+
// usually have fewer qualms about forwards compatibility, since the runtime
500+
// is shipped with the OS):
501+
// <https://github.com/apple/swift/blob/swift-5.10-RELEASE/stdlib/public/runtime/CrashHandlerMacOS.cpp>
494502
#[cfg(not(any(
495503
target_os = "linux",
496504
target_os = "freebsd",

0 commit comments

Comments
 (0)