[ci][github] Disable buffering on subprocess output

Testing script works by reading output of subprocess and checking if
output matches expectation. To ensure that we can see output in timely
fashion, disable buffering.
This commit is contained in:
Kelvin Zhang
2025-08-04 13:38:02 -07:00
committed by Kelvin Zhang
parent 6ae7086222
commit ed656a3993

View File

@@ -58,6 +58,8 @@ def shutdown_little_kernel(p: subprocess.Popen):
def main():
# Test relies on reading subprocess output, so set bufsize=0
# to ensure that we get real-time output.
p = subprocess.Popen(['qemu-system-aarch64',
'-cpu',
'max',
@@ -75,7 +77,7 @@ def main():
'-drive',
'if=none,file=lib/uefi/helloworld_aa64.efi,id=blk,format=raw',
'-device',
'virtio-blk-device,drive=blk'], stdout=PIPE, stdin=PIPE, stderr=STDOUT, text=True)
'virtio-blk-device,drive=blk'], stdout=PIPE, stdin=PIPE, stderr=STDOUT, text=True, bufsize=0)
try:
os.set_blocking(p.stdout.fileno(), False)
condition_met, output = wait_for_output(