swift
b3d3179b - [Distributed] Make executeDistributedTarget tests host-OS independent

Commit
3 hours ago
[Distributed] Make executeDistributedTarget tests host-OS independent The crossSystem test picked the expected error code with `#available(SwiftStdlib 6.5, *)`, but runtime tests are compiled with `%target-future-triple` so that check is constant-folded to true and cannot mirror the real host-OS check inside libswiftDistributed (`#available(anyAppleOS 27.5, *)` in the `@export(implementation)` validation helpers). On hosts below 27.5 the runtime throws `.typeDeserializationFailure` while the test expected `.incompatibleInvocationDecoder`. Accept both codes; which one is thrown depends on the host OS and both are correct answers. The validation test passed fewer substitutions than the target's key generic parameter count. Only SwiftStdlib 6.5+ runtimes diagnose a wrong count precisely; older code paths read past the substitutions buffer and can crash on garbage metadata (seen as a flaky abort on the appletvsimulator CI leg). Pass a correct count with a non-conforming type instead, which is rejected deterministically on all hosts. Refs rdar://192960742, rdar://192420802.
Author
Parents
Loading