All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wainer dos Santos Moschetta <wainersm@redhat.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>, qemu-devel@nongnu.org
Cc: "Willian Rampazzo" <willianr@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Cleber Rosa" <crosa@redhat.com>
Subject: Re: [PATCH v3 3/5] tests/acceptance: Introduce QemuUserTest base class
Date: Wed, 17 Mar 2021 11:14:18 -0300	[thread overview]
Message-ID: <3d83bd7b-0efa-5151-97d4-07505b8d56d3@redhat.com> (raw)
In-Reply-To: <20210315230838.2973103-4-f4bug@amsat.org>

Hi,

On 3/15/21 8:08 PM, Philippe Mathieu-Daudé wrote:
> Similarly to the 'System' Test base class with methods for testing
> system emulation, the QemuUserTest class contains methods useful to
> test user-mode emulation.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>   tests/acceptance/avocado_qemu/__init__.py | 14 ++++++++++++++
>   1 file changed, 14 insertions(+)
>
> diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py
> index 08b3fa1124f..b471bee66e0 100644
> --- a/tests/acceptance/avocado_qemu/__init__.py
> +++ b/tests/acceptance/avocado_qemu/__init__.py
> @@ -20,6 +20,7 @@
>   from avocado.utils import cloudinit
>   from avocado.utils import datadrainer
>   from avocado.utils import network
> +from avocado.utils import process
>   from avocado.utils import vmimage
>   from avocado.utils.path import find_command
>   
> @@ -256,6 +257,19 @@ def fetch_asset(self, name,
>                           find_only=find_only,
>                           cancel_on_missing=cancel_on_missing)
>   
> +class QemuUserTest(QemuBaseTest):
> +    def setUp(self):
> +        self._ldpath = []
> +        super(QemuUserTest, self).setUp("qemu-%s")

There is my comment on patch 02 regarding the setUp() argument. Apart 
from that, this code looks good to me:

Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>

> +
> +    def add_ldpath(self, ldpath):
> +        self._ldpath += [os.path.abspath(ldpath)]
> +
> +    def run(self, bin_path, args=[]):
> +        qemu_args = " ".join(["-L %s" % ldpath for ldpath in self._ldpath])
> +        bin_args = " ".join(args)
> +        return process.run("%s %s %s %s" % (self.qemu_bin, qemu_args,
> +                                            bin_path, bin_args))
>   
>   class LinuxTest(Test):
>       """Facilitates having a cloud-image Linux based available.



  reply	other threads:[~2021-03-17 14:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-15 23:08 [PATCH v3 0/5] tests/acceptance: Add bFLT loader linux-user test Philippe Mathieu-Daudé
2021-03-15 23:08 ` [PATCH v3 1/5] tests/acceptance: Extract QemuBaseTest from Test Philippe Mathieu-Daudé
2021-03-17 13:08   ` Wainer dos Santos Moschetta
2021-03-17 13:26     ` Philippe Mathieu-Daudé
2021-03-17 13:44       ` Wainer dos Santos Moschetta
2021-03-17 14:18         ` Philippe Mathieu-Daudé
2021-03-15 23:08 ` [PATCH v3 2/5] tests/acceptance: Make pick_default_qemu_bin() more generic Philippe Mathieu-Daudé
2021-03-17 13:32   ` Wainer dos Santos Moschetta
2021-03-15 23:08 ` [PATCH v3 3/5] tests/acceptance: Introduce QemuUserTest base class Philippe Mathieu-Daudé
2021-03-17 14:14   ` Wainer dos Santos Moschetta [this message]
2021-03-15 23:08 ` [PATCH v3 4/5] tests/acceptance: Share useful helpers from virtiofs_submounts test Philippe Mathieu-Daudé
2021-03-17 14:52   ` Wainer dos Santos Moschetta
2021-03-15 23:08 ` [PATCH v3 5/5] tests/acceptance: Add bFLT loader linux-user test Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3d83bd7b-0efa-5151-97d4-07505b8d56d3@redhat.com \
    --to=wainersm@redhat.com \
    --cc=crosa@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=willianr@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.