qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Thomas Huth <thuth@redhat.com>, 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: Fri, 23 Aug 2024 10:24:08 +0200	[thread overview]
Message-ID: <df7826f8-df08-46d0-b5bc-86b640b71c6f@linaro.org> (raw)
In-Reply-To: <23566834-d8e5-4a54-8f3e-cc68e6b7d951@redhat.com>

On 22/8/24 14:41, Thomas Huth wrote:
> 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 ...

Oops.

> 
>>           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?

Good idea.



      reply	other threads:[~2024-08-23  8:25 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
2024-08-23  8:24   ` Philippe Mathieu-Daudé [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=df7826f8-df08-46d0-b5bc-86b640b71c6f@linaro.org \
    --to=philmd@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@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 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).