diff options
author | Murilo Opsfelder Araujo <muriloo@linux.ibm.com> | 2022-08-08 21:24:51 -0300 |
---|---|---|
committer | Daniel Henrique Barboza <danielhb413@gmail.com> | 2023-02-05 06:40:28 -0300 |
commit | 8763196c2c1aa4128040964c31529936932754e0 (patch) | |
tree | eef90ccf8671706be0de62229776823a592b33fd /tests | |
parent | 7661a7ab53a19e6541c2661ddb27d7ca4e1dfa31 (diff) |
tests/migration: add support for ppc64le for guestperf.py
Add support for ppc64le for guestperf.py. On ppc, console is usually
hvc0 and serial device for pseries machine is spapr-vty.
Signed-off-by: Murilo Opsfelder Araujo <muriloo@linux.ibm.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20220809002451.91541-3-muriloo@linux.ibm.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/migration/guestperf/engine.py | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/tests/migration/guestperf/engine.py b/tests/migration/guestperf/engine.py index 59fca2c70b..cc06fac592 100644 --- a/tests/migration/guestperf/engine.py +++ b/tests/migration/guestperf/engine.py @@ -281,6 +281,26 @@ class Engine(object): resp = src.command("stop") paused = True + def _is_ppc64le(self): + _, _, _, _, machine = os.uname() + if machine == "ppc64le": + return True + return False + + def _get_guest_console_args(self): + if self._is_ppc64le(): + return "console=hvc0" + else: + return "console=ttyS0" + + def _get_qemu_serial_args(self): + if self._is_ppc64le(): + return ["-chardev", "stdio,id=cdev0", + "-device", "spapr-vty,chardev=cdev0"] + else: + return ["-chardev", "stdio,id=cdev0", + "-device", "isa-serial,chardev=cdev0"] + def _get_common_args(self, hardware, tunnelled=False): args = [ "noapic", @@ -289,8 +309,10 @@ class Engine(object): "noreplace-smp", "cgroup_disable=memory", "pci=noearly", - "console=ttyS0", ] + + args.append(self._get_guest_console_args()) + if self._debug: args.append("debug") else: @@ -308,12 +330,12 @@ class Engine(object): "-kernel", self._kernel, "-initrd", self._initrd, "-append", cmdline, - "-chardev", "stdio,id=cdev0", - "-device", "isa-serial,chardev=cdev0", "-m", str((hardware._mem * 1024) + 512), "-smp", str(hardware._cpus), ] + argv.extend(self._get_qemu_serial_args()) + if self._debug: argv.extend(["-device", "sga"]) |