Franz Busch
95ed6aa2a4
Address review comments
2026-10-06 10:21:52 +02:00
Franz Busch
cbf57d4575
[IO_URING] Keep the completion of failed IORing operations
...
When an operation failed, the blocking consume methods dropped its completion and only reported the `Errno`. The caller could not tell which request failed, since the `context` was lost. This breaks any user that matches completions to requests.
This PR makes `blockingConsumeCompletions` pass the completion of a failed operation together with its error. Errors of the ring itself, such as `.timeout`, are still passed without a completion. Additionally, `blockingConsumeCompletion(timeout:)` now returns the completion of a failed operation instead of throwing. It only throws errors of the ring itself.
I also added `Completion.error`, which is `nil` on success and the decoded `Errno` otherwise to make it easy to get to the error of a completion.
Fixes #364
Fixes #395
2026-10-05 20:59:39 +02:00
Jonathan Flat
74a7b6f618
Fix missing done in IORing.blockingConsumeCompletions
2026-09-30 15:59:05 -06:00
Franz Busch
b62bce1bc4
Merge pull request #273 from apple/fb-io-uring-poll-add
...
[IO_URING] Add support for `pollAdd` operation
2026-09-25 10:52:31 +02:00
Jonathan Flat
1c80f27aef
Remove PollEvents.allEvents and use internal Event enum for testing
2026-09-24 19:37:41 -06:00
Franz Busch
241fedcbbd
Address review feedback
2026-09-22 10:07:05 +02:00
Guillaume Lessard
6a63f086f6
Merge branch 'release/1.7.0' into main
...
# Conflicts:
# Tests/SystemTests/FileOperationsTest.swift
2026-07-29 18:12:22 -07:00
Guillaume Lessard
6e3259aec3
Better explain a skip condition
2026-07-28 16:51:19 -07:00
Guillaume Lessard
d4373e36f6
Clarify .pollNval and add test reading from an invalid descriptor
2026-07-28 16:46:33 -07:00
Guillaume Lessard
a6d4c153b7
Add test to demonstrate a POLLERR result
2026-07-28 16:46:33 -07:00
Guillaume Lessard
a2ca84e281
Round out PollEvents
2026-07-28 16:46:33 -07:00
Guillaume Lessard
980a71f20c
Add test to show that PollEvents has too few values
2026-07-28 16:46:33 -07:00
Guillaume Lessard
bd49600d62
Prevent tests from hanging in the wrong conditions
2026-07-28 16:46:32 -07:00
Guillaume Lessard
0ecb080d5c
Test ready events in a better way
2026-07-28 16:46:32 -07:00
Guillaume Lessard
bed8e28860
Clean up permissively
2026-07-28 16:46:32 -07:00
Guillaume Lessard
2e81d94142
Add a test similar to the example in the pollAdd doc-comment
2026-07-28 16:46:32 -07:00
Guillaume Lessard
27b4a4a03a
Use XCTSkipIf to guard IORing tests
2026-07-28 16:46:31 -07:00
Guillaume Lessard
e4b352c650
[test] fix spelling error
2026-07-27 16:26:21 -07:00
Franz Busch
ab11b74b39
[IO_URING] Add support for pollAdd operation
...
To observe events on file descriptors IO_URING supports the `pollAdd` operation. This is useful when you want to observe a file descriptor becoming ready to read or write
This PR adds a new `IORing.Request.PollEvents` option set to model the poll masks. Furthermore, it adds a new `static func pollAdd` to the `IORing.Request`.
We can now use IO_URING to poll for events on file descriptors.
2026-07-27 16:26:21 -07:00
Guillaume Lessard
73067f8221
Availability annotation tweaks
2026-07-27 11:57:38 -07:00
Guillaume Lessard
a352b4c224
Improve test timing for Android targets
2026-07-22 11:22:27 -07:00
Guillaume Lessard
cd18a372c0
Implement dup3/pipe2 wrappers and types for Darwin
2026-07-22 11:10:19 -07:00
Guillaume Lessard
a9597cc068
Merge branch 'release/1.7.0' into main
2026-07-21 10:25:33 -07:00
Jonathan Flat
2b266acf85
Don't compare padding/reserved fields for Stat equality
2026-07-17 15:15:09 -06:00
Guillaume Lessard
a6515006f5
Adjust availability macro
2026-07-13 10:56:30 -07:00
Guillaume Lessard
e2ae946862
Merge branch 'release/1.7.0'
2026-07-09 12:55:43 -07:00
Guillaume Lessard
a10991ab88
Fix a test flakiness issue
...
These timestamps are frequently equal on Android, causing spurious failures.
2026-07-09 09:03:39 -07:00
Guillaume Lessard
d3c632e868
Merge branch 'release/1.7.0'
2026-07-07 11:26:07 -07:00
Guillaume Lessard
efc401eb32
Add testing of throwing behaviour
2026-07-06 14:11:32 -07:00
Guillaume Lessard
8771bb6199
Add test of OpenOptions.closeOnExec for Windows
2026-07-06 13:15:48 -07:00
Guillaume Lessard
0b7fc03c76
Add test of OpenOptions.closeOnExec for Windows
2026-07-06 11:44:36 -07:00
Guillaume Lessard
1cfd5105b2
[gardening] remove a forgotten print statement
2026-06-27 11:24:37 -07:00
Guillaume Lessard
e0aa78a944
Test for an implementation bug
2026-06-27 11:24:36 -07:00
Guillaume Lessard
e358151f96
Improve existence/enablement test for io_uring
2026-06-26 17:10:10 -07:00
Jonathan Flat
74bc402c95
Add Android to MemberImportVisibility test probe ( #327 )
2026-06-16 10:00:21 -06:00
Jonathan Flat
0a3460f369
[1.7.0] Fix Stat MemberImportVisibility regression and add test ( #320 )
...
* Fix Stat MemberImportVisibility regression and add test
* Remove Android from the MIV test
2026-06-12 18:21:14 -04:00
Guillaume Lessard
e402d5fa38
Merge pull request #314 from apple/dev/typecast-1.7.x
...
System: remove unnecessary type casting
2026-06-11 13:50:16 -07:00
Saleem Abdulrasool
7e888c0cb4
System: remove unnecessary type casting
...
The compiler now imports these as their canonical type, allowing us to
directly use without the explicit type cast. Due to the floor of Swift
6.3, we must preserve the type cast values. Introduce an overlay to
explicitly cast the values in the older compilers.
2026-06-11 13:37:29 -07:00
Guillaume Lessard
4fdc665a0f
Compile out testAdHocDuplicate2 on Windows
2026-06-09 16:39:56 -07:00
Guillaume Lessard
3e0b318176
Add a test for pipe2
2026-06-09 16:27:18 -07:00
Guillaume Lessard
a2bc5f0625
Add tests specific to dup2 and dup3
2026-06-09 16:27:18 -07:00
Guillaume Lessard
ebbbc31709
Merge pull request #310 from apple/release/1.6.0
2026-06-05 17:37:50 -07:00
David Smith
2cae953181
Fix a crash when work is interleaved between prepare and submit in IORing
2026-06-04 16:05:28 -07:00
Kenta Kubo
043bda4234
Remove unclear helper function
2026-02-04 02:18:24 +09:00
Kenta Kubo
4278ed8d97
Unify assertions of sizeAllocated on all POSIX platforms
2026-02-04 01:55:12 +09:00
Kenta Kubo
91bd99f29a
Fix Darwin tests
2026-01-28 21:24:57 +09:00
Kenta Kubo
7c0af0ded6
Fix FreeBSD build
2026-01-28 00:02:14 +09:00
lee
13851a3421
Fix silent buffer size truncation in Windows pread/pwrite
2026-01-13 13:37:44 -08:00
lee
766415499c
Fix silent buffer size truncation in Windows pread/pwrite
2026-01-07 11:37:16 -03:00
Jonathan Flat
c2e385e849
Remove commented-out code pt. 2
2025-10-29 12:01:13 -06:00