@@ -2766,6 +2766,33 @@ struct ProtocolTests {
27662766 )
27672767 }
27682768
2769+ static func supervisedOwnerChannelIgnoresRetryableReads( ) throws {
2770+ try expect (
2771+ supervisedOwnerChannelClosed ( readCount: 0 , errnoValue: 0 ) ,
2772+ " EOF on the owner pipe must stop the host "
2773+ )
2774+ try expect (
2775+ supervisedOwnerChannelClosed ( readCount: 1 , errnoValue: 0 ) ,
2776+ " unexpected owner-pipe data must stop the host "
2777+ )
2778+ try expect (
2779+ !supervisedOwnerChannelClosed( readCount: - 1 , errnoValue: EINTR) ,
2780+ " EINTR must not be treated as owner exit "
2781+ )
2782+ try expect (
2783+ !supervisedOwnerChannelClosed( readCount: - 1 , errnoValue: EAGAIN) ,
2784+ " EAGAIN must not be treated as owner exit "
2785+ )
2786+ try expect (
2787+ !supervisedOwnerChannelClosed( readCount: - 1 , errnoValue: EWOULDBLOCK) ,
2788+ " EWOULDBLOCK must not be treated as owner exit "
2789+ )
2790+ try expect (
2791+ supervisedOwnerChannelClosed ( readCount: - 1 , errnoValue: EBADF) ,
2792+ " a broken owner descriptor must stop the host "
2793+ )
2794+ }
2795+
27692796 static func oversizedSocketRequestIsRejected( ) throws {
27702797 try LocalRuntime . preparePrivateDirectory ( )
27712798 let socketPath = LocalRuntime . directoryURL
@@ -4115,6 +4142,7 @@ struct ProtocolTests {
41154142 ( " host authentication orchestration " , hostAuthenticationOrchestration) ,
41164143 ( " docs command reference matches help " , docsCommandReferenceMatchesHelp) ,
41174144 ( " menu shortcuts have unique chords " , menuShortcutsHaveUniqueChords) ,
4145+ ( " supervised owner channel ignores retryable reads " , supervisedOwnerChannelIgnoresRetryableReads) ,
41184146 ( " artifact file upload boundaries " , artifactUploadCommands) ,
41194147 ]
41204148
0 commit comments