Tests: Fix MacOS test driver when child process finishes (#6032) (#6038)

os.read(fd, 1) returns b'' on MacOS when the
child process exits, whereas it must be throwing an OSError
on other platforms.
This commit is contained in:
Paul Swirhun 2025-05-26 05:58:20 -07:00 committed by GitHub
parent 22d484d54d
commit c9fa54536e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -1734,6 +1734,9 @@ class VlTest:
try:
data = os.read(fd, 1)
self._run_output(data, logfh, tee)
# Parent detects child termination by checking for b''
if not data:
break
except OSError:
break