python/qemu: split arg between base and harness lists
There are argument we add because we want the test harness to control QEMU and arguments we default for handling the display and machine type. Split the obvious ones between base_args and a new list called harness_args. We will leave the complexity of the serial ports for now. Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-ID: <20260619155657.944220-2-alex.bennee@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Alex Bennée committed
Jun 19, 2026 at 16:56 UTC
220530755ba6c4ed658d283cee903e4956131b99
1 file changed
+10
-4
python/qemu/machine/machine.py
+10
-4
@@ -292,8 +292,8 @@ class QEMUMachine:
292
self._iolog = iolog.read()
293
294
@property
295
- def _base_args(self) -> List[str]:
296
- args = ['-display', 'none', '-vga', 'none']
295
+ def _harness_args(self) -> List[str]:
296
+ args: List[str] = []
297
298
if self._qmp_set:
299
if self._sock_pair:
@@ -307,8 +307,6 @@ class QEMUMachine:
307
args.extend(['-chardev', moncdev, '-mon',
308
'chardev=mon,mode=control'])
309
310
- if self._machine is not None:
311
- args.extend(['-machine', self._machine])
310
for _ in range(self._console_index):
311
args.extend(['-serial', 'null'])
312
if self._console_set:
@@ -323,6 +321,13 @@ class QEMUMachine:
321
args.extend(['-device', device])
322
return args
323
324
+ @property
325
+ def _base_args(self) -> List[str]:
326
+ args: List[str] = ['-display', 'none', '-vga', 'none']
327
+ if self._machine is not None:
328
+ args.extend(['-machine', self._machine])
329
+ return args
330
+
331
@property
332
def args(self) -> List[str]:
333
"""Returns the list of arguments given to the QEMU binary."""
@@ -366,6 +371,7 @@ class QEMUMachine:
371
self._qemu_full_args = tuple(chain(
372
self._wrapper,
373
[self._binary],
374
+ self._harness_args,
375
self._base_args,
376
self._args
377
))