[PATCH v2 22/23] tests/functional: Convert the rx_gdbsim avocado test into a standalone test

2024-07-24 Thread Thomas Huth
Provide a "gzip_uncompress" function based on the standard "gzip" module to avoid the usage of avocado.utils here. Signed-off-by: Thomas Huth --- Note: Make sure to apply this fix first before running this test: https://lore.kernel.org/qemu-devel/20240724045659.160

[PATCH v2 03/23] tests/Makefile.include: Increase the level of indentation in the help text

2024-07-24 Thread Thomas Huth
The next patch is going to add some entries that need more space between the command and the help text, so let's increase the indentation here first. Signed-off-by: Thomas Huth --- tests/Makefile.include | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions

[PATCH v2 18/23] tests/functional: Convert the ppc_amiga avocado test into a standalone test

2024-07-24 Thread Thomas Huth
Use the Python standard zipfile module instead of avocado.utils for extracting the ZIP file that we download here, and use the standard subprocess module for running the "tail" command. Signed-off-by: Thomas Huth --- tests/functional/meson.build | 1 + .../test_pp

[PATCH v2 09/23] tests/functional: Add a function for extracting files from an archive

2024-07-24 Thread Thomas Huth
provide us with this functionality, so let's just add a nice wrapper function around that. Reviewed-by: Daniel P. Berrangé Signed-off-by: Thomas Huth --- tests/functional/qemu_test/utils.py | 21 + 1 file changed, 21 insertions(+) create mode 100644 tests/functional/qemu_test/utils.py diff --g

[PATCH v2 17/23] tests/functional: Convert most ppc avocado tests into standalone tests

2024-07-24 Thread Thomas Huth
Nothing thrilling in here, just straight forward conversions. Signed-off-by: Thomas Huth --- MAINTAINERS | 8 ++-- tests/functional/meson.build | 10 + .../test_ppc64_powernv.py}| 45

[PATCH v2 23/23] gitlab-ci: Add "check-functional" to the build tests

2024-07-24 Thread Thomas Huth
Now that we converted many tests from the "check-avocado" test suite to the "check-functional" test suite, we should make sure that these also get tested in the CI. Reviewed-by: Daniel P. Berrangé Signed-off-by: Thomas Huth --- TODO: We should also make sure of cachine t

[PATCH v2 12/23] tests/functional: Convert the s390x avocado tests into standalone tests

2024-07-24 Thread Thomas Huth
nowadays. Signed-off-by: Thomas Huth --- MAINTAINERS | 4 +- tests/functional/meson.build | 6 ++ tests/functional/qemu_test/utils.py | 14 .../test_s390x_ccw_virtio.py} | 32 - .../test_s390x_topology.py

[PATCH v2 16/23] tests/functional: Convert the virtio_gpu avocado test into a standalone test

2024-07-24 Thread Thomas Huth
Nothing thrilling in here, it's just a straight forward conversion. Signed-off-by: Thomas Huth --- tests/functional/meson.build | 1 + .../test_virtio_gpu.py} | 34 --- 2 files changed, 16 insertions(+), 19 deletions(-) rename tests

[PATCH v2 19/23] tests/functional: Convert the ppc_hv avocado test into a standalone test

2024-07-24 Thread Thomas Huth
Note: The original Avocado test seems currently to be broken, it hangs when the guest is trying to install additional packages. So mark it as broken for now until it gets fixed. Signed-off-by: Thomas Huth --- .../test_ppc64_hv.py} | 36 --- 1 file changed

[PATCH v2 10/23] tests/functional: Convert some avocado tests that needed avocado.utils.archive

2024-07-24 Thread Thomas Huth
Instead of using the "archive" module from avocado.utils, switch these tests to use the new wrapper function that is based on the "tarfile" module instead. Reviewed-by: Daniel P. Berrangé Signed-off-by: Thomas Huth --- MAINTAINERS | 6 ++-

[PATCH v2 15/23] tests/functional: Convert the riscv_opensbi avocado test into a standalone test

2024-07-24 Thread Thomas Huth
The avocado test defined test functions for both, riscv32 and riscv64. Since we can run the whole file with multiple targets in the new framework, we can now consolidate the functions so we have to only define one function per machine now. Signed-off-by: Thomas Huth --- tests/avocado

[PATCH v2 20/23] tests/functional: Convert the m68k nextcube test with tesseract

2024-07-24 Thread Thomas Huth
The code that handles running of tesseract needs to be tweaked a little bit to be able to run without the functions from avocado.utils, and while we're at it, drop some legacy stuff that was still there due to Tesseract 3 support that we already dropped a while ago. Signed-off-by: Thomas Huth

[PATCH v2 13/23] tests/functional: Convert the x86_cpu_model_versions test

2024-07-24 Thread Thomas Huth
Nothing thrilling in here, it's just a straight forward conversion. Signed-off-by: Thomas Huth --- tests/functional/meson.build | 1 + .../test_x86_cpu_model_versions.py} | 63 ++- 2 files changed, 20 insertions(+), 44 deletions(-) rename tests

