From: Thomas Huth <thuth@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>, qemu-devel@nongnu.org
Cc: "Alex Bennée" <alex.bennee@linaro.org>,
qemu-arm@nongnu.org, "Peter Maydell" <peter.maydell@linaro.org>
Subject: Re: [PATCH] tests/functional: Convert Aarch64 Virt machine avocado tests
Date: Thu, 22 Aug 2024 14:41:20 +0200 [thread overview]
Message-ID: <23566834-d8e5-4a54-8f3e-cc68e6b7d951@redhat.com> (raw)
In-Reply-To: <20240822120750.89065-1-philmd@linaro.org>
On 22/08/2024 14.07, Philippe Mathieu-Daudé wrote:
> Straight forward conversion. Update the SHA1 hash to
> SHA256 since SHA1 should not be used anymore nowadays.
> Use has_cmd() and run_cmd() methods from 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>
> ---
...
> @@ -100,12 +98,11 @@ def common_aarch64_virt(self, machine):
> image_path = os.path.join(self.workdir, 'scratch.qcow2')
> qemu_img = os.path.join(BUILD_DIR, 'qemu-img')
> if not os.path.exists(qemu_img):
> - qemu_img = find_command('qemu-img', False)
> + qemu_img = has_cmd('qemu-img')
As far as I can see, has_cmd() returns either True or False ...
> if qemu_img is False:
> self.cancel('Could not find "qemu-img", which is required to '
> 'create the temporary qcow2 image')
> - cmd = '%s create -f qcow2 %s 8M' % (qemu_img, image_path)
> - process.run(cmd)
> + run_cmd([qemu_img, 'create', '-f', 'qcow2', image_path, '8M'])
... so this seems wrong to me?
tests/avocado/avocado_qemu/__init__.py used to have a get_qemu_img()
function, maybe you could port that one over?
Thomas
next prev parent reply other threads:[~2024-08-22 12:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-22 12:07 [PATCH] tests/functional: Convert Aarch64 Virt machine avocado tests Philippe Mathieu-Daudé
2024-08-22 12:41 ` Thomas Huth [this message]
2024-08-23 8:24 ` 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=23566834-d8e5-4a54-8f3e-cc68e6b7d951@redhat.com \
--to=thuth@redhat.com \
--cc=alex.bennee@linaro.org \
--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).