qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 6/6] tests/acceptance: Rename avocado_qemu.Test -> QemuSys


From: Willian Rampazzo
Subject: Re: [PATCH v4 6/6] tests/acceptance: Rename avocado_qemu.Test -> QemuSystemTest
Date: Mon, 1 Nov 2021 16:11:42 -0300

On Mon, Sep 27, 2021 at 1:32 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> To run user-mode emulation tests, we introduced the
> avocado_qemu.QemuUserTest which inherits from avocado_qemu.QemuBaseTest.
> System-mode emulation tests are based on the avocado_qemu.Test class,
> which also inherits avocado_qemu.QemuBaseTest. To avoid confusion,
> rename it as avocado_qemu.QemuSystemTest.
>
> Suggested-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  tests/acceptance/avocado_qemu/__init__.py    | 21 +++++++++-----------
>  tests/acceptance/boot_linux_console.py       |  4 ++--
>  tests/acceptance/cpu_queries.py              |  4 ++--
>  tests/acceptance/empty_cpu_model.py          |  4 ++--
>  tests/acceptance/info_usernet.py             |  4 ++--
>  tests/acceptance/linux_initrd.py             |  4 ++--
>  tests/acceptance/linux_ssh_mips_malta.py     |  5 +++--
>  tests/acceptance/machine_arm_canona1100.py   |  4 ++--
>  tests/acceptance/machine_arm_integratorcp.py |  4 ++--
>  tests/acceptance/machine_arm_n8x0.py         |  4 ++--
>  tests/acceptance/machine_avr6.py             |  4 ++--
>  tests/acceptance/machine_m68k_nextcube.py    |  4 ++--
>  tests/acceptance/machine_microblaze.py       |  4 ++--
>  tests/acceptance/machine_mips_fuloong2e.py   |  4 ++--
>  tests/acceptance/machine_mips_loongson3v.py  |  4 ++--
>  tests/acceptance/machine_mips_malta.py       |  4 ++--
>  tests/acceptance/machine_ppc.py              |  4 ++--
>  tests/acceptance/machine_rx_gdbsim.py        |  4 ++--
>  tests/acceptance/machine_s390_ccw_virtio.py  |  4 ++--
>  tests/acceptance/machine_sparc_leon3.py      |  4 ++--
>  tests/acceptance/migration.py                |  4 ++--
>  tests/acceptance/multiprocess.py             |  4 ++--
>  tests/acceptance/pc_cpu_hotplug_props.py     |  4 ++--
>  tests/acceptance/ppc_prep_40p.py             |  4 ++--
>  tests/acceptance/version.py                  |  4 ++--
>  tests/acceptance/virtio-gpu.py               |  4 ++--
>  tests/acceptance/virtio_check_params.py      |  4 ++--
>  tests/acceptance/virtio_version.py           |  4 ++--
>  tests/acceptance/vnc.py                      |  4 ++--
>  tests/acceptance/x86_cpu_model_versions.py   |  4 ++--
>  30 files changed, 68 insertions(+), 70 deletions(-)
>
> diff --git a/tests/acceptance/avocado_qemu/__init__.py 
> b/tests/acceptance/avocado_qemu/__init__.py
> index a497a24f823..1abec2abaca 100644
> --- a/tests/acceptance/avocado_qemu/__init__.py
> +++ b/tests/acceptance/avocado_qemu/__init__.py
> @@ -183,7 +183,7 @@ def interrupt_interactive_console_until_pattern(test, 
> success_message,
>
>      :param test: an Avocado test containing a VM that will have its console
>                   read and probed for a success or failure message
> -    :type test: :class:`avocado_qemu.Test`
> +    :type test: :class:`avocado_qemu.QemuSystemTest`
>      :param success_message: if this message appears, test succeeds
>      :param failure_message: if this message appears, test fails
>      :param interrupt_string: a string to send to the console before trying
> @@ -199,7 +199,7 @@ def wait_for_console_pattern(test, success_message, 
> failure_message=None,
>
>      :param test: an Avocado test containing a VM that will have its console
>                   read and probed for a success or failure message
> -    :type test: :class:`avocado_qemu.Test`
> +    :type test: :class:`avocado_qemu.QemuSystemTest`
>      :param success_message: if this message appears, test succeeds
>      :param failure_message: if this message appears, test fails
>      """
> @@ -211,7 +211,7 @@ def exec_command(test, command):
>      the content.
>
>      :param test: an Avocado test containing a VM.
> -    :type test: :class:`avocado_qemu.Test`
> +    :type test: :class:`avocado_qemu.QemuSystemTest`
>      :param command: the command to send
>      :type command: str
>      """
> @@ -226,7 +226,7 @@ def exec_command_and_wait_for_pattern(test, command,
>
>      :param test: an Avocado test containing a VM that will have its console
>                   read and probed for a success or failure message
> -    :type test: :class:`avocado_qemu.Test`
> +    :type test: :class:`avocado_qemu.QemuSystemTest`
>      :param command: the command to send
>      :param success_message: if this message appears, test succeeds
>      :param failure_message: if this message appears, test fails
> @@ -269,16 +269,13 @@ def fetch_asset(self, name,
>                          cancel_on_missing=cancel_on_missing)
>
>
> -class Test(QemuBaseTest):
> -    """Facilitates system emulation tests.
> -
> -    TODO: Rename this class as `QemuSystemTest`.
> -    """
> +class QemuSystemTest(QemuBaseTest):
> +    """Facilitates system emulation tests."""
>
>      def setUp(self):
>          self._vms = {}
>
> -        super(Test, self).setUp('qemu-system-')
> +        super(QemuSystemTest, self).setUp('qemu-system-')

If you take my suggestion in one of the previous patches, you don't
need this change here.

>
>          self.machine = self.params.get('machine',
>                                         
> default=self._get_unique_tag_val('machine'))
> @@ -515,11 +512,11 @@ def default_kernel_params(self):
>          return self._info.get('kernel_params', None)
>
>
> -class LinuxTest(Test, LinuxSSHMixIn):
> +class LinuxTest(QemuSystemTest, LinuxSSHMixIn):
>      """Facilitates having a cloud-image Linux based available.
>
>      For tests that indend to interact with guests, this is a better choice

If you touch this patch again, please, s/indend/intend/

So far, looks good to me

Reviewed-by: Willian Rampazzo <willianr@redhat.com>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]