[PATCH v2 21/23] tests/functional: Convert the acpi-bits test into a standalone test

2024-07-24 Thread Thomas Huth
Mostly a straight-forward conversion. Looks like we can simply drop the avocado datadrainer stuff when not using the avocado framework anymore. Signed-off-by: Thomas Huth --- .../acpi-bits/bits-config/bits-cfg.txt| 0 .../acpi-bits/bits-tests/smbios.py2 | 0 .../acpi-bits

[PATCH v2 07/23] tests/functional: Implement fetch_asset() method for downloading assets

2024-07-24 Thread Thomas Huth
In the new python test framework, we cannot use the fetch_asset() function from Avocado anymore, so we have to provide our own implementation now instead. Thus add such a function based on the urllib python module for this purpose. Signed-off-by: Thomas Huth --- tests/functional/qemu_test

[PATCH v2 14/23] tests/functional: Convert the microblaze avocado tests into standalone tests

2024-07-24 Thread Thomas Huth
The machine_microblaze.py file contained two tests, one for each endianess. Since we only support one QEMU target binary per file in the new functional test environment, we have to split this file up into two files now. Signed-off-by: Thomas Huth --- MAINTAINERS

[PATCH v2 11/23] tests/functional: Set up logging

2024-07-24 Thread Thomas Huth
Create log files for each test separately, one file that contains the basic logging and one that contains the console output. Reviewed-by: Daniel P. Berrangé Signed-off-by: Thomas Huth --- tests/functional/qemu_test/__init__.py | 26 +- 1 file changed, 25 insertions

[PATCH v2 08/23] tests/functional: Convert some tests that download files via fetch_asset()

2024-07-24 Thread Thomas Huth
Now that we've got a working fetch_asset() function, we can convert some Avocado tests that use this function for downloading their required files. Reviewed-by: Daniel P. Berrangé Signed-off-by: Thomas Huth --- MAINTAINERS | 12 +++ tests/functional

[PATCH v2 05/23] tests/functional: Convert simple avocado tests into standalone python tests

2024-07-24 Thread Thomas Huth
Reviewed-by: Daniel P. Berrangé Signed-off-by: Thomas Huth --- tests/functional/meson.build | 5 ++ .../test_cpu_queries.py} | 7 ++- .../test_empty_cpu_model.py} | 7 ++- .../test_mem_addr_space.py}

[PATCH v2 06/23] tests/functional: Convert avocado tests that just need a small adjustment

2024-07-24 Thread Thomas Huth
. Berrangé Signed-off-by: Thomas Huth --- tests/functional/meson.build | 6 ++ .../test_info_usernet.py} | 11 ++- .../test_ppc_74xx.py} | 74 --- .../version.py => functional/test_version.py} | 13 ++-- 4 files changed,

[PATCH v2 02/23] tests/functional: Add base classes for the upcoming pytest-based tests

2024-07-24 Thread Thomas Huth
that will be set via meson.build later. Signed-off-by: Thomas Huth --- tests/functional/qemu_test/__init__.py | 328 + 1 file changed, 328 insertions(+) create mode 100644 tests/functional/qemu_test/__init__.py diff --git a/tests/functional/qemu_test/__init__.py b/tests

[PATCH v2 01/23] python: Install pycotap in our venv if necessary

2024-07-24 Thread Thomas Huth
not really be a problem). The wheel file has been obtained with: pip download --only-binary :all: --dest . --no-cache pycotap Signed-off-by: Thomas Huth --- python/wheels/pycotap-1.3.1-py3-none-any.whl | Bin 0 -> 5119 bytes pythondeps.toml | 1 + 2 files chan

[PATCH v2 00/23] Convert avocado tests to normal Python unittests

2024-07-24 Thread Thomas Huth
ot about ... in fact, I changed so many things that I also did not dare to pick up the Reviewed-bys from the RFC Thomas Huth (23): python: Install pycotap in our venv if necessary tests/functional: Add base classes for the upcoming pytest-based tests tests/Makefile.include: Increase

[PATCH v2 04/23] tests/functional: Prepare the meson build system for the functional tests

2024-07-24 Thread Thomas Huth
"make check"), while the "thorough" tests should only be run when running a "make check-functional" test run (since these tests might download additional assets from the internet). The changes to the meson.build files are partly based on an earlier patch by Ani Sinha. Signe

Re: [PATCH v1 00/11] Convert avocado tests to normal Python unittests

2024-07-24 Thread Thomas Huth
On 16/07/2024 19.57, Paolo Bonzini wrote: Il mar 16 lug 2024, 13:26 Thomas Huth <mailto:th...@redhat.com>> ha scritto: The Avocado v88 that we use in QEMU is already on a life support system: It is not supported by upstream anymore, and with the latest versions

Re: [PATCH] target/rx: Use target_ulong for address in LI

