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 <waine...@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?
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"),
And also pending:
target/i386/nvmm-all.c: .name = ACCEL_CLASS_NAME("nvmm"),
https://www.mail-archive.com/qemu-devel@nongnu.org/msg668697.html