Skip to content

Commit 95e40ef

Browse files
committed
test: add test for serial out to file
Add a test that verifies having serial output go to a file works. Signed-off-by: Patrick Roy <[email protected]>
1 parent 43bcc23 commit 95e40ef

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/integration_tests/functional/test_serial_io.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,3 +228,10 @@ def test_no_serial_fd_error_when_daemonized(uvm_plain):
228228
test_microvm.start()
229229

230230
assert REGISTER_FAILED_WARNING not in test_microvm.log_data
231+
232+
233+
def test_serial_file_output(uvm_any):
234+
"""Test that redirecting serial console output to a file works for booted and restored VMs"""
235+
uvm_any.ssh.check_output("echo 'hello' > /dev/ttyS0")
236+
237+
assert b"hello" in uvm_any.serial_log_file.read_bytes()

0 commit comments

Comments
 (0)