2024-07-24 Thread Thomas Huth
, static uint32_t li(DisasContext *ctx, int sz) { -int32_t tmp, addr; +target_ulong addr; +uint32_t tmp; CPURXState *env = ctx->env; addr = ctx->base.pc_next; Thank you very much! This fixes the problem for me. Tested-by: Thomas Huth

Re: [PATCH] gitlab-ci: Use -fno-sanitize=function in the clang-user job

2024-07-24 Thread Thomas Huth
On 24/07/2024 01.25, Richard Henderson wrote: With -fsanitize=undefined, which implies -fsanitize=function, clang will add a "type signature" before functions. It accesses funcptr-8 and funcptr-4 to do so. The generated TCG prologue is directly on a page boundary, so these accesses segfault.

Re: [PATCH v3] target/s390x: filter deprecated properties based on model expansion type

2024-07-23 Thread Thomas Huth
On 22/07/2024 16.50, Collin Walling wrote: On 7/20/24 1:33 AM, Markus Armbruster wrote: Collin Walling writes: Currently, there is no way to execute the query-cpu-model-expansion command to retrieve a comprehenisve list of deprecated properties, as the result is dependent per-model. To

[PULL 11/12] tests: increase timeout per instance of bios-tables-test

2024-07-22 Thread Thomas Huth
861-1-imamm...@redhat.com> Acked-by: Michael S. Tsirkin Signed-off-by: Thomas Huth --- tests/qtest/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index 6508bfb1a2..ff9200f882 100644 --- a/tests/qtest/meson.build

[PULL 09/12] hw: Fix crash that happens when introspecting scsi-block on older machine types

2024-07-22 Thread Thomas Huth
y only changing the property on the devices that really have this property. Fixes: b4912afa5f ("scsi-disk: Fix crash for VM configured with USB CDROM after live migration") Message-ID: <20240703090904.909720-1-th...@redhat.com> Acked-by: Hyman Huang Reviewed-by: Philippe Mathieu-Daudé S

[PULL 08/12] tests/avocado/machine_aspeed.py: Increase timeout for TPM test

2024-07-22 Thread Thomas Huth
From: Cédric Le Goater On some runners, test_arm_ast2600_evb_buildroot_tpm can take longer than 90s to complete. Increase timeout for these. Reported-by: Thomas Huth Signed-off-by: Cédric Le Goater Message-ID: <20240722085547.90650-1-...@redhat.com> Signed-off-by: Thomas Huth ---

[PULL 12/12] target/s390x: filter deprecated properties based on model expansion type

2024-07-22 Thread Thomas Huth
eprecated properties that were never otherwise introduced for certain models. Acked-by: David Hildenbrand Suggested-by: Jiri Denemark Signed-off-by: Collin Walling Message-ID: <20240719181741.35146-1-wall...@linux.ibm.com> Signed-off-by: Thomas Huth --- qapi/machine-target.json

[PULL 07/12] tests/avocado: Remove the remainders of the virtiofs_submounts test

2024-07-22 Thread Thomas Huth
The virtiofs_submounts test has been removed in commit 5da7701e2a ("virtiofsd: Remove test"), so we don't need this files anymore. Message-ID: <20240718173125.489901-1-th...@redhat.com> Signed-off-by: Thomas Huth --- .../virtiofs_submounts.py.data/cleanup.sh | 46 -

[PULL 10/12] qtest/fuzz: make range overlap check more readable

2024-07-22 Thread Thomas Huth
t.f...@fujitsu.com> Signed-off-by: Thomas Huth --- tests/qtest/fuzz/generic_fuzz.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/qtest/fuzz/generic_fuzz.c b/tests/qtest/fuzz/generic_fuzz.c index ec842e03c5..d107a496da 100644 --- a/tests/qtest/fuzz/generic_fuzz.c

[PULL 06/12] tests/avocado/mem-addr-space-check: Remove unused "import signal"

2024-07-22 Thread Thomas Huth
The "signal" module is not used here, so we can remove this import statement. Message-ID: <20240719095408.33298-1-th...@redhat.com> Reviewed-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Huth --- tests/avocado/mem-addr-space-check.py | 1 - 1

[PULL 05/12] tests/avocado: Move LinuxTest related code into a separate file

2024-07-22 Thread Thomas Huth
athieu-Daudé Signed-off-by: Thomas Huth --- tests/avocado/avocado_qemu/__init__.py | 239 +- tests/avocado/avocado_qemu/linuxtest.py | 253 tests/avocado/boot_linux.py | 3 +- tests/avocado/hotplug_blk.py| 2 +- tests/a

[PULL 04/12] tests/avocado: Allow overwriting AVOCADO_SHOW env variable

2024-07-22 Thread Thomas Huth
-ID: <20240719180211.48073-1-phi...@linaro.org> Signed-off-by: Thomas Huth --- tests/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index d39d5dd6a4..6618bfed70 100644 --- a/tests/Makefile.include +++ b

[PULL 02/12] tests/avocado/boot_xen.py: unify tags

2024-07-22 Thread Thomas Huth
From: Cleber Rosa Because all tests share the same tags, it's possible to have all of them at the class level. Signed-off-by: Cleber Rosa Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20231208190911.102879-10-cr...@redhat.com> Signed-off-by: Thomas Huth --- tests/avocado/boot_xen.p

[PULL 03/12] tests/avocado/boot_xen.py: use class attribute

2024-07-22 Thread Thomas Huth
From: Cleber Rosa Rather than defining a single use variable, let's just use the class attribute directly. Signed-off-by: Cleber Rosa Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20231208190911.102879-11-cr...@redhat.com> Signed-off-by: Thomas Huth --- tests/avocado/boot_xen.

[PULL 00/12] QTests, Avocado and s390x fixes for 9.1 softfreeze

2024-07-22 Thread Thomas Huth
Mammedov (1): tests: increase timeout per instance of bios-tables-test Philippe Mathieu-Daudé (1): tests/avocado: Allow overwriting AVOCADO_SHOW env variable Thomas Huth (4): tests/avocado: Move LinuxTest related code into a separate file tests/avocado/mem-addr-space-check

[PULL 01/12] tests/avocado/boot_xen.py: merge base classes

2024-07-22 Thread Thomas Huth
. Signed-off-by: Cleber Rosa Message-ID: <20231208190911.102879-9-cr...@redhat.com> Signed-off-by: Thomas Huth --- tests/avocado/boot_xen.py | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/avocado/boot_xen.py b/tests/avocado/boot_xen.py index fc2faeedb5..f80c

Re: [RFC PATCH v4 1/2] target/riscv: Add RISC-V CSR qtest support

2024-07-22 Thread Thomas Huth
On 03/07/2024 10.19, Ivan Klokov wrote: The RISC-V architecture supports the creation of custom CSR-mapped devices. It would be convenient to test them in the same way as MMIO-mapped devices. To do this, a new call has been added to read/write CSR registers. Signed-off-by: Ivan Klokov ---

Re: [RFC PATCH v4 2/2] tests/qtest: QTest example for RISC-V CSR register

2024-07-22 Thread Thomas Huth
On 03/07/2024 10.19, Ivan Klokov wrote: Added demo for reading CSR register from qtest environment. Signed-off-by: Ivan Klokov --- tests/qtest/meson.build | 2 + tests/qtest/riscv-csr-test.c | 86 2 files changed, 88 insertions(+) create mode

Re: [PATCH] tests/avocado/machine_aspeed.py: Increase timeout for TPM test

2024-07-22 Thread Thomas Huth
On 22/07/2024 10.55, Cédric Le Goater wrote: On some runners, test_arm_ast2600_evb_buildroot_tpm can take longer than 90s to complete. Increase timeout for these. Reported-by: Thomas Huth Signed-off-by: Cédric Le Goater --- tests/avocado/machine_aspeed.py | 2 +- 1 file changed, 1

Re: [PATCH] tests: increase timeout per instance of bios-tables-test

2024-07-22 Thread Thomas Huth
On 16/07/2024 14.59, Igor Mammedov wrote: CI often fails 'cross-i686-tci' job due to runner slowness Log shows that test almost complete, with a few remaining when bios-tables-test timeout hits: 19/270 qemu:qtest+qtest-aarch64 / qtest-aarch64/bios-tables-test TIMEOUT610.02s

Re: [PULL 06/27] iotests/{024, 271}: add testcases for qemu-img rebase

2024-07-22 Thread Thomas Huth
On 31/10/2023 19.58, Kevin Wolf wrote: From: Andrey Drobyshev As the previous commit changes the logic of "qemu-img rebase" (it's using write alignment now), let's add a couple more test cases which would ensure it works correctly. In particular, the following scenarios: 024: add test case

Re: [PULL 06/27] iotests/{024, 271}: add testcases for qemu-img rebase

2024-07-22 Thread Thomas Huth
On 31/10/2023 19.58, Kevin Wolf wrote: From: Andrey Drobyshev As the previous commit changes the logic of "qemu-img rebase" (it's using write alignment now), let's add a couple more test cases which would ensure it works correctly. In particular, the following scenarios: 024: add test case

Re: [PATCH] tests/avocado: Move common Avocado tags to class

2024-07-19 Thread Thomas Huth
On 19/07/2024 17.13, Philippe Mathieu-Daudé wrote: When Avocado tags apply to all tests in a class, we can define them once in the class: they will be applied to all test methods. Signed-off-by: Philippe Mathieu-Daudé --- tests/avocado/boot_linux.py | 2 +-

Re: [PATCH v2] target/s390x: filter deprecated properties based on model expansion type

2024-07-19 Thread Thomas Huth
On 18/07/2024 20.22, Collin Walling wrote: On 7/18/24 9:39 AM, Markus Armbruster wrote: Collin Walling writes: As s390 CPU models progress and deprecated properties are dropped outright, it will be cumbersome for management apps to query the host for a comprehensive list of deprecated

[PATCH] tests/avocado/mem-addr-space-check: Remove unused "import signal"

2024-07-19 Thread Thomas Huth
The "signal" module is not used here, so we can remove this import statement. Signed-off-by: Thomas Huth --- tests/avocado/mem-addr-space-check.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/avocado/mem-addr-space-check.py b/tests/avocado/mem-addr-space-check.py index

[PATCH] tests/avocado: Move LinuxTest related code into a separate file

2024-07-19 Thread Thomas Huth
Only some few tests are using the LinuxTest class. Move the related code into a separate file so that this does not pollute the main namespace. Signed-off-by: Thomas Huth --- tests/avocado/avocado_qemu/__init__.py | 239 +- tests/avocado/avocado_qemu/linuxtest.py | 253

[PATCH] tests/avocado: Remove the remainders of the virtiofs_submounts test

2024-07-18 Thread Thomas Huth
The virtiofs_submounts test has been removed in commit 5da7701e2a ("virtiofsd: Remove test"), so we don't need this files anymore. Signed-off-by: Thomas Huth --- .../virtiofs_submounts.py.data/cleanup.sh | 46 -- .../guest-cleanup.sh

[PATCH] tests/avocado: Remove the remainders of the virtiofs_submounts test

2024-07-18 Thread Thomas Huth
The virtiofs_submounts test has been removed in commit 5da7701e2a ("virtiofsd: Remove test"), so we don't need this files anymore. Signed-off-by: Thomas Huth --- .../virtiofs_submounts.py.data/cleanup.sh | 46 -- .../guest-cleanup.sh

Re: [PATCH 1/2] ci: add gtk-vnc to the deps

2024-07-18 Thread Thomas Huth
+ - gtk-vnc - hostname - json-c - libaio Reviewed-by: Thomas Huth IIRC Alex has a patch in his queue already to refresh the docker images, maybe he could include this change there, too...?

Re: [PATCH 04/11] tests/functional: Add python-based tests to the meson build system

2024-07-17 Thread Thomas Huth
On 16/07/2024 17.15, Fabiano Rosas wrote: Thomas Huth writes: Integrate the new python-based test framework with the meson build system. Since these tests now require the pycotap module, make sure that it gets installed in the venv. The changes to the meson.build files are partly based

Re: [PATCH v1 00/11] Convert avocado tests to normal Python unittests

2024-07-17 Thread Thomas Huth
On 17/07/2024 10.37, Daniel P. Berrangé wrote: On Wed, Jul 17, 2024 at 10:04:19AM +0200, Thomas Huth wrote: On 16/07/2024 19.03, Thomas Huth wrote: On 16/07/2024 18.51, Daniel P. Berrangé wrote: On Tue, Jul 16, 2024 at 01:26:03PM +0200, Thomas Huth wrote: ... So instead of trying to update

Re: [PATCH v1 00/11] Convert avocado tests to normal Python unittests

2024-07-17 Thread Thomas Huth
On 16/07/2024 19.03, Thomas Huth wrote: On 16/07/2024 18.51, Daniel P. Berrangé wrote: On Tue, Jul 16, 2024 at 01:26:03PM +0200, Thomas Huth wrote: ... So instead of trying to update the python-based test suite in QEMU to a newer version of Avocado, we should maybe try to better integrate

Re: [RFC PATCH 0/8] Convert avocado tests to normal Python unittests

2024-07-17 Thread Thomas Huth
On 16/07/2024 20.03, Paolo Bonzini wrote: Il mar 16 lug 2024, 18:45 John Snow > ha scritto: My only ask is that we keep the tests running in the custom venv environment we set up at build time Yes, they do, however pytest should also be added to

Re: [RFC PATCH 0/8] Convert avocado tests to normal Python unittests

2024-07-17 Thread Thomas Huth
On 16/07/2024 18.45, John Snow wrote: On Thu, Jul 11, 2024, 7:55 AM Thomas Huth <mailto:th...@redhat.com>> wrote: ... - I haven't looked into logging yet ... this still needs some work   so that you could e.g. inspect the console output of the guests   somewhe

Re: [PATCH] tests: increase timeout per instance of bios-tables-test

2024-07-16 Thread Thomas Huth
On 16/07/2024 15.06, Michael S. Tsirkin wrote: On Tue, Jul 16, 2024 at 02:59:30PM +0200, Igor Mammedov wrote: CI often fails 'cross-i686-tci' job due to runner slowness Log shows that test almost complete, with a few remaining when bios-tables-test timeout hits: 19/270

Re: [PATCH v1 00/11] Convert avocado tests to normal Python unittests

2024-07-16 Thread Thomas Huth
On 16/07/2024 18.51, Daniel P. Berrangé wrote: On Tue, Jul 16, 2024 at 01:26:03PM +0200, Thomas Huth wrote: ... So instead of trying to update the python-based test suite in QEMU to a newer version of Avocado, we should maybe try to better integrate it with the meson test runner instead

[PATCH 08/11] tests/functional: Convert some avocado tests that needed avocado.utils.archive

2024-07-16 Thread Thomas Huth
Instead of using the "archive" module from avocado.utils, switch these tests to use the new wrapper function that is based on the "tarfile" module instead. Signed-off-by: Thomas Huth --- MAINTAINERS | 6 ++--- tests/functional/meson.build

[PATCH 05/11] tests/functional: Implement fetch_asset() method for downloading assets

2024-07-16 Thread Thomas Huth
In the new python test framework, we cannot use the fetch_asset() function from Avocado anymore, so we have to provide our own implementation now instead. Thus add such a function based on the urllib python module for this purpose. Signed-off-by: Thomas Huth --- tests/functional/qemu_test

[PATCH 01/11] tests/functional: Add base classes for the upcoming pytest-based tests

2024-07-16 Thread Thomas Huth
that will be set via meson.build later. Signed-off-by: Thomas Huth --- tests/functional/qemu_test/__init__.py | 326 + 1 file changed, 326 insertions(+) create mode 100644 tests/functional/qemu_test/__init__.py diff --git a/tests/functional/qemu_test/__init__.py b/tests

[PATCH 07/11] tests/functional: Add a function for extracting files from an archive

2024-07-16 Thread Thomas Huth
provide us with this functionality, so let's just add a nice wrapper function around that. Signed-off-by: Thomas Huth --- tests/functional/qemu_test/utils.py | 21 + 1 file changed, 21 insertions(+) create mode 100644 tests/functional/qemu_test/utils.py diff --git a/tests/functional/qemu_test/u

[PATCH 03/11] tests/functional: Convert avocado tests that just need a small adjustment

2024-07-16 Thread Thomas Huth
These simple tests can be converted to stand-alone tests quite easily, e.g. by just setting the machine to 'none' now manually or by adding "-cpu" command line parameters, since we don't support the corresponding avocado tags in the new python test framework. Signed-off-by: T

[PATCH 11/11] gitlab-ci: Add "check-functional" to the build tests

2024-07-16 Thread Thomas Huth
Now that we converted many tests from the "check-avocado" test suite to the "check-functional" test suite, we should make sure that these also get tested in the CI. Signed-off-by: Thomas Huth --- .gitlab-ci.d/buildtest-template.yml | 3 +- .gitlab-ci.d/buildte

[PATCH 04/11] tests/functional: Add python-based tests to the meson build system

2024-07-16 Thread Thomas Huth
Integrate the new python-based test framework with the meson build system. Since these tests now require the pycotap module, make sure that it gets installed in the venv. The changes to the meson.build files are partly based on an earlier patch by Ani Sinha (but heavily modified by Thomas Huth

[PATCH 10/11] tests/functional: Convert the s390x avocado tests into standalone tests

2024-07-16 Thread Thomas Huth
nowadays. Signed-off-by: Thomas Huth --- MAINTAINERS | 4 +- tests/functional/meson.build | 6 ++ tests/functional/qemu_test/utils.py | 7 ++ .../test_s390x_ccw_virtio.py} | 32 - .../test_s390x_topology.py

[PATCH 09/11] tests/functional: Set up logging

2024-07-16 Thread Thomas Huth
Create log files for each test separately, one file that contains the basic logging and one that contains the console output. Signed-off-by: Thomas Huth --- tests/functional/qemu_test/__init__.py | 24 +++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/tests

[PATCH 02/11] tests/functional: Convert simple avocado tests into standalone python tests

2024-07-16 Thread Thomas Huth
Signed-off-by: Thomas Huth --- .../test_cpu_queries.py} | 7 ++- .../test_empty_cpu_model.py} | 7 ++- .../test_mem_addr_space.py} | 53 +++ .../test_pc_cpu_hotplug_props.py} | 11 ++-- .../test_virtio_

