From: Wainer dos Santos Moschetta <wainersm@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Liam Merwick" <liam.merwick@oracle.com>,
alex.bennee@linaro.org, fam@euphon.net
Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, slp@redhat.com,
sgarzare@redhat.com
Subject: Re: [PATCH 1/6] tests/boot_linux_console: add microvm acceptance test
Date: Fri, 31 Jan 2020 16:10:21 -0200 [thread overview]
Message-ID: <1559491d-d8e1-8099-64b0-ec0a33d0faf1@redhat.com> (raw)
In-Reply-To: <acf418d0-a002-4ae0-06cc-c26bf495f3f8@redhat.com>
On 1/30/20 9:51 PM, Philippe Mathieu-Daudé wrote:
> On 1/30/20 6:41 PM, Wainer dos Santos Moschetta wrote:
>> On 1/27/20 2:36 PM, Liam Merwick wrote:
>>> Refactor test_x86_64_pc() to test_x86_64_machine() so that separate
>>> functions which specify the Avocado tag of ':avocado: tags=machine:'
>>> as being either 'pc' or 'microvm' can be used to test booting a
>>> compressed kernel using either machine class.
>>>
>>> Signed-off-by: Liam Merwick <liam.merwick@oracle.com>
>>> ---
>>> tests/acceptance/boot_linux_console.py | 15 +++++++++++++--
>>> 1 file changed, 13 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/tests/acceptance/boot_linux_console.py
>>> b/tests/acceptance/boot_linux_console.py
>>> index e40b84651b0b..aa5b07b1c609 100644
>>> --- a/tests/acceptance/boot_linux_console.py
>>> +++ b/tests/acceptance/boot_linux_console.py
>>> @@ -51,10 +51,9 @@ class BootLinuxConsole(Test):
>>> os.chdir(cwd)
>>> return self.workdir + path
>>> - def test_x86_64_pc(self):
>>> + def do_test_x86_64_machine(self):
>>> """
>>> :avocado: tags=arch:x86_64
>>> - :avocado: tags=machine:pc
>>> """
>>> kernel_url =
>>> ('https://archives.fedoraproject.org/pub/archive/fedora'
>>> '/linux/releases/29/Everything/x86_64/os/images/pxeboot'
>>> @@ -70,6 +69,18 @@ class BootLinuxConsole(Test):
>>> console_pattern = 'Kernel command line: %s' %
>>> kernel_command_line
>>> self.wait_for_console_pattern(console_pattern)
>>> + def test_x86_64_pc(self):
>>> + """
>>> + :avocado: tags=machine:pc
>>> + """
>>
>> The test method won't inherit the 'arch' tag from
>> `do_test_x86_64_machine()`, so you need to explicitly 'arch' tag each
>> test you created in this series. If you don't do so, Avocado won't
>> filter out those x86_64 tests in case QEMU is built with non-x86_64
>> targets.
>>
>> Follows an example, I built QEMU with '--target-list=arm-softmmu'. I
>> got:
>>
>> ```
>>
>> (02/18)
>> tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_x86_64_pc:
>> CANCEL: No QEMU binary defined or found in the source tree (0.00 s)
>> (03/18)
>> tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_x86_64_microvm:
>> CANCEL: No QEMU binary defined or found in the source tree (0.00 s)
>> (04/18)
>> tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_virt:
>> PASS (1.25 s)
>>
>> ```
>>
>> OK, avocado_qemu was smart enough to skip the tests, but ideally it
>> should not even consider running them in the first place.
>
> This should be solved by this patch:
> https://lists.gnu.org/archive/html/qemu-devel/2020-01/msg07311.html
> "tests/acceptance: Use 'machine' tag to check if available in QEMU binary"
That patch is useful** but does not solve the problem that I point out
here. If you have a test case which is arch-specific and the arch-QEMU
was not built then it should not be executed. Tagging the test with
'arch' ensures that.
** BTW, I'm going to review it soon
- Wainer
>>
>> Thanks!
>>
>> - Wainer
>>
>>> + self.do_test_x86_64_machine()
>>> +
>>> + def test_x86_64_microvm(self):
>>> + """
>>> + :avocado: tags=machine:microvm
>>> + """
>>> + self.do_test_x86_64_machine()
>>> +
>>> def test_mips_malta(self):
>>> """
>>> :avocado: tags=arch:mips
>>
>
>
next prev parent reply other threads:[~2020-01-31 18:11 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-27 16:36 [PATCH 0/6] tests/boot_linux_console: add extra boot acceptance tests Liam Merwick
2020-01-27 16:36 ` [PATCH 1/6] tests/boot_linux_console: add microvm acceptance test Liam Merwick
2020-01-30 11:49 ` Stefano Garzarella
2020-01-30 17:41 ` Wainer dos Santos Moschetta
2020-01-30 23:51 ` Philippe Mathieu-Daudé
2020-01-31 18:10 ` Wainer dos Santos Moschetta [this message]
2020-01-27 16:36 ` [PATCH 2/6] tests/boot_linux_console: add BIOS " Liam Merwick
2020-01-30 11:27 ` Stefano Garzarella
2020-01-30 15:34 ` Liam Merwick
2020-01-30 16:28 ` Liam Merwick
2020-01-30 16:45 ` Stefano Garzarella
2020-01-27 16:36 ` [PATCH 3/6] tests/boot_linux_console: fix extract_from_deb() comment Liam Merwick
2020-01-30 11:29 ` Stefano Garzarella
2020-01-30 18:17 ` Wainer dos Santos Moschetta
2020-01-31 0:03 ` Philippe Mathieu-Daudé
2020-01-27 16:36 ` [PATCH 4/6] travis.yml: install rpm2cpio for acceptance tests Liam Merwick
2020-01-30 12:00 ` Stefano Garzarella
2020-01-27 16:36 ` [PATCH 5/6] tests/boot_linux_console: add extract_from_rpm method Liam Merwick
2020-01-30 12:05 ` Stefano Garzarella
2020-01-30 15:34 ` Liam Merwick
2020-01-30 19:19 ` Wainer dos Santos Moschetta
2020-01-30 23:59 ` Philippe Mathieu-Daudé
2020-01-31 15:02 ` Liam Merwick
2020-02-04 13:31 ` Liam Merwick
2020-02-04 14:22 ` Philippe Mathieu-Daudé
2020-01-27 16:36 ` [PATCH 6/6] tests/boot_linux_console: add PVH acceptance tests Liam Merwick
2020-01-30 12:08 ` Stefano Garzarella
2020-01-30 23:57 ` Philippe Mathieu-Daudé
2020-01-31 15:03 ` Liam Merwick
2020-01-31 15:18 ` Philippe Mathieu-Daudé
2020-01-30 17:57 ` [PATCH 0/6] tests/boot_linux_console: add extra boot " Wainer dos Santos Moschetta
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=1559491d-d8e1-8099-64b0-ec0a33d0faf1@redhat.com \
--to=wainersm@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=fam@euphon.net \
--cc=liam.merwick@oracle.com \
--cc=pbonzini@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=sgarzare@redhat.com \
--cc=slp@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).