qemu-arm
[Top][All Lists]
Advanced

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

Re: [PATCH RESEND v7 5/9] tests/avocado: Pass parameters to migration te


From: Fabiano Rosas
Subject: Re: [PATCH RESEND v7 5/9] tests/avocado: Pass parameters to migration test
Date: Fri, 03 Mar 2023 17:59:29 -0300

Peter Maydell <peter.maydell@linaro.org> writes:

> On Tue, 28 Feb 2023 at 19:28, Fabiano Rosas <farosas@suse.de> wrote:
>>
>> The migration tests are currently broken for an aarch64 host because
>> the tests pass no 'machine' and 'cpu' options on the QEMU command
>> line.
>>
>> Add a separate class to each architecture so that we can specify
>> 'machine' and 'cpu' options instead of relying on defaults.
>>
>> Add a skip decorator to keep the current behavior of only running
>> migration tests when the qemu target matches the host architecture.
>
> I still don't understand this patch. Don't we run the
> migration-test on all hosts already? David ?
>

We run on all hosts but for each host we only take the QEMU binary that
matches the host architecture. So if you want to test aarch64 migration,
you need an aarch64 host.

If you run on an x86_64 host (without this patch):
$ ../configure #all targets
$ make check-avocado AVOCADO_TESTS=../tests/avocado/migration.py

You'll see:

 (1/3) ... migration.py:Migration.test_migration_with_tcp_localhost: PASS (0.21 
s)
 (2/3) ... migration.py:Migration.test_migration_with_unix: PASS (0.18 s)
 (3/3) ... migration.py:Migration.test_migration_with_exec: PASS (0.21 s)

All three tests ran using qemu-system-x86_64.

The issue I'm trying to solve is that when run on a aarch64 host, the
test will fail because (being generic) it doesn't pass the '-machine
virt' option and there is no architecture-specific information in it at
all.

If we need to pass '-machine virt' to the arm machine, then something
needs to change to add architecture-specific knowledge into the test. My
first version hardcoded the usual "if arch == foo". That was frowned
upon, so this version creates a class for each architecture like other
tests do (e.g. boot_linux.py).

The downside of this is that we need to explicitly enumerate the host
architectures on which we want the test to run. I chose a few of the
obvious, but we might need to add more.

The upside is that we could now enable the test to run with all the
targets present in the build. If we remove the @skip decorators from
this patch, we'd get (note the arch strings):

 (01/12) ... migration.py:Aarch64.test_migration_with_tcp_localhost: PASS (0.19 
s)
 (02/12) ... migration.py:Aarch64.test_migration_with_unix: PASS (0.16 s)
 (03/12) ... migration.py:Aarch64.test_migration_with_exec: PASS (0.20 s)
                          ^
 (04/12) ... migration.py:X86_64.test_migration_with_tcp_localhost: PASS (0.21 
s)
 (05/12) ... migration.py:X86_64.test_migration_with_unix: PASS (0.18 s)
 (06/12) ... migration.py:X86_64.test_migration_with_exec: PASS (0.21 s)
                          ^
 (07/12) ... migration.py:PPC64.test_migration_with_tcp_localhost: PASS (0.20 s)
 (08/12) ... migration.py:PPC64.test_migration_with_unix: PASS (0.17 s)
 (09/12) ... migration.py:PPC64.test_migration_with_exec: PASS (0.20 s)
                          ^



reply via email to

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