[PATCH 06/11] tests/functional: Convert some tests that download files via fetch_asset()

2024-07-16 Thread Thomas Huth
Now that we've got a working fetch_asset() function, we can convert some Avocado tests that use this function for downloading their required files. Signed-off-by: Thomas Huth --- MAINTAINERS | 12 +++ tests/functional/meson.build | 25

[PATCH v1 00/11] Convert avocado tests to normal Python unittests

2024-07-16 Thread Thomas Huth
ab-CI - ... lots of other changes I forgot about ... in fact, I changed so many things that I also did not dare to pick up the Reviewed-bys from the RFC Thomas Huth (11): tests/functional: Add base classes for the upcoming pytest-based tests tests/functional: Convert simple avocado tests into

Re: FreeBSD update required for CI?

2024-07-16 Thread Thomas Huth
On 16/07/2024 01.00, Richard Henderson wrote: Hi guys, CI currently failing FreeBSD: https://gitlab.com/qemu-project/qemu/-/jobs/7347517439 pkg: No packages available to install matching 'py39-pillow' have been found in the repositories pkg: No packages available to install matching

Re: [RFC PATCH 4/8] tests/pytest: add pytest to the meson build system

2024-07-12 Thread Thomas Huth
On 12/07/2024 13.47, Daniel P. Berrangé wrote: On Fri, Jul 12, 2024 at 12:14:45PM +0200, Thomas Huth wrote: On 12/07/2024 11.01, Daniel P. Berrangé wrote: On Thu, Jul 11, 2024 at 01:55:42PM +0200, Thomas Huth wrote: From: Ani Sinha Integrate the pytest framework with the meson build system

