import mmap
import re
+from qemu.machine.machine import VMLaunchFailure
from qemu_test import LinuxKernelTest, Asset
try:
vm.launch()
- except:
- # TODO: probably fails because plugins not enabled but we
- # can't currently probe for the feature.
- self.cancel("TCG Plugins not enabled?")
+ except VMLaunchFailure as excp:
+ if "plugin interface not enabled in this build" in excp.output:
+ self.skipTest("TCG plugins not enabled")
+ else:
+ self.log.info(f"unhandled launch failure: {excp.output}")
+ raise excp
self.wait_for_console_pattern(console_pattern, vm)
# ensure logs are flushed
kernel_path = self.ASSET_KERNEL.fetch()
kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
'console=ttyAMA0')
- console_pattern = 'Kernel panic - not syncing: VFS:'
+ console_pattern = 'Please append a correct "root=" boot option'
plugin_log = tempfile.NamedTemporaryFile(mode="r+t", prefix="plugin",
suffix=".log")
kernel_path = self.ASSET_KERNEL.fetch()
kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
'console=ttyAMA0')
- console_pattern = 'Kernel panic - not syncing: VFS:'
+ console_pattern = 'Please append a correct "root=" boot option'
plugin_log = tempfile.NamedTemporaryFile(mode="r+t", prefix="plugin",
suffix=".log")