From: Thomas Huth <thuth@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>, qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>, qemu-arm@nongnu.org
Subject: Re: [PATCH v2] tests/functional: Convert Aarch64 Virt machine avocado tests
Date: Mon, 26 Aug 2024 10:12:03 +0200 [thread overview]
Message-ID: <f50da65a-b5e7-4fb3-a99f-e8fcecb9fe1f@redhat.com> (raw)
In-Reply-To: <20240823082423.6349-1-philmd@linaro.org>
On 23/08/2024 10.24, Philippe Mathieu-Daudé wrote:
> Straight forward conversion. Update the SHA1 hash to
> SHA256 since SHA1 should not be used anymore nowadays.
>
> Provide get_qemu_img() helper in qemu_test.
>
> $ make check-functional-aarch64 V=1
> ...
> ▶ 1/4 test_aarch64_virt.Aarch64VirtMachine.test_aarch64_virt_gicv2 OK
> ▶ 1/4 test_aarch64_virt.Aarch64VirtMachine.test_aarch64_virt_gicv3 OK
> ▶ 1/4 test_aarch64_virt.Aarch64VirtMachine.test_alpine_virt_tcg_gic_max OK
> 1/4 qemu:func-thorough+func-aarch64-thorough+thorough / func-aarch64-aarch64_virt OK 30.44s 3 subtests passed
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> Based-on: <20240822114146.86838-1-philmd@linaro.org>
> ---
> MAINTAINERS | 2 +-
> tests/functional/meson.build | 2 +
> tests/functional/qemu_test/__init__.py | 2 +-
> tests/functional/qemu_test/cmd.py | 15 ++++
> .../test_aarch64_virt.py} | 69 ++++++++-----------
> 5 files changed, 46 insertions(+), 44 deletions(-)
> rename tests/{avocado/machine_aarch64_virt.py => functional/test_aarch64_virt.py} (69%)
> mode change 100644 => 100755
...
> @@ -176,3 +178,16 @@ def exec_command_and_wait_for_pattern(test, command,
> :param failure_message: if this message appears, test fails
> """
> _console_interaction(test, success_message, failure_message, command + '\r')
> +
> +def get_qemu_img(test):
> + test.log.debug('Looking for and selecting a qemu-img binary')
> +
> + # If qemu-img has been built, use it, otherwise the system wide one
> + # will be used.
> + qemu_img = os.path.join(BUILD_DIR, 'qemu-img')
> + if os.path.exists(qemu_img):
> + return qemu_img
> + if has_cmd('qemu-img'):
> + return 'qemu-img'
> + test.cancel('Could not find "qemu-img", which is required to '
> + 'create temporary images')
Please use self.skipTest() instead ... cancel() was something from the
Avocado framework only.
Apart from that the patch looks fine to me now, thanks!
Thomas
prev parent reply other threads:[~2024-08-26 8:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-23 8:24 [PATCH v2] tests/functional: Convert Aarch64 Virt machine avocado tests Philippe Mathieu-Daudé
2024-08-26 8:12 ` Thomas Huth [this message]
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=f50da65a-b5e7-4fb3-a99f-e8fcecb9fe1f@redhat.com \
--to=thuth@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).