Re: [RFC PATCH 4/8] tests/pytest: add pytest to the meson build system

2024-07-12 Thread Thomas Huth
On 12/07/2024 12.26, Daniel P. Berrangé wrote: On Fri, Jul 12, 2024 at 12:14:45PM +0200, Thomas Huth wrote: On 12/07/2024 11.01, Daniel P. Berrangé wrote: On Thu, Jul 11, 2024 at 01:55:42PM +0200, Thomas Huth wrote: From: Ani Sinha Integrate the pytest framework with the meson build system

Re: [RFC PATCH 7/8] tests/pytest: Add a function for extracting files from an archive

2024-07-12 Thread Thomas Huth
On 12/07/2024 11.14, Daniel P. Berrangé wrote: On Thu, Jul 11, 2024 at 01:55:45PM +0200, Thomas Huth wrote: Some Avocado-based tests use the "archive" module from avocado.utils to extract files from an archive. To be able to use these tests without Avocado, we have to provide our ow

Re: [RFC PATCH 4/8] tests/pytest: add pytest to the meson build system

2024-07-12 Thread Thomas Huth
On 12/07/2024 11.01, Daniel P. Berrangé wrote: On Thu, Jul 11, 2024 at 01:55:42PM +0200, Thomas Huth wrote: From: Ani Sinha Integrate the pytest framework with the meson build system. This will make meson run all the pytests under the pytest directory. Lets add a note about the compelling

