From 85ee27715c7b534fffc7b8ae0959df397ce3ab2b Mon Sep 17 00:00:00 2001 From: Andre Richter Date: Tue, 15 Feb 2022 23:21:37 +0100 Subject: [PATCH] Fix latest rubocop warnings --- common/tests/boot_test.rb | 3 ++- common/tests/exit_code_test.rb | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/common/tests/boot_test.rb b/common/tests/boot_test.rb index 401c0183..532efa96 100644 --- a/common/tests/boot_test.rb +++ b/common/tests/boot_test.rb @@ -5,6 +5,7 @@ # Copyright (c) 2021-2022 Andre Richter 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) diff --git a/common/tests/exit_code_test.rb b/common/tests/exit_code_test.rb index 181e624e..e5c42502 100644 --- a/common/tests/exit_code_test.rb +++ b/common/tests/exit_code_test.rb @@ -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