qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 2/4] tests/acceptance: boot_linux_console: Add boot Linux


From: Thomas Huth
Subject: Re: [PATCH v3 2/4] tests/acceptance: boot_linux_console: Add boot Linux with kvm tests
Date: Fri, 24 Jan 2020 16:47:45 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

On 24/01/2020 16.45, 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.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/address@hidden/msg668697.html

Is anybody running any of these in a CI environment?

 Thomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]