Re: [RFC PATCH 5/8] tests_pytest: Implement fetch_asset() method for downloading assets

2024-07-12 Thread Thomas Huth
On 12/07/2024 11.09, Daniel P. Berrangé wrote: On Thu, Jul 11, 2024 at 01:55:43PM +0200, Thomas Huth wrote: In the pytests, we cannot use the fetch_asset() function from Avocado anymore, so we have to provide our own implementation now instead. Thus add such a function based

Re: [RFC PATCH 5/8] tests_pytest: Implement fetch_asset() method for downloading assets

2024-07-11 Thread Thomas Huth
On 11/07/2024 23.35, Richard Henderson wrote: On 7/11/24 12:23, Alex Bennée wrote: Richard Henderson writes: On 7/11/24 09:45, Richard Henderson wrote: On 7/11/24 04:55, Thomas Huth wrote: +    def fetch_asset(self, url, asset_hash): +    cache_dir = os.path.expanduser("~/.cache

Re: [RFC PATCH 5/8] tests_pytest: Implement fetch_asset() method for downloading assets

2024-07-11 Thread Thomas Huth
On 11/07/2024 20.49, Richard Henderson wrote: On 7/11/24 09:45, Richard Henderson wrote: On 7/11/24 04:55, Thomas Huth wrote: +    def fetch_asset(self, url, asset_hash): +    cache_dir = os.path.expanduser("~/.cache/qemu/download") +    if not os.path.exists

Re: [RFC PATCH 5/8] tests_pytest: Implement fetch_asset() method for downloading assets

2024-07-11 Thread Thomas Huth
On 11/07/2024 18.45, Richard Henderson wrote: On 7/11/24 04:55, Thomas Huth wrote: +    def fetch_asset(self, url, asset_hash): +    cache_dir = os.path.expanduser("~/.cache/qemu/download") +    if not os.path.exists(cache_dir): +    os.makedirs(cache_dir) +   

Re: [RFC PATCH 0/8] Convert avocado tests to normal Python unittests

2024-07-11 Thread Thomas Huth
On 11/07/2024 16.39, Fabiano Rosas wrote: Thomas Huth writes: ... Things that need further attention though: - All tests that use the LinuxTest / LinuxDistro classes (e.g. based on cloud-init images) really depend on the Avocado framework, thus we'd need a solution for those if we want

Re: Avocado 88.1 vs Python 3.12

2024-07-11 Thread Thomas Huth
On 10/07/2024 01.45, Richard Henderson wrote: On 7/9/24 09:26, Philippe Mathieu-Daudé wrote: On 9/7/24 17:41, Richard Henderson wrote: Hi guys, I have reinstalled my development box to ubuntu 24 (because the Rust support is better than my previous install; ho hum).  I thought I had tested

[RFC PATCH 3/8] tests/pytest: Convert info_usernet and version test with small adjustments

2024-07-11 Thread Thomas Huth
These two simple tests can be converted to a pytest quite easily, we just have to set the machine to 'none' now manually since we don't support the avocado tags here yet. Signed-off-by: Thomas Huth --- .../info_usernet.py => pytest/test_info_usernet.py} | 6 ++ tests/{avoc

[RFC PATCH 5/8] tests_pytest: Implement fetch_asset() method for downloading assets

2024-07-11 Thread Thomas Huth
In the pytests, we cannot use the fetch_asset() function from Avocado anymore, so we have to provide our own implementation now instead. Thus add such a function based on the _download_with_cache() function from tests/vm/basevm.py for this purpose. Signed-off-by: Thomas Huth --- tests/pytest

[RFC PATCH 4/8] tests/pytest: add pytest to the meson build system

2024-07-11 Thread Thomas Huth
From: Ani Sinha Integrate the pytest framework with the meson build system. This will make meson run all the pytests under the pytest directory. Signed-off-by: Ani Sinha [thuth: Removed the acpi-bits and adjusted for converted avocado tests instead] Signed-off-by: Thomas Huth --- tests

[RFC PATCH 7/8] tests/pytest: Add a function for extracting files from an archive

2024-07-11 Thread Thomas Huth
provide us with this functionality, so let's just add a nice wrapper function around that. Signed-off-by: Thomas Huth --- tests/pytest/qemu_pytest/utils.py | 21 + 1 file changed, 21 insertions(+) create mode 100644 tests/pytest/qemu_pytest/utils.py diff --git a/tests/pytest/qemu_pytest/utils.p

[RFC PATCH 8/8] tests/pytest: Convert avocado test that needed avocado.utils.archive

2024-07-11 Thread Thomas Huth
Instead of using the "archive" module from avocado.utils, switch these tests to use the new wrapper function that is based on the "tarfile" module instead. Signed-off-by: Thomas Huth --- tests/pytest/meson.build | 5 + .../te

[RFC PATCH 6/8] tests/pytest: Convert some tests that download files via fetch_asset()

2024-07-11 Thread Thomas Huth
Now that we've got a working fetch_asset() function, we can convert some Avocado tests that use this function for downloading their required files. Signed-off-by: Thomas Huth --- tests/pytest/meson.build | 16 +++ .../test_machine_arm_n8x0.py

[RFC PATCH 2/8] tests/pytest: Convert some simple avocado tests into pytests

2024-07-11 Thread Thomas Huth
e PYTEST_QEMU_BINARY environment variable, and the source and build directories via the PYTEST_SOURCE_ROOTand PYTEST_BUILD_ROOT environment variables. Signed-off-by: Thomas Huth --- tests/{avocado/cpu_queries.py => pytest/test_cpu_queries.py} | 2 +- .../empty_cpu_model.py => pyte

[RFC PATCH 1/8] tests/pytest: Add base classes for the upcoming pytest-based tests

2024-07-11 Thread Thomas Huth
that will be set via meson.build later. Signed-off-by: Thomas Huth --- tests/pytest/qemu_pytest/__init__.py | 344 +++ 1 file changed, 344 insertions(+) create mode 100644 tests/pytest/qemu_pytest/__init__.py diff --git a/tests/pytest/qemu_pytest/__init__.py b/tests/pytest

[RFC PATCH 0/8] Convert avocado tests to normal Python unittests

2024-07-11 Thread Thomas Huth
rk on documentation updates yet (will do that if we agree to continue with this patch series) What's your thoughts? Is it worth to continue with this approach? Or shall I rather forget about it and wait for the Avocado version update? Thomas Ani Sinha (1): tests/pytest: add pytest t

[PATCH] tests/avocado: Remove the non-working virtio_check_params test

2024-07-10 Thread Thomas Huth
The test has been marked as broken more than 4 years ago, and so far nobody ever cared to fix it. Thus let's simply remove it now ... if somebody ever needs it again, they can restore the file from an older version of QEMU. Signed-off-by: Thomas Huth --- tests/avocado/virtio_check_params.py

[PATCH] tests/avocado: Remove non-working sparc leon3 test

2024-07-10 Thread Thomas Huth
The test has been marked as broken more than 4 years ago, and so far nobody ever cared to fix it. Thus let's simply remove it now ... if somebody ever needs it again, they can restore the file from an older version of QEMU. Signed-off-by: Thomas Huth --- tests/avocado/machine_sparc_leon3.py

Re: [PATCH v3 9/9] tests/qtest: Delete previous boot file

2024-07-08 Thread Thomas Huth
insertions(+), 7 deletions(-) Acked-by: Thomas Huth

Re: [PATCH v3 9/9] tests/qtest: Delete previous boot file

2024-07-08 Thread Thomas Huth
insertions(+), 7 deletions(-) Acked-by: Thomas Huth

Re: Syncing the guest display resolution with the host in fullscreen

2024-07-08 Thread Thomas Huth
On 06/07/2024 00.46, Anton Shepelev wrote: Thomas Huth: I had a quick look, but if I got this right, 1366x768 is not a mode that fits into the standard EDID information, since 1366 is not dividable by 8. Thank you very much Thomas. That also explains why get- edid(1) does not work

Re: [PATCH v2 20/40] gitlab: don't bother with KVM for TCI builds

2024-07-07 Thread Thomas Huth
On 05/07/2024 23.44, Philippe Mathieu-Daudé wrote: On 5/7/24 18:49, Thomas Huth wrote: On 05/07/2024 18.34, Philippe Mathieu-Daudé wrote: On 5/7/24 10:40, Alex Bennée wrote: In fact any other accelerator would be pointless as the point is to exercise the TCI accelerator anyway. Signed-off

Re: Syncing the guest display resolution with the host in fullscreen

2024-07-05 Thread Thomas Huth
On 05/07/2024 18.19, Thomas Huth wrote: On 04/07/2024 10.41, Anton Shepelev wrote: I wrote: May I request assistance in utilizing QEMU via Termux to operate virtual I want to configure QEmu to run my Windows XP guest in fullscreen and at my display's native resolution (1366x768).  I think

  1   2   3   4   5   6   7   8   9   10   >