Fix latest rubocop warnings

pull/148/head
Andre Richter 2 years ago
parent 3a84b65d4c
commit 85ee27715c
No known key found for this signature in database
GPG Key ID: 2116C1AB102F615E

@ -5,6 +5,7 @@
# Copyright (c) 2021-2022 Andre Richter <andre.o.richter@gmail.com>
require_relative 'test'
require 'io/wait'
require 'timeout'
# Check for an expected string when booting the kernel in QEMU.
@ -54,7 +55,7 @@ class BootTest < Test
def run_concrete_test
qemu_output = []
Timeout.timeout(MAX_WAIT_SECS) do
while IO.select([@qemu_serial])
while @qemu_serial.wait_readable
qemu_output << @qemu_serial.read_nonblock(1024)
if expected_string_observed?(qemu_output)

@ -6,6 +6,7 @@
require 'English'
require_relative 'test'
require 'io/wait'
# A test that only inspects the exit code of the QEMU binary.
class ExitCodeTest < Test
@ -37,7 +38,7 @@ class ExitCodeTest < Test
def run_concrete_test
Timeout.timeout(MAX_WAIT_SECS) do
@test_output << @qemu_serial.read_nonblock(1024) while IO.select([@qemu_serial])
@test_output << @qemu_serial.read_nonblock(1024) while @qemu_serial.wait_readable
end
rescue EOFError
@qemu_serial.close

Loading…
Cancel
Save