|
From: | Wainer dos Santos Moschetta |
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 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
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 <address@hidden> --- 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.pyindex 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_lineself.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/address@hidden/msg668697.html
[Prev in Thread] | Current Thread | [Next in Thread] |