Skip to content

Commit 7d1b76d

Browse files
authored
testSimpleMPTCP should not fail for ENOPROTOOPT (#2725)
Motivation: MPTCP implementations are permitted to return `ENOPROTOOPT` if MPTCP has been disabled. This should not report as a test failure. Modifications: Instead of failing the test, log the permitted error and return. Result: No more misleading testSimpleMPTCP test failures
1 parent 196ceab commit 7d1b76d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Tests/NIOPosixTests/SocketChannelTest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,7 @@ public final class SocketChannelTest : XCTestCase {
922922
.wait()
923923
} catch let error as IOError {
924924
// Older Linux kernel versions don't support MPTCP, which is fine.
925-
if error.errnoCode != EINVAL && error.errnoCode != EPROTONOSUPPORT {
925+
if error.errnoCode != EINVAL && error.errnoCode != EPROTONOSUPPORT && error.errnoCode != ENOPROTOOPT {
926926
XCTFail("Unexpected error: \(error)")
927927
}
928928
return

0 commit comments

Comments
 (0)