@@ -40,9 +40,9 @@ def test_alpine_virt_tcg_gic_max(self):
iso_path = self.ASSET_ALPINE_ISO.fetch()
self.set_machine('virt')
- self.vm.set_console()
self.require_accelerator("tcg")
+ self.vm.set_console()
self.vm.add_args("-accel", "tcg")
self.vm.add_args("-cpu", "max,pauth-impdef=on")
self.vm.add_args("-machine",
@@ -71,15 +71,16 @@ def common_aarch64_virt(self, machine):
Common code to launch basic virt machine with kernel+initrd
and a scratch disk.
"""
+ self.set_machine('virt')
+ self.require_accelerator("tcg")
+
logger = logging.getLogger('aarch64_virt')
kernel_path = self.ASSET_KERNEL.fetch()
- self.set_machine('virt')
self.vm.set_console()
kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
'console=ttyAMA0')
- self.require_accelerator("tcg")
self.vm.add_args('-cpu', 'max,pauth-impdef=on',
'-machine', machine,
'-accel', 'tcg',
@@ -100,7 +101,9 @@ def common_aarch64_virt(self, machine):
# Add the device
self.vm.add_args('-blockdev',
- f"driver=qcow2,file.driver=file,file.filename={image_path},node-name=scratch")
+ "driver=qcow2,"
+ "file.driver=file,"
+ f"file.filename={image_path},node-name=scratch")
self.vm.add_args('-device',
'virtio-blk-device,drive=scratch')