Skip to content

Commit 1fc3ef2

Browse files
committed
test: verify PVH boot protocol is used
Use test_api_happy_start to assert that the log message that indicates usage of PVH boot protocol is present. Only x86_64 guests support PVH boot, and on ARM we do not emit any log messages, so restrict the assertion to x86_64 platforms. Signed-off-by: Patrick Roy <[email protected]>
1 parent 958a2b9 commit 1fc3ef2

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

tests/framework/utils.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,3 +678,8 @@ def __enter__(self):
678678

679679
def __exit__(self, _type, _value, _traceback):
680680
signal.alarm(0)
681+
682+
683+
def pvh_supported() -> bool:
684+
"""Checks if PVH boot is supported"""
685+
return platform.architecture() == "x86_64"

tests/integration_tests/functional/test_api.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import host_tools.drive as drive_tools
1818
import host_tools.network as net_tools
19-
from framework import utils_cpuid
19+
from framework import utils, utils_cpuid
2020
from framework.utils import get_firecracker_version_from_toml, is_io_uring_supported
2121

2222
MEM_LIMIT = 1000000000
@@ -42,6 +42,9 @@ def test_api_happy_start(uvm_plain):
4242

4343
test_microvm.start()
4444

45+
if utils.pvh_supported():
46+
assert "Kernel loaded using PVH boot protocol" in test_microvm.log_data
47+
4548

4649
def test_drive_io_engine(uvm_plain):
4750
"""

0 commit comments

Comments
 (0)