|
From: | Philippe Mathieu-Daudé |
Subject: | Re: [RFC PATCH v5 7/9] target/avocado: Pass parameters to migration test on aarch64 |
Date: | Mon, 23 Jan 2023 10:06:09 +0100 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 |
On 20/1/23 19:48, Fabiano Rosas 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. Most other architectures define a default value in QEMU for these options, but arm does not.
There was some discussions around that in the past: https://lore.kernel.org/qemu-devel/20190621153806.13489-1-wainersm@redhat.com/ https://lore.kernel.org/qemu-devel/CAFEAcA9NBu+L4wHfkLTv93wy90wjnV05EZ12PT6PmLjdZ5h_YA@mail.gmail.com/
Add these options to the test class in case the test is being executed in an aarch64 host.
I'm not sure what we are aiming to test here. Migration in general? If so, any random machine should work. By hardcoding the 'virt' machine, at least this test is reproducible. I'd rather fix that generically as "if a test requires a default machine and the target doesn't provide any default, then SKIP the test". Then adding machine-specific tests. Can be done on top, so Acked-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Fabiano Rosas <farosas@suse.de> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> --- tests/avocado/migration.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/avocado/migration.py b/tests/avocado/migration.py index 4b25680c50..ffd3db0f35 100644 --- a/tests/avocado/migration.py +++ b/tests/avocado/migration.py @@ -11,6 +11,8 @@import tempfile+import os + from avocado_qemu import QemuSystemTest from avocado import skipUnless@@ -26,6 +28,14 @@ class Migration(QemuSystemTest): timeout = 10 + def setUp(self):+ super().setUp() + + arch = os.uname()[4] + if arch == 'aarch64': + self.machine = 'virt' + self.cpu = 'max' + @staticmethod def migration_finished(vm): return vm.command('query-migrate')['status'] in ('completed', 'failed')
[Prev in Thread] | Current Thread | [Next in Thread] |