|
From: | Thomas Huth |
Subject: | Re: [PATCH 09/12] acpi/tests/bits: add acpi and smbios python tests that uses biosbits |
Date: | Tue, 28 Jun 2022 12:00:54 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 |
On 28/06/2022 11.55, Michael S. Tsirkin wrote:
On Tue, Jun 28, 2022 at 12:56:52PM +0530, Ani Sinha wrote:On Tue, Jun 28, 2022 at 12:50 PM Thomas Huth <thuth@redhat.com> wrote:On 27/06/2022 09.28, Ani Sinha wrote:This change adds python based qtest framework that can be used to run qtests from within a virtual environment. A bash script creates the virtual environment and then runs the python based tests from within that environment. All dependent python packages are installed in the virtual environment using pip module. QEMU python test modules are also available in the environment for spawning the QEMU based VMs. It also introduces QEMU acpi/smbios biosbits python test script which is run from within the python virtual environment. Signed-off-by: Ani Sinha <ani@anisinha.ca> ---
[...]
+class QEMUBitsMachine(QEMUMachine): + """ + A QEMU VM, with isa-debugcon enabled and bits iso passed + using -cdrom to QEMU commandline. + """ + def __init__(self, + binary: str, + args: Sequence[str] = (), + wrapper: Sequence[str] = (), + name: Optional[str] = None, + base_temp_dir: str = "/var/tmp", + debugcon_log: str = "debugcon-log.txt", + debugcon_addr: str = "0x403", + sock_dir: Optional[str] = None, + qmp_timer: Optional[float] = None): + # pylint: disable=too-many-arguments + + if name is None: + name = "qemu-bits-%d" % os.getpid() + if sock_dir is None: + sock_dir = base_temp_dir + super().__init__(binary, args, wrapper=wrapper, name=name, + base_temp_dir=base_temp_dir, + sock_dir=sock_dir, qmp_timer=qmp_timer) + self.debugcon_log = debugcon_log + self.debugcon_addr = debugcon_addr + self.base_temp_dir = base_temp_dir + + @property + def _base_args(self) -> List[str]: + args = super()._base_args + args.extend([ + '-chardev', + 'file,path=%s,id=debugcon' %os.path.join(self.base_temp_dir, + self.debugcon_log), + '-device', + 'isa-debugcon,iobase=%s,chardev=debugcon' %self.debugcon_addr, + ]) + return argsSo is this patch series *really* related to qtests? qtests are using a special "accelerator" mode of QEMU where it gets launched with the "-qtest" parameter. I can't see that you're using "-qtest" here or anywhere else, so this rather looks like another framework to me to run python-based QEMU tests (similar to the avocado tests).yes you are right. This does not use or need the qtest accelerator because we are not inspecting the guest memory for anything.Same is true for e.g. ./tests/qtest/bios-tables-test.c ...
No, bios-tables-test still uses functions like qtest_memread() and qtest_readb(), so it still uses the qtest framework, even if it's actually running code via TCG.
Thomas
[Prev in Thread] | Current Thread | [Next in Thread] |