aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-09-04hw/arm: xenpvh: Reverse virtio-mmio creation orderEdgar E. Iglesias1-1/+12
We've been creating the virtio-mmio devices in forwards order but since the qbus lists prepend (rather than append) entries, the virtio busses end up with decreasing base address order. Xen enables virtio-mmio nodes in forwards order so there's been a missmatch. So far, we've been working around this with an out-of-tree patch to Xen. This reverses the order making sure the virtio busses end up ordered with increasing base addresses avoiding the need to patch Xen. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Acked-by: Stefano Stabellini <sstabellini@kernel.org>
2024-09-04hw/arm: xenpvh: Rename xen_arm.c -> xen-pvh.cEdgar E. Iglesias2-1/+1
Rename xen_arm.c -> xen-pvh.c to better express that this is a PVH machine and to align with x86 HVM and future PVH machine filenames: hw/i386/xen/xen-hvm.c hw/i386/xen/xen-pvh.c (in preparation) No functional changes. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
2024-09-04hw/arm: xenpvh: Break out a common PVH machineEdgar E. Iglesias6-184/+358
Break out a common Xen PVH machine in preparation for adding a x86 Xen PVH machine. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
2024-09-04hw/arm: xenpvh: Move stubbed functions to xen-stubs.cEdgar E. Iglesias3-21/+36
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
2024-09-04hw/arm: xenpvh: Remove double-negation in warningEdgar E. Iglesias1-1/+1
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
2024-09-04hw/arm: xenpvh: Add support for SMP guestsEdgar E. Iglesias1-2/+21
Add SMP support for Xen PVH ARM guests. Create ms->smp.max_cpus ioreq servers to handle hotplug. Note that ms->smp.max_cpus will be passed to us by the user (Xen tools) set to the guests maxvcpus. The value in mc->max_cpus is an absolute maximum for the -smp option and won't be used to setup ioreq servers unless the user explicitly specifies it with -smp. If the user doesn't pass -smp on the command-line, smp.cpus and smp.max_cpus will default to 1. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
2024-09-04hw/arm: xenpvh: Tweak machine descriptionEdgar E. Iglesias1-1/+1
Tweak machine description to better express that this is a Xen PVH machine for ARM. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
2024-09-04hw/arm: xenpvh: Update file header to use SPDXEdgar E. Iglesias1-18/+1
Update file header to use SPDX and remove stray empty comment line. No functional changes. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Acked-by: Stefano Stabellini <sstabellini@kernel.org>
2024-09-04MAINTAINERS: Add docs/system/arm/xenpvh.rstEdgar E. Iglesias1-0/+1
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Acked-by: Stefano Stabellini <sstabellini@kernel.org>
2024-09-04Merge tag 'hppa-v9.1-fixes-pull-request' of ↵Peter Maydell2-3/+3
https://github.com/hdeller/qemu-hppa into staging hppa target fixes Two important patches for the hppa target which missed qemu-v9.1: - One fix for random linux-user crashes - One fix for random issues due to loosing the division V-bit during delivery of hardware interrupts. This triggers all sorts of random faults when running in system mode. Helge # -----BEGIN PGP SIGNATURE----- # # iHUEABYKAB0WIQS86RI+GtKfB8BJu973ErUQojoPXwUCZtgy9AAKCRD3ErUQojoP # X068AQCDCwbzsoQpFX/6Kx2lm3UsW4wrESh/CYcP+epd+X59dAD+LxNwN0ol5Gvl # kPzM+7QdKC7geIXvBxIG6UuggTscJgM= # =9roy # -----END PGP SIGNATURE----- # gpg: Signature made Wed 04 Sep 2024 11:14:12 BST # gpg: using EDDSA key BCE9123E1AD29F07C049BBDEF712B510A23A0F5F # gpg: Good signature from "Helge Deller <deller@gmx.de>" [unknown] # gpg: aka "Helge Deller <deller@kernel.org>" [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 4544 8228 2CD9 10DB EF3D 25F8 3E5F 3D04 A7A2 4603 # Subkey fingerprint: BCE9 123E 1AD2 9F07 C049 BBDE F712 B510 A23A 0F5F * tag 'hppa-v9.1-fixes-pull-request' of https://github.com/hdeller/qemu-hppa: target/hppa: Fix random 32-bit linux-user crashes target/hppa: Fix PSW V-bit packaging in cpu_hppa_get for hppa64 Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2024-09-04docs/devel/testing: Add documentation for functional testsThomas Huth3-0/+351
Document the new functional testing framework. The text is originally based on the Avocado documentation, but heavily modified to match the new framework. Message-ID: <20240830133841.142644-45-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04docs/devel/testing: Rename avocado_qemu.Test classThomas Huth1-16/+16
The avocado_qemu.Test class has been renamed a while back in commit 2283b627bc ("tests/avocado: Rename avocado_qemu.Test -> QemuSystemTest"), so we should reflect this now in the documentation, too. Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <20240830133841.142644-44-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04docs/devel/testing: Split the Avocado documentation into a separate fileThomas Huth3-564/+583
The main testing documentation file got very overloaded already. Thus let's split the Avocado information into a separate file. Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <20240830133841.142644-43-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04docs/devel: Split testing docs from the build docs and move to separate folderThomas Huth12-10/+19
Building and testing are two separate topics, so let's split the testing into a separate category and move the related files into a separate folder. Message-ID: <20240830133841.142644-42-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04gitlab-ci: Add "check-functional" to the build testsThomas Huth2-33/+41
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é <berrange@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240830133841.142644-41-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04tests/avocado: Remove unused QemuUserTest classPhilippe Mathieu-Daudé1-17/+0
The single test that was using the QemuUserTest class has been converted to the functional test framework. This class is now unused, remove it. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240822104238.75045-4-philmd@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-ID: <20240830133841.142644-40-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04tests/functional: Convert ARM bFLT linux-user avocado testPhilippe Mathieu-Daudé4-54/+57
Straight forward conversion. Update the SHA1 hashes to SHA256 hashes since SHA1 should not be used anymore nowadays. Expose cpio_extract() in qemu_test.utils for possible reuse. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240822104238.75045-3-philmd@linaro.org> [thuth: Add test to meson.build] Message-ID: <20240830133841.142644-39-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04tests/functional: Add QemuUserTest classPhilippe Mathieu-Daudé2-1/+18
Per commit 5334df4822 ("tests/avocado: Introduce QemuUserTest base class"): Similarly to the 'System' Test base class with methods for testing system emulation, the QemuUserTest class contains methods useful to test user-mode emulation. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240822104238.75045-2-philmd@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-ID: <20240830133841.142644-38-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04tests/functional: Convert mips64el Fuloong2e avocado test (1/2)Philippe Mathieu-Daudé3-16/+23
Straight forward conversion. Update the SHA1 hashes to SHA256 hashes since SHA1 should not be used anymore nowadays. Since the asset is expected locally and the test is guarded with RESCUE_YL_PATH, keep it under the 'quick' category. $ RESCUE_YL_PATH=/path/to/rescue-yl QEMU_TEST_ALLOW_UNTRUSTED_CODE=1 \ make check-functional-mips64el 1/4 qemu:func-quick+func-mips64el / func-mips64el-empty_cpu_model OK 0.12s 1 subtests passed 2/4 qemu:func-quick+func-mips64el / func-mips64el-version OK 0.13s 1 subtests passed 3/4 qemu:func-quick+func-mips64el / func-mips64el-info_usernet OK 0.15s 1 subtests passed 4/4 qemu:func-quick+func-mips64el / func-mips64el-mips64el_fuloong2e OK 0.19s 1 subtests passed Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240827094905.80648-2-philmd@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-ID: <20240830133841.142644-37-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04tests/functional: Convert Aarch64 Virt machine avocado testsPhilippe Mathieu-Daudé5-44/+46
Straight forward conversion. Update the SHA1 hash to SHA256 since SHA1 should not be used anymore nowadays. Provide get_qemu_img() helper in qemu_test. $ make check-functional-aarch64 V=1 ▶ 1/4 test_aarch64_virt.Aarch64VirtMachine.test_aarch64_virt_gicv2 OK ▶ 1/4 test_aarch64_virt.Aarch64VirtMachine.test_aarch64_virt_gicv3 OK ▶ 1/4 test_aarch64_virt.Aarch64VirtMachine.test_alpine_virt_tcg_gic_max OK 1/4 qemu:func-thorough+func-aarch64-thorough+thorough / func-aarch64-aarch64_virt OK 30.44s 3 subtests passed ... Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240826103634.52384-1-philmd@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-ID: <20240830133841.142644-36-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04tests/functional: Convert Aarch64 SBSA-Ref avocado testsPhilippe Mathieu-Daudé3-100/+55
Straight forward conversion. Since SBSA_FLASH files are not tarballs, use lzma_uncompress() method. Avocado used to set a timeout of 11 tests * 180s = 1980s. Hopefully 600s should be sufficient. Running on macOS Sonoma / Apple silicon M1: $ QEMU_TEST_TIMEOUT_EXPECTED=1 make check-functional-aarch64 V=1 ▶ 1/5 test_aarch64_sbsaref.Aarch64SbsarefMachine.test_sbsaref_alpine_linux_max OK ▶ 1/5 test_aarch64_sbsaref.Aarch64SbsarefMachine.test_sbsaref_alpine_linux_max_pauth_impdef OK ▶ 1/5 test_aarch64_sbsaref.Aarch64SbsarefMachine.test_sbsaref_alpine_linux_max_pauth_off OK ▶ 1/5 test_aarch64_sbsaref.Aarch64SbsarefMachine.test_sbsaref_alpine_linux_neoverse_n1 OK ▶ 1/5 test_aarch64_sbsaref.Aarch64SbsarefMachine.test_sbsaref_edk2_firmware OK ▶ 1/5 test_aarch64_sbsaref.Aarch64SbsarefMachine.test_sbsaref_openbsd73_cortex_a57 OK ▶ 1/5 test_aarch64_sbsaref.Aarch64SbsarefMachine.test_sbsaref_openbsd73_max OK ▶ 1/5 test_aarch64_sbsaref.Aarch64SbsarefMachine.test_sbsaref_openbsd73_max_pauth_impdef OK ▶ 1/5 test_aarch64_sbsaref.Aarch64SbsarefMachine.test_sbsaref_openbsd73_max_pauth_off OK ▶ 1/5 test_aarch64_sbsaref.Aarch64SbsarefMachine.test_sbsaref_openbsd73_neoverse_n1 OK 1/5 qemu:func-thorough+func-aarch64-thorough+thorough / func-aarch64-aarch64_sbsaref OK 241.79s 11 subtests passed ... Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240823131614.10269-1-philmd@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> Message-ID: <20240830133841.142644-35-thuth@redhat.com> [thuth: remove remaining Avocado tags] Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04tests/functional: Convert ARM Integrator/CP avocado testsPhilippe Mathieu-Daudé3-26/+33
Straight forward conversion. Update the SHA1 hashes to SHA256 hashes since SHA1 should not be used anymore nowadays. $ QEMU_TEST_ALLOW_UNTRUSTED_CODE=1 make check-functional-arm ... 6/6 qemu:func-thorough+func-arm-thorough+thorough / func-arm-arm_integratorcp OK 3.90s 2 subtests passed Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240822110238.82312-1-philmd@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-ID: <20240830133841.142644-34-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04tests/functional: Convert the linux_initrd avocado test into a standalone testThomas Huth2-16/+22
While we're at it, update the SHA1 hashes to SHA256 hashes since SHA1 should not be used anymore nowadays. Message-ID: <20240830133841.142644-32-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04tests/functional: Convert the rx_gdbsim avocado test into a standalone testThomas Huth4-26/+46
Provide a "gzip_uncompress" function based on the standard "gzip" module to avoid the usage of avocado.utils here. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240830133841.142644-31-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04tests/functional: Convert the acpi-bits test into a standalone testThomas Huth9-80/+71
Mostly a straight-forward conversion. Looks like we can simply drop the avocado datadrainer stuff when not using the avocado framework anymore. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240830133841.142644-30-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04tests/functional: Convert the m68k nextcube test with tesseractThomas Huth5-59/+56
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. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240830133841.142644-29-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04tests/functional: Convert the ppc_hv avocado test into a standalone testThomas Huth3-32/+24
A straight forward conversion, we just also have to remove the decorator @skipUnless(os.getenv('SPEED')) since all non-trivial functional tests are running in SPEED=thorough mode now. Also make sure that the extracted assets are writable, so that the test does not fail if it gets re-run and there are stale read-only files already around. Message-ID: <20240830133841.142644-28-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04tests/functional: Convert the ppc_amiga avocado test into a standalone testThomas Huth4-38/+45
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. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240830133841.142644-27-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04tests/functional: Convert most ppc avocado tests into standalone testsThomas Huth7-142/+113
Nothing thrilling in here, just straight forward conversions. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240830133841.142644-26-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04tests/functional: Convert the virtio_gpu avocado test into a standalone testThomas Huth2-35/+30
Nothing thrilling in here, it's just a straight forward conversion. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240830133841.142644-25-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04tests/functional: Convert the microblaze avocado tests into standalone testsThomas Huth5-62/+91
The machine_microblaze.py file contained two tests, one for each endianness. 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. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240830133841.142644-23-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04tests/functional: Convert the x86_cpu_model_versions testThomas Huth3-46/+21
Nothing thrilling in here, it's just a straight forward conversion. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240830133841.142644-22-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04tests/functional: Convert the s390x avocado tests into standalone testsThomas Huth5-95/+94
These tests use archive.lzma_uncompress() from the Avocado utils, so provide a small helper function for this, based on the standard lzma module from Python instead. And while we're at it, replace the MD5 hashes in the topology test with proper SHA256 hashes, since MD5 should not be used anymore nowadays. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240830133841.142644-21-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04tests/functional: Convert some avocado tests that needed avocado.utils.archiveThomas Huth6-68/+87
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é <berrange@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240830133841.142644-20-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04tests/functional: Add a function for extracting files from an archiveThomas Huth1-0/+21
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 own function for extracting files. Fortunately, there is already the tarfile module that will provide us with this functionality, so let's just add a nice wrapper function around that. Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <20240830133841.142644-19-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04tests/functional: Convert some tests that download files via fetch_asset()Thomas Huth9-125/+137
Now that we've got the Asset class with pre-caching, we can convert some Avocado tests that use fetch_asset() for downloading their required files. Message-ID: <20240830133841.142644-18-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04tests/functional: Allow asset downloading with concurrent threadsThomas Huth1-11/+51
When running "make -j$(nproc) check-functional", tests that use the same asset might be running in parallel. Improve the downloading to detect this situation and wait for the other thread to finish the download. Message-ID: <20240830133841.142644-17-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04tests/functional: enable pre-emptive caching of assetsDaniel P. Berrangé4-3/+74
Many tests need to access assets stored on remote sites. We don't want to download these during test execution when run by meson, since this risks hitting test timeouts when data transfers are slow. Add support for pre-emptive caching of assets by setting the env var QEMU_TEST_PRECACHE to point to a timestamp file. When this is set, instead of running the test, the assets will be downloaded and saved to the cache, then the timestamp file created. A meson custom target is created as a dependency of each test suite to trigger the pre-emptive caching logic before the test runs. When run in caching mode, it will locate assets by looking for class level variables with a name prefix "ASSET_", and type "Asset". At the ninja level ninja test --suite functional will speculatively download any assets that are not already cached, so it is advisable to set a timeout multiplier. QEMU_TEST_NO_DOWNLOAD=1 ninja test --suite functional will fail the test if a required asset is not already cached ninja precache-functional will download and cache all assets required by the functional tests At the make level, precaching is always done by make check-functional Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Tested-by: Richard Henderson <richard.henderson@linaro.org> [thuth: Remove the duplicated "path = os.path.basename(...)" line] Message-ID: <20240830133841.142644-16-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04tests/functional: add a module for handling asset download & cachingDaniel P. Berrangé2-0/+98
The 'Asset' class is a simple module that declares a downloadable asset that can be cached locally. Downloads are stored in the user's home dir at ~/.cache/qemu/download, using a sha256 sum of the URL. [thuth: Drop sha1 support, use hash on file content for naming instead of URL, add the possibility to specify the cache dir via environment variable] Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240830133841.142644-15-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04tests/functional: Convert avocado tests that just need a small adjustmentThomas Huth5-51/+56
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. Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240830133841.142644-14-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04tests/functional: Convert simple avocado tests into standalone python testsThomas Huth7-60/+40
These test are rather simple and don't need any modifications apart from adjusting the "from avocado_qemu" line. To ease debugging, make the files executable and add a shebang line and Python '__main__' handling, too, so that these tests can now be run by executing them directly. Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240830133841.142644-13-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04tests/functional: Prepare the meson build system for the functional testsThomas Huth3-0/+93
Provide a meson.build file for the upcoming python-based functional tests, and add some wrapper glue targets to the tests/Makefile.include file. We are going to use two "speed" modes for the functional tests: The "quick" tests can be run at any time (i.e. also during "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. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240830133841.142644-12-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04tests/Makefile.include: Increase the level of indentation in the help textThomas Huth1-15/+15
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. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-ID: <20240830133841.142644-11-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04tests/functional: Set up loggingThomas Huth1-1/+26
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é <berrange@redhat.com> Message-ID: <20240830133841.142644-10-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04tests/functional: Add base classes for the upcoming pytest-based testsThomas Huth5-0/+385
The files are mostly a copy of the tests/avocado/avocado_qemu/__init__.py file with some adjustments to get rid of the Avocado dependencies (i.e. we also have to drop the LinuxSSHMixIn and LinuxTest for now). The emulator binary and build directory are now passed via environment variables that will be set via meson.build later. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <20240830133841.142644-9-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04python: Install pycotap in our venv if necessaryThomas Huth2-0/+1
The upcoming functional tests will require pycotap for providing TAP output from the python-based tests. Since we want to be able to run some of the tests offline by default, too, let's install it along with meson in our venv if necessary (it's size is only 5 kB, so adding the wheel here should not really be a problem). The wheel file has been obtained with: pip download --only-binary :all: --dest . --no-cache pycotap Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <20240830133841.142644-8-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04tests/avocado/boot_linux_console: Remove the s390x subtestThomas Huth2-20/+2
We've got a much more sophisticated, Fedora-based test for s390x ("test_s390x_fedora" in another file) already, so the test in boot_linux_console.py seems to be rather a waste of precious test cycles. Thus move the command line check and delete the s390x test in boot_linux_console.py. Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <20240830133841.142644-7-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04tests/avocado/avocado_qemu: Fix the "from" statements in linuxtest.pyThomas Huth1-2/+2
Without this change, the new Avocado v103 fails to find the tests that are based on the LinuxTest class. Suggested-by: Cleber Rosa <crosa@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240830133841.142644-6-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04Bump avocado to 103.0Cleber Rosa2-2/+2
This bumps Avocado to latest the LTS release. An LTS release is one that can receive bugfixes and guarantees stability for a much longer period and has incremental minor releases made. Even though the 103.0 LTS release is pretty a rewrite of Avocado when compared to 88.1, the behavior of all existing tests under tests/avocado has been extensively tested no regression in behavior was found. To keep behavior of jobs as close as possible with previous version, this version bump keeps the execution serial (maximum of one task at a time being run). Reference: https://avocado-framework.readthedocs.io/en/103.0/releases/lts/103_0.html Signed-off-by: Cleber Rosa <crosa@redhat.com> Tested-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> Message-ID: <20240806173119.582857-2-crosa@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240830133841.142644-5-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-09-04tests/avocado/machine_aarch64_sbsaref.py: allow for rw usage of imageCleber Rosa1-1/+1
When the OpenBSD based tests are run in parallel, the previously single instance of the image would become corrupt. Let's give each test its own snapshot. Signed-off-by: Cleber Rosa <crosa@redhat.com> Suggested-by: Alex Bennée <alex.bennee@linaro.org> Message-ID: <20240806173119.582857-9-crosa@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> Message-ID: <20240830133841.142644-4-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>