From: Wainer dos Santos Moschetta <wainersm@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>,
qemu-devel@nongnu.org, crosa@redhat.com
Cc: Paolo Bonzini <pbonzini@redhat.com>,
thuth@redhat.com, alex.bennee@linaro.org, ehabkost@redhat.com
Subject: Re: [PATCH v3 2/4] tests/acceptance: boot_linux_console: Add boot Linux with kvm tests
Date: Tue, 4 Feb 2020 19:25:47 -0200 [thread overview]
Message-ID: <10433721-2784-b88a-2ee0-c4600b52503d@redhat.com> (raw)
In-Reply-To: <75a9cd31-a978-0b31-1d6d-1b34800e13a6@redhat.com>
On 1/24/20 1:45 PM, Philippe Mathieu-Daudé wrote:
> On 1/22/20 2:27 AM, Wainer dos Santos Moschetta wrote:
>> Added boot Linux test cases that launch QEMU with kvm
>> enabled. Likewise it was added tests for tcg.
>>
>> Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
>> ---
>> tests/acceptance/boot_linux_console.py | 88 ++++++++++++++++++++------
>> 1 file changed, 68 insertions(+), 20 deletions(-)
>>
>> diff --git a/tests/acceptance/boot_linux_console.py
>> b/tests/acceptance/boot_linux_console.py
>> index e40b84651b..a36eae630c 100644
>> --- a/tests/acceptance/boot_linux_console.py
>> +++ b/tests/acceptance/boot_linux_console.py
>> @@ -51,11 +51,7 @@ class BootLinuxConsole(Test):
>> os.chdir(cwd)
>> return self.workdir + path
>> - def test_x86_64_pc(self):
>> - """
>> - :avocado: tags=arch:x86_64
>> - :avocado: tags=machine:pc
>> - """
>> + def do_test_x86_64_pc(self):
>> kernel_url =
>> ('https://archives.fedoraproject.org/pub/archive/fedora'
>> '/linux/releases/29/Everything/x86_64/os/images/pxeboot'
>> '/vmlinuz')
>> @@ -70,6 +66,22 @@ class BootLinuxConsole(Test):
>> console_pattern = 'Kernel command line: %s' %
>> kernel_command_line
>> self.wait_for_console_pattern(console_pattern)
>> + def test_x86_64_pc_kvm(self):
>> + """
>> + :avocado: tags=arch:x86_64
>> + :avocado: tags=machine:pc
>> + :avocado: tags=accel:kvm
>> + """
>> + self.do_test_x86_64_pc()
>> +
>> + def test_x86_64_pc_tcg(self):
>> + """
>> + :avocado: tags=arch:x86_64
>> + :avocado: tags=machine:pc
>> + :avocado: tags=accel:tcg
>> + """
>> + self.do_test_x86_64_pc()
> [...]
> So you want to test a binary linked with multiple accelerators.
>
> Isn't it possible to have something clever/simpler?
It is feasible using Avocado's CIT [1] or PICT [2] plug-ins. This work
is suggested by Cleber in [3] and I've it on my radar for future work.
But, for the moment, I would like to have those simple boot with KVM
tests merged so that they are executed in our Travis CI.
[1]
https://avocado-framework.readthedocs.io/en/75.1/plugins/optional/varianter_cit.html
[2]
https://avocado-framework.readthedocs.io/en/75.1/plugins/optional/varianter_pict.html
[3]
https://trello.com/c/1wvzcxHY/105-create-cit-parameter-for-acceptance-tests
>
>
> def test_x86_64_pc(self):
> """
> :avocado: tags=arch:x86_64
> :avocado: tags=machine:pc
> :avocado: tags=accel:kvm
> :avocado: tags=accel:tcg
> """
> self.do_test_x86_64_pc()
>
> And use a mux config?
>
> Because else we are duplicating a lot of code, and there are various
> accelerators available:
>
> $ git grep ACCEL_CLASS_NAME
> accel/qtest.c:41:#define TYPE_QTEST_ACCEL ACCEL_CLASS_NAME("qtest")
> accel/tcg/tcg-all.c:46:#define TYPE_TCG_ACCEL ACCEL_CLASS_NAME("tcg")
> hw/xen/xen-common.c:200:#define TYPE_XEN_ACCEL ACCEL_CLASS_NAME("xen")
> include/sysemu/hvf.h:100:#define TYPE_HVF_ACCEL ACCEL_CLASS_NAME("hvf")
> include/sysemu/kvm_int.h:36:#define TYPE_KVM_ACCEL
> ACCEL_CLASS_NAME("kvm")
> target/i386/hax-all.c:1127: .name = ACCEL_CLASS_NAME("hax"),
> target/i386/whpx-all.c:1533: .name = ACCEL_CLASS_NAME("whpx"),
Unfortunately I don't have enough time, resources and knowledge to work
on accelerators other than kvm and tcg. I appreciate if others could
contribute here, and I'm happy to review the patches.
Another point is how those tests could be ran on our CI.
Thanks for bringing those points!
- Wainer
>
>
> And also pending:
> target/i386/nvmm-all.c: .name = ACCEL_CLASS_NAME("nvmm"),
> https://www.mail-archive.com/qemu-devel@nongnu.org/msg668697.html
>
next prev parent reply other threads:[~2020-02-04 21:27 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-22 1:27 [PATCH v3 0/4] Acceptance tests: boot Linux with KVM test Wainer dos Santos Moschetta
2020-01-22 1:27 ` [PATCH v3 1/4] tests/acceptance: avocado_qemu: Introduce the 'accel' test parameter Wainer dos Santos Moschetta
2020-01-24 9:36 ` Philippe Mathieu-Daudé
2020-01-27 19:28 ` Wainer dos Santos Moschetta
2020-01-30 22:51 ` Philippe Mathieu-Daudé
2020-02-04 21:30 ` Wainer dos Santos Moschetta
2020-01-22 1:27 ` [PATCH v3 2/4] tests/acceptance: boot_linux_console: Add boot Linux with kvm tests Wainer dos Santos Moschetta
2020-01-22 9:02 ` Andrew Jones
2020-01-23 21:47 ` Wainer dos Santos Moschetta
2020-01-24 7:54 ` Andrew Jones
2020-01-24 15:45 ` Philippe Mathieu-Daudé
2020-01-24 15:47 ` Thomas Huth
2020-02-04 21:25 ` Wainer dos Santos Moschetta [this message]
2020-01-22 1:27 ` [PATCH v3 3/4] tests/acceptance: avocado_qemu: Refactor the handler of 'machine' parameter Wainer dos Santos Moschetta
2020-01-30 23:23 ` Philippe Mathieu-Daudé
2020-01-22 1:27 ` [PATCH v3 4/4] travis.yml: Enable acceptance KVM tests Wainer dos Santos Moschetta
2020-01-22 9:11 ` Thomas Huth
2020-01-22 9:22 ` Thomas Huth
2020-01-24 21:15 ` Wainer dos Santos Moschetta
2020-01-27 9:34 ` Thomas Huth
2020-01-24 9:38 ` Philippe Mathieu-Daudé
2020-01-24 9:44 ` Thomas Huth
2020-01-24 9:54 ` Philippe Mathieu-Daudé
2020-01-24 19:55 ` Wainer dos Santos Moschetta
2020-01-27 9:51 ` 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=10433721-2784-b88a-2ee0-c4600b52503d@redhat.com \
--to=wainersm@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=crosa@redhat.com \
--cc=ehabkost@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@redhat.com \
--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).