Skip to content

Apple platforms CI issues#3519

Merged
rnro merged 2 commits intoapple:mainfrom
rnro:apple_platforms_ci_issues
Feb 26, 2026
Merged

Apple platforms CI issues#3519
rnro merged 2 commits intoapple:mainfrom
rnro:apple_platforms_ci_issues

Conversation

@rnro
Copy link
Copy Markdown
Contributor

@rnro rnro commented Feb 24, 2026

Apple platform simulator CI failures

Motivation

  • Several tests failed when testing against simulators for Apple
    platforms (iOS, tvOS, watchOS, visionOS)

Modifications

  • Added @available(macOS 13, iOS 16, tvOS 16, watchOS 9, *) to each
    @Test method in NIOThreadPoolTest, EventLoopFutureTest, and
    NIOTransportAccessibleChannelCoreTests to match the availability of
    the APIs they use (timeLimit and withUnsafeTransportIfAvailable).
  • Removed .timeLimit(.minutes(1)) from the @Suite declarations on
    NIOThreadPoolTest and EventLoopFutureTest - the @Suite macro
    cannot be used with @available, so timeLimit cannot be used.
  • Skip testHomeDirectoryFromPasswd on simulator targets via
    #if targetEnvironment(simulator) / XCTSkip, since simulators retu>
    success but nil information when invoking getpwuid_r.

Result

  • Apple simulator platform builds and test runs no longer fail due to
    these issues. Some infrastructure issues remain to be resolved
    separately.

@rnro rnro force-pushed the apple_platforms_ci_issues branch 3 times, most recently from cefa86d to d1b1456 Compare February 24, 2026 16:35
Motivation

* Several tests failed when testing against simulators for Apple
  platforms (iOS, tvOS, watchOS, visionOS)

Modifications

* Added `@available(macOS 13, iOS 16, tvOS 16, watchOS 9, *)` to each
`@Test` method in `NIOThreadPoolTest`, `EventLoopFutureTest`, and
`NIOTransportAccessibleChannelCoreTests` to match the availability of
the APIs they use (`timeLimit` and `withUnsafeTransportIfAvailable`).
* Removed `.timeLimit(.minutes(1))` from the `@Suite` declarations on
`NIOThreadPoolTest` and `EventLoopFutureTest` - the `@Suite` macro
cannot be used with `@available`, so `timeLimit` cannot be used.
* Skip `testHomeDirectoryFromPasswd` on simulator targets via
`#if targetEnvironment(simulator)` / `XCTSkip`, since simulators return
success but nil information when invoking `getpwuid_r`.

Result

* Apple simulator platform builds and test runs no longer fail due to
these issues. Some infrastructure issues remain to be resolved
separately.
@rnro rnro force-pushed the apple_platforms_ci_issues branch from d1b1456 to 39dc209 Compare February 24, 2026 16:36
@rnro rnro changed the title Apple platforms ci issues Apple platforms CI issues Feb 24, 2026
@rnro rnro added the semver/none No version bump required. label Feb 24, 2026
@rnro rnro marked this pull request as ready for review February 24, 2026 16:46
@rnro rnro enabled auto-merge (squash) February 26, 2026 09:27
#if targetEnvironment(simulator)
// Simulators don't have a passwd database entry for the current user.
throw XCTSkip("getpwuid_r has no passwd entry in simulator environments")
#else
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: This can just be #endif

Suggested change
#else
#endif

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it can be, if it was then we got a warning that there was code after the throw which would never be reached

case .failure(let errno):
XCTFail("Expected success, got error: \(errno)")
}
#endif
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: We don't need this (but only if we take the other nit suggestion)

Suggested change
#endif

}

@Suite("EventLoopFutureTest", .serialized, .timeLimit(.minutes(1)))
@Suite("EventLoopFutureTest", .serialized)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, one thing this did was mean that we had an early failure rather than waiting for the GitHub job-level timeout to tell us we caused an issue here. Do we just have to sacrifice that feature of the tests?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so, unless you know of a smart way to add it back. That feature has availability requirements and you can't combine availability requirements with @Suite macros.

@rnro rnro merged commit abe12cf into apple:main Feb 26, 2026
55 checks passed
@rnro rnro deleted the apple_platforms_ci_issues branch February 26, 2026 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver/none No version bump required.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants