88import socket
99import socketserver
1010import subprocess
11+ import sys
1112import threading
1213import time
1314import unittest
@@ -316,6 +317,10 @@ def test_malformed_kind_is_a_refusal_not_an_exception(self):
316317
317318
318319class DNSAndTLSBoundaryTests (unittest .TestCase ):
320+ # The worker's runner/scanner refuse non-Linux execution. These exercise
321+ # its clean resolver environment and POSIX process/descriptor lifecycle,
322+ # unlike the portable pure admission, TLS metadata and budget tests below.
323+ @unittest .skipUnless (sys .platform .startswith ("linux" ), "Linux worker resolver process isolation" )
319324 def test_dns_timeout_kills_and_reaps_the_helper (self ):
320325 processes = []
321326 real_popen = subprocess .Popen
@@ -334,6 +339,7 @@ def start(*args, **kwargs):
334339 with self .assertRaises (ChildProcessError ):
335340 os .waitpid (processes [0 ].pid , os .WNOHANG )
336341
342+ @unittest .skipUnless (sys .platform .startswith ("linux" ), "Linux worker resolver process isolation" )
337343 def test_dns_helper_gets_no_parent_secrets_or_inherited_channel (self ):
338344 read_fd , write_fd = os .pipe ()
339345 self .addCleanup (os .close , read_fd )
@@ -429,6 +435,10 @@ def connect(connection, deadline):
429435 return raw
430436 return connect
431437
438+ # Cross-thread shutdown of a duplicated socket enforces the Linux worker's
439+ # hard deadline. Preserve its strict bound on the supported runtime rather
440+ # than relaxing it to cover Windows socket cancellation behavior.
441+ @unittest .skipUnless (sys .platform .startswith ("linux" ), "Linux worker hard socket deadline" )
432442 def test_body_deadline_survives_connection_sock_handoff (self ):
433443 transport = opener ()
434444 started = time .monotonic ()
@@ -441,6 +451,7 @@ def test_body_deadline_survives_connection_sock_handoff(self):
441451 self .assertLess (time .monotonic () - started , 0.8 )
442452 self .assertFalse (transport .meter .inflight )
443453
454+ @unittest .skipUnless (sys .platform .startswith ("linux" ), "Linux worker hard socket deadline" )
444455 def test_slow_header_has_total_not_inactivity_deadline (self ):
445456 transport = opener ()
446457 started = time .monotonic ()
0 commit comments