summaryrefslogtreecommitdiffstats
path: root/tests/avocado
Commit message (Collapse)AuthorAgeFilesLines
* tests/avocado/machine_aspeed.py: Fix typos on buildrootCédric Le Goater2022-10-241-8/+8
| | | | | | | | | | | Replace 'buidroot' and 'builroot' by 'buildroot'. Fixes: f7bc7da0724f ("test/avocado/machine_aspeed.py: Add tests using buildroot images") Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Joel Stanley <joel@jms.id.au> Message-Id: <20220923084803.498337-2-clg@kaod.org> Signed-off-by: Cédric Le Goater <clg@kaod.org>
* tests/avocado: Add missing require_netdev('user') checksPeter Maydell2022-10-113-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | Some avocado tests fail if QEMU was built without libslirp. Add require_netdev('user') checks where necessary: These tests try to ping 10.0.2.2 and expect it to succeed: boot_linux_console.py:BootLinuxConsole.test_arm_emcraft_sf2 boot_linux_console.py:BootLinuxConsole.test_arm_orangepi_sd ppc_bamboo.py:BambooMachine.test_ppc_bamboo These tests run a commandline that includes '-net user': machine_aspeed.py:AST2x00Machine.test_arm_ast2500_evb_builroot (and others that use the do_test_arm_aspeed_buidroot_start() or do_test_arm_aspeed_sdk_start() helper functions) These changes seem to be sufficient for 'make check-avocado' to not fail on a --disable-slirp build. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20221001195224.2453581-1-peter.maydell@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
* target/s390x: support PRNO_TRNG instructionJason A. Donenfeld2022-09-261-0/+1
| | | | | | | | | | | | | In order for hosts running inside of TCG to initialize the kernel's random number generator, we should support the PRNO_TRNG instruction, backed in the usual way with the qemu_guest_getrandom helper. This is confirmed working on Linux 5.19. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Message-Id: <20220921100729.2942008-2-Jason@zx2c4.com> Reviewed-by: David Hildenbrand <david@redhat.com> [thuth: turn prno-trng off in avocado test to avoid breaking it] Signed-off-by: Thomas Huth <thuth@redhat.com>
* tests/avocado: reduce the default timeout to 120sAlex Bennée2022-09-201-1/+1
| | | | | | | | | | We should be aiming to keep our tests under 2 minutes so lets reduce the default timeout to that. Tests that we know take longer should explicitly set a longer timeout. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220914155950.804707-8-alex.bennee@linaro.org>
* tests/avocado: split the AST2x00Machine classesAlex Bennée2022-09-201-0/+18
| | | | | | | | | | | | | | The SDK tests take a lot longer to run and hence need a longer timeout. As they run well over the 60 second maximum for CI lets also disable them for CI as well. I suspect they also suffer from the inability to detect the login prompt due to no newlines being processed. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220914155950.804707-7-alex.bennee@linaro.org>
* tests/avocado: add explicit timeout for ppc64le TCG testsAlex Bennée2022-09-201-0/+2
| | | | | | | | | We don't want to rely on the soon to be reduced default time. These tests are still slow for something we want to run in CI though. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220914155950.804707-6-alex.bennee@linaro.org>
* tests/avocado: add explicit timeout for s390 TCG testsAlex Bennée2022-09-201-0/+2
| | | | | | | | | We don't want to rely on the soon to be reduced default time. These tests are still slow for something we want to run in CI though. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20220914155950.804707-5-alex.bennee@linaro.org>
* tests/avocado: add explicit timeout for Aarch64 TCG testsAlex Bennée2022-09-201-0/+1
| | | | | | | | | We don't want to rely on the soon to be reduced default time. These tests are still slow for something we want to run in CI though. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220914155950.804707-4-alex.bennee@linaro.org>
* tests/avocado/boot_linux_console: Fix the test_aarch64_xlnx_versal_virt testThomas Huth2022-09-201-3/+3
| | | | | | | | | | | The assets that this test tries to download have been removed from the server. Update to a newer version to get it working again. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <20220829080940.110831-1-thuth@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220914155950.804707-3-alex.bennee@linaro.org>
* tests/avocado/migration: Get find_free_port() from the portsThomas Huth2022-08-301-2/+2
| | | | | | | | | | | | | | | In upstream Avocado, the find_free_port() function is not available from "network" anymore, but must be used via "ports", see: https://github.com/avocado-framework/avocado/commit/22fc98c6ff76cc55c48 To be able to update to a newer Avocado version later, let's use the new way for accessing the find_free_port() function here. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20220829121939.209329-1-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
* tests/avocado: Fix trivial typoThomas Huth2022-08-291-1/+1
| | | | | | | | The intention was likely to use "intend" instead of "indent" here. Message-Id: <20220824080926.568935-1-thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
* tests/avocado: Do not run tests that require libslirp if it is not availableThomas Huth2022-08-293-0/+9
| | | | | | | | | | Some avocado tests blindly assume that QEMU has been compiled with libslirp enabled and fail badly if it is missing. Add a proper check to cancel the tests in this case. Message-Id: <20220824151122.704946-6-thuth@redhat.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
* tests/avocado: push default timeout to QemuBaseTestAlex Bennée2022-08-241-1/+4
| | | | | | | | | | | | | | All of the QEMU tests eventually end up derrived from this class. Move the default timeout from LinuxTest to ensure we catch them all. We keep the 15 minute timeout as currently some of the more heavyweight CFI and TCG tests can overrun. We should aim to drop it down to 2 minutes which is a more reasonable target for tests to aim for but we want to get this release out. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> [AJB: revert to 15 min timeout for v2] Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220822165608.2980552-2-alex.bennee@linaro.org>
* tests/avocado: apply a band aid to aspeed-evb loginAlex Bennée2022-08-161-0/+2
| | | | | | | | | | | | | This is really a limitation of the underlying console code which doesn't allow us to detect the login: and following "#" prompts because it reads input line wise. By adding a small delay we ensure that the login prompt has appeared so we don't accidentally spaff the shell commands to a confused getty in the guest. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Cédric Le Goater <clg@kaod.org> Acked-by: John Snow <jsnow@redhat.com> Message-Id: <20220811151413.3350684-8-alex.bennee@linaro.org>
* tests/avocado: add timeout to the aspeed testsAlex Bennée2022-08-161-0/+2
| | | | | | | | | On some systems the test can hang. At least defining a timeout stops it from hanging forever. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20220811151413.3350684-7-alex.bennee@linaro.org>
* tests/avocado: fix replay-linux testPavel Dovgalyuk2022-08-071-0/+1
| | | | | | | | | | Last line of the test is missing by accident. This patch fixes the script. Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru> Message-Id: <165943656662.362178.2086588841425038338.stgit@pasha-ThinkPad-X280> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
* test/avocado/machine_aspeed.py: Add SDK testsCédric Le Goater2022-07-141-0/+68
| | | | | | | | | | | | The Aspeed SDK kernel usually includes support for the lastest HW features. This is interesting to exercise QEMU and discover the gaps in the models. Add extra I2C tests for the AST2600 EVB machine to check the new register interface. Message-Id: <20220707091239.1029561-1-clg@kaod.org> Signed-off-by: Cédric Le Goater <clg@kaod.org>
* avocado: Fix BUILD_DIR if it's equal to SOURCE_DIRPeter Delevoryas2022-07-131-8/+9
| | | | | | | | | | | | | | | I like to build QEMU from the root source directory [*], rather than cd'ing into the build directory. This code may as well include a search path for that, so that you can run avocado tests individually without specifying "-p qemu_bin=build/qemu-system-arm" manually. [*] See commit dedad02720 ("configure: add support for pseudo-"in source tree" builds") Signed-off-by: Peter Delevoryas <peter@pjd.dev> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20220702185604.46643-1-peter@pjd.dev> [PMD: Mention commit dedad02720] Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
* test/avocado/machine_aspeed.py: Add an I2C RTC testCédric Le Goater2022-06-221-0/+8
| | | | | | | | | Add an RTC device and check that the output of the hwclock command matches the current year. Signed-off-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Cédric Le Goater <clg@kaod.org>
* test/avocado/machine_aspeed.py: Add I2C tests to ast2600-evbCédric Le Goater2022-06-221-0/+13
| | | | | | | | Create a named I2C temperature sensor device on the command line, instantiate device from Linux since it is not part of the device tree, and check the temperature is correctly reported under sysfs. Signed-off-by: Cédric Le Goater <clg@kaod.org>
* test/avocado/machine_aspeed.py: Add I2C tests to ast2500-evbCédric Le Goater2022-06-221-0/+13
| | | | | | | | Create a named I2C temperature sensor device on the command line, instantiate device from Linux since it is not part of the device tree, and check the temperature is correctly reported under sysfs. Signed-off-by: Cédric Le Goater <clg@kaod.org>
* test/avocado/machine_aspeed.py: Add tests using buildroot imagesCédric Le Goater2022-06-221-0/+52
| | | | | | | | | Buildroot images are smaller than the OpenBMC images and faster to run. Built from source using : http://patchwork.ozlabs.org/project/buildroot/list/?series=303465 Signed-off-by: Cédric Le Goater <clg@kaod.org>
* test/avocado/machine_aspeed.py: Move OpenBMC testsCédric Le Goater2022-06-222-43/+50
| | | | | | | | It's easier to run. Keep test_arm_ast2600_debian() under the boot_linux_console.py file because it requires the extract_from_deb() helper. We could remove it when we have tests for the AST2600. Signed-off-by: Cédric Le Goater <clg@kaod.org>
* tests: install "qemu" namespace package into venvJohn Snow2022-06-063-8/+5Star
| | | | | | | | | | | | | | | | This patch adds the "qemu" namespace package to the $build/tests/venv directory. It does so in "editable" mode, which means that changes to the source python directory will actively be reflected by the venv. This patch also then removes any sys.path hacking from the avocado test scripts directly. By doing this, the environment of where to find these packages is managed entirely by the virtual environment and not by the scripts themselves. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20220526000921.1581503-7-jsnow@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* tests/avocado: add replay Linux test for Aarch64 machinesPavel Dovgalyuk2022-06-061-0/+40
| | | | | | | | | This patch adds two tests for replaying Linux boot process on Aarch64 platform. Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru> Message-Id: <165364841373.688121.8868079200312201658.stgit@pasha-ThinkPad-X280> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* tests/avocado: add replay Linux tests for virtio machinePavel Dovgalyuk2022-06-061-0/+26
| | | | | | | | | This patch adds two tests for replaying Linux boot process on x86_64 virtio platform. Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru> Message-Id: <165364840811.688121.11931681195199516354.stgit@pasha-ThinkPad-X280> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* tests/avocado: update replay_linux testPavel Dovgalyuk2022-06-061-5/+14
| | | | | | | | | This patch updates replay_linux test to make it compatible with new LinuxTest class. Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru> Message-Id: <165364840253.688121.10404266209986316381.stgit@pasha-ThinkPad-X280> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* test/avocado/machine_aspeed.py: Add ast1030 test caseJamin Lin2022-05-021-0/+36
| | | | | | | | | | | Add test case to test "ast1030-evb" machine with zephyr os Signed-off-by: Troy Lee <troy_lee@aspeedtech.com> Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> Signed-off-by: Steven Lee <steven_lee@aspeedtech.com> Reviewed-by: Cédric Le Goater <clg@kaod.org> Message-Id: <20220401083850.15266-10-jamin_lin@aspeedtech.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
* avocado/vnc: add test_change_listenVladimir Sementsov-Ogievskiy2022-04-271-0/+63
| | | | | | | | | Add simple test-case for new display-update qmp command. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@openvz.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20220401143936.356460-4-vsementsov@openvz.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* Merge tag 'pull-fixes-for-7.1-200422-1' of https://github.com/stsquad/qemu ↵Richard Henderson2022-04-202-25/+51
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into staging Testing, docs and gdbstub updates: - make -M virt test exercise -cpu max - document how binfmt_misc docker works - clean-up the devel TOC generation - clean-up check-tcg cross-compile behaviour - fix byte swap error in xmm gdbstub access - add float_convd test with reference files - more reference files for float_convs - more cleanly handle gdb crashing during check-tcg # -----BEGIN PGP SIGNATURE----- # # iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAmJgIgsACgkQ+9DbCVqe # KkRs3Qf/WnL4YV3l8jO/wEVbls/57aLPk+ak1GuvXJ+iM9gH8Qz6WZxIJIEhhHlu # ZEixCewahTn8POMMRo4JAr0bRgtfBuh717GerXObiHcS3OuLsGM8rYP2Z1xqKL3L # 4pR8VqhyUq/Jyl/6MPN5OZB0AdEPIdI5MuflckCeDcFaowpthLjwHao07hG/FU0s # wQYS7aYTZT33V2Xm6xlePEEMq8YMPCJj00HF3Ljg4eUOmb+C+csFXMQtotsBJRCg # mC/T2U0IFbrQUkkWJqVmRCPwKraQGDMn6POk298siRWE0kV4BmH8mnmN+/Jxhqgl # QfFhQrsBxmPPG5TfQhEmlHfQ5EARLQ== # =8q12 # -----END PGP SIGNATURE----- # gpg: Signature made Wed 20 Apr 2022 08:08:59 AM PDT # gpg: using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44 # gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [undefined] # 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: 6685 AE99 E751 67BC AFC8 DF35 FBD0 DB09 5A9E 2A44 * tag 'pull-fixes-for-7.1-200422-1' of https://github.com/stsquad/qemu: (25 commits) tests/guest-debug: better handle gdb crashes target/i386: fix byte swap issue with XMM register access tests/tcg: add missing reference files for float_convs tests/tcg: add float_convd test tests/tcg: remove duplicate sha512-sse case tests/tcg: fix non-static build tests/docker: remove SKIP_DOCKER_BUILD tests/tcg: isolate from QEMU's config-host.mak tests/tcg: invoke Makefile.target directly from QEMU's makefile tests/tcg: list test targets in Makefile.prereqs tests/tcg: prepare Makefile.prereqs at configure time tests/tcg: remove CONFIG_USER_ONLY from config-target.mak tests/tcg: remove CONFIG_LINUX_USER from config-target.mak tests/tcg: add compiler test variables when using containers tests/docker: do not duplicate rules for hexagon-cross tests/docker: simplify docker-TEST@IMAGE targets tests/docker: remove unnecessary filtering of $(DOCKER_IMAGES) tests/docker: inline variable definitions or move close to use tests/docker: remove unnecessary default definitions tests/docker: remove dead variable ... Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
| * tests/avocado: update aarch64_virt test to exercise -cpu maxAlex Bennée2022-04-202-25/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Fedora 29 kernel is quite old and importantly fails when running in LPA2 scenarios. As it's not really exercising much of the CPU space replace it with a custom 5.16.12 kernel with all the architecture options turned on. There is a minimal buildroot initramfs included in the kernel which has a few tools for stress testing the memory subsystem. The userspace also targets the Neoverse N1 processor so would fail with a v8.0 cpu like cortex-a53. While we are at it move the test into its own file so it can have an assigned maintainer. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Acked-by: Richard Henderson <richard.henderson@linaro.org> Tested-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220419091020.3008144-2-alex.bennee@linaro.org>
* | tests/avocado: Allow overwrite smp and memory size command line optionsAhmed Abouzied2022-04-201-2/+4
|/ | | | | | | | | | | | Removes the hard-coded values in setUp(). Class inheriting from avocado_qemu.LinuxTest can overwrite the default smp and memory instead. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/453 Signed-off-by: Ahmed Abouzied <email@aabouzied.com> Message-Id: <20210802222257.50946-1-email@aabouzied.com> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
* tests/avocado: start PhoneServer upfrontBeraldo Leal2022-03-161-6/+7
| | | | | | | | | | | | | | Race conditions can happen with the current code, because the port that was available might not be anymore by the time the server is started. By setting the port to 0, PhoneServer it will use the OS default behavior to get a free port, then we save this information so we can later configure the guest. Suggested-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Beraldo Leal <bleal@redhat.com> Message-Id: <20220311171127.2189534-1-bleal@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
* avocado/ppc_virtex_ml507.py: check TCG accel in test_ppc_virtex_ml507()Daniel Henrique Barboza2022-03-141-0/+2
| | | | | | | | This test times out when running in an IBM POWER host and --disable-tcg. Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> Message-Id: <20220310183011.110391-10-danielhb413@gmail.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
* avocado/ppc_prep_40p.py: check TCG accel in all testsDaniel Henrique Barboza2022-03-141-0/+6
| | | | | | | | | | | | | | | | | | | All tests in the file times out when running in an IBM POWER host and --disable-tcg with an error like the following: Command: ./qemu-system-ppc -display none -vga none (...) -machine 40p (...) Output: qemu-system-ppc: Register sync failed... If you're using kvm-hv.ko, only "-cpu host" is possible qemu-system-ppc: kvm_init_vcpu: kvm_arch_init_vcpu failed (0): Invalid argument Since we don't have a way to detect whether the host is running kvm_hv or kvm_pr, skip all tests if TCG is not available. Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20220310183011.110391-9-danielhb413@gmail.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
* avocado/ppc_mpc8544ds.py: check TCG accel in test_ppc_mpc8544ds()Daniel Henrique Barboza2022-03-141-0/+2
| | | | | | | | | This tests times out in an IBM POWER host when compiled with --disable-tcg. Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> Message-Id: <20220310183011.110391-8-danielhb413@gmail.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
* avocado/ppc_bamboo.py: check TCG accel in test_ppc_bamboo()Daniel Henrique Barboza2022-03-141-0/+2
| | | | | | | | | This tests times out in an IBM POWER host when compiled with --disable-tcg. Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> Message-Id: <20220310183011.110391-7-danielhb413@gmail.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
* avocado/ppc_74xx.py: check TCG accel for all testsDaniel Henrique Barboza2022-03-141-0/+13
| | | | | | | | | | | | | | | | | | | All tests of this file, when running in an IBM POWER host and with --disable-tcg, fail in a similar manner: Command: ./qemu-system-ppc -display none -vga none (...) -cpu 7400 (...) Output: ioctl(KVM_CREATE_VM) failed: 22 Invalid argument PPC KVM module is not loaded. Try modprobe kvm_pr. qemu-system-ppc: failed to initialize kvm: Invalid argument We don't have a way of telling which KVM module is loaded in a Power host (kvm_hv or kvm_pr). For now let's make all the tests of this file depend on TCG support. Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> Message-Id: <20220310183011.110391-6-danielhb413@gmail.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
* avocado/ppc_405.py: check TCG accel in test_ppc_ref405ep()Daniel Henrique Barboza2022-03-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | Running this test without TCG support in an IBM POWER server results in the following error: Command: ./qemu-system-ppc -display none -vga none (...) -machine ref405ep (...) Output: qemu-system-ppc: Register sync failed... If you're using kvm-hv.ko, only "-cpu host" is possible qemu-system-ppc: kvm_init_vcpu: kvm_arch_init_vcpu failed (0): Invalid argument Although the host is running kvm_hv we don't have a way of differentiate between kvm_hv and kvm_pr, meaning that this test would've failed in the same way if kvm_pr was the KVM module loaded in the host. Since we don't have a way of checking which KVM module is being loaded when using avocado, make a TCG accel check in test_ppc_ref405ep(). Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> Message-Id: <20220310183011.110391-5-danielhb413@gmail.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
* avocado/ppc_405.py: remove test_ppc_taihu()Daniel Henrique Barboza2022-03-141-8/+0Star
| | | | | | | | | | | | | | | | | | Running this test gives us a deprecation warning telling that this machine type is no longer supported: Output: qemu-system-ppc: Machine type 'taihu' is deprecated: incomplete, use 'ref405ep' instead Moreover, this test fails to pass running in an IBM POWER host when building QEMU with --disable-tcg. Since the machine type is already being considered deprecated let's not bother fixing the test with --disable-tcg. Remove test_ppc_taihu(). Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> Message-Id: <20220310183011.110391-4-danielhb413@gmail.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
* avocado/boot_linux_console.py: check TCG accel in test_ppc_mac99()Daniel Henrique Barboza2022-03-141-0/+6
| | | | | | | | | | | | | | | | | | | | | | This test breaks when run in an IBM POWER host with a QEMU compiled with --disable-tcg and the ppc-softmmu target in a similar manner as test_ppc_g3beige did. There's also an observation made about kvm_pr in the error message: Command: ./qemu-system-ppc -display none -vga none (...) -machine mac99 (...) Output: ioctl(KVM_CREATE_VM) failed: 22 Invalid argument PPC KVM module is not loaded. Try modprobe kvm_pr. qemu-system-ppc: failed to initialize kvm: Invalid argument This means that, when/if we're able to detect kvm_pr support in these avocado tests, we can revisit this test to not rely solely on TCG availability. Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> Message-Id: <20220310183011.110391-3-danielhb413@gmail.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
* avocado/boot_linux_console.py: check TCG accel in test_ppc_g3beige()Daniel Henrique Barboza2022-03-141-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | This test breaks when run in an IBM POWER host with a QEMU compiled with --disable-tcg and the ppc-softmmu target. One thing to note is that the error message explictly mentions kvm_pr support: Command: ./qemu-system-ppc -display none -vga none (...) -machine g3beige (...) Output: ioctl(KVM_CREATE_VM) failed: 22 Invalid argument PPC KVM module is not loaded. Try modprobe kvm_pr. qemu-system-ppc: failed to initialize kvm: Invalid argument The host was running kvm_hv, not kvm_pr, and the machine failed to load. Unfortunately we don't have a way to detect whether the KVM module loaded is kvm_hv or kvm_pr - we do a check for /dev/kvm to detect KVM support but both modules create this file so that's not helpful. Let's skip this test for now until we have a way of detecting kvm_pr support in the host. Reported-by: Murilo Opsfelder Araujo <muriloo@linux.ibm.com> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> Message-Id: <20220310183011.110391-2-danielhb413@gmail.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
* avocado/replay_kernel.py: make tcg-icount check in run_vm()Daniel Henrique Barboza2022-03-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | The icount framework relies on TCG availability. If QEMU is built with --disable-tcg we won't have icount either, and then this test will fail with the following message in an IBM POWER9 host: tests/avocado/replay_kernel.py:ReplayKernelNormal.test_ppc64_pseries: ERROR: ConnectError: Failed to establish session: (...) /11-tests_avocado_replay_kernel.py_ReplayKernelNormal.test_ppc64_pseries/replay.bin: cannot configure icount, TCG support not available Although this was revealed in a specific ppc64 scenario, the TCG check is being done in the common code inside run_vm() because all archs need TCG to have access to icount. Cc: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: Cédric Le Goater <clg@kaod.org> Message-Id: <20220303153517.168943-6-danielhb413@gmail.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
* avocado/boot_linux_console.py: check tcg accel in test_ppc64_e500Daniel Henrique Barboza2022-03-141-0/+2
| | | | | | | | | | | Some ppc64 hosts (e.g. IBM POWER hosts) aren't able to run the e500 machine using KVM accel. Skip this test if TCG accel isn't available. Cc: Cleber Rosa <crosa@redhat.com> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: Cédric Le Goater <clg@kaod.org> Message-Id: <20220303153517.168943-5-danielhb413@gmail.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
* avocado/boot_linux_console.py: check for tcg in test_ppc_powernv8/9Daniel Henrique Barboza2022-03-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | The PowerNV8/9 machines does not work with KVM acceleration, meaning that boot_linux_console.py:BootLinuxConsole.test_ppc_powernv8/9 tests will always fail when QEMU is compiled with --disable-tcg: ERROR 1-tests/avocado/boot_linux_console.py:BootLinuxConsole.test_ppc_powernv8 -> VMLaunchFailure: ConnectError: Failed to establish session: [Errno 104] Connection reset by peer Exit code: 1 Command: ./qemu-system-ppc64 -display none -vga none -chardev socket,id=mon,path=/var/tmp/avo_qemu_sock_no19zg0m/qemu-1936936-7fffa77cff98-monitor.sock -mon chardev=mon,mode=control -machine powernv8 -chardev socket,id=console,path=/var/tmp/avo_qemu_sock_no19zg0m/qemu-1936936-7fffa77cff98-console.sock,server=on,wait=off -serial chardev:console -kernel /home/danielhb/avocado/data/cache/by_location/4514304e2c4ee84c5f0b5c8bacedda783891df68/zImage.epapr -append console=tty0 console=hvc0 -device pcie-pci-bridge,id=bridge1,bus=pcie.1,addr=0x0 -device nvme,bus=pcie.2,addr=0x0,serial=1234 -device e1000e,bus=bridge1,addr=0x3 -device nec-usb-xhci,bus=bridge1,addr=0x2 Output: qemu-system-ppc64: The powernv machine does not work with KVM acceleration Let's add the TCG accel requirement in both tests to skip them if we don't have TCG support available. Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20220303153517.168943-4-danielhb413@gmail.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
* Merge remote-tracking branch 'remotes/philmd/tags/mips-20220308' into stagingPeter Maydell2022-03-091-0/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MIPS patches queue - Fix CP0 cycle counter timing - Fix VMState of gt64120 IRQs - Long due PIIX4 QOM cleanups - ISA IRQ QOM'ification / cleanups # gpg: Signature made Tue 08 Mar 2022 18:39:42 GMT # gpg: using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE # gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.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: FAAB E75E 1291 7221 DCFD 6BB2 E3E3 2C2C DEAD C0DE * remotes/philmd/tags/mips-20220308: tests/avocado/linux_ssh_mips_malta.py: add missing accel (tcg) tag hw/isa: Inline and remove one-line isa_init_irq() hw/isa: Drop unused attributes from ISADevice hw/isa/isa-bus: Remove isabus_dev_print() hw/input/pckbd: QOM'ify IRQ numbers hw/rtc/m48t59-isa: QOM'ify IRQ number hw/rtc/mc146818rtc: QOM'ify IRQ number hw/mips/gt64xxx_pci: Resolve gt64120_register() hw/isa/piix4: Replace some magic IRQ constants hw/isa/piix4: Resolve global instance variable hw/isa/piix4: Pass PIIX4State as opaque parameter for piix4_set_irq() hw/isa/piix4: Resolve redundant i8259[] attribute malta: Move PCI interrupt handling from gt64xxx_pci to piix4 hw/mips/gt64xxx_pci: Fix PCI IRQ levels to be preserved during migration target/mips: Remove duplicated MIPSCPU::cp0_count_rate target/mips: Fix cycle counter timing calculations Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * tests/avocado/linux_ssh_mips_malta.py: add missing accel (tcg) tagCleber Rosa2022-03-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | Being explicit about the accelerator used on these tests is a good thing in itself, but it will also be used in the filtering rules applied on "make check-avocado". Signed-off-by: Cleber Rosa <crosa@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20220225210156.2032055-6-crosa@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
* | Merge remote-tracking branch ↵Peter Maydell2022-03-081-0/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'remotes/thuth-gitlab/tags/pull-request-2022-03-07' into staging * Fixes for s390x TCG tests * Update Haiku VM to a usable level * Some other miscellaneous small fixes # gpg: Signature made Mon 07 Mar 2022 18:07:00 GMT # gpg: using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5 # gpg: issuer "thuth@redhat.com" # gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full] # gpg: aka "Thomas Huth <thuth@redhat.com>" [full] # gpg: aka "Thomas Huth <huth@tuxfamily.org>" [full] # gpg: aka "Thomas Huth <th.huth@posteo.de>" [unknown] # Primary key fingerprint: 27B8 8847 EEE0 2501 18F3 EAB9 2ED9 D774 FE70 2DB5 * remotes/thuth-gitlab/tags/pull-request-2022-03-07: Check and report for incomplete 'global' option format tests/vm: Update haiku test vm to R1/Beta3 tests/avocado: Cancel BootLinux tests in case there is no free port MAINTAINERS: Update the files in the FreeBSD section tests/tcg/s390x: Cleanup of mie3 tests. tests/tcg/s390x: Fix the exrl-trt* tests with Clang tests/tcg/s390x: Fix mvc, mvo and pack tests with Clang Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | tests/avocado: Cancel BootLinux tests in case there is no free portThomas Huth2022-03-071-0/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | The BootLinux tests are currently failing with an ugly python stack trace on my RHEL8 system since they cannot get a free port (likely due to the firewall settings on my system). Let's properly check the return value of find_free_port() instead and cancel the test gracefully if it cannot get a free port. Message-Id: <20220228114325.818294-1-thuth@redhat.com> Reviewed-by: Beraldo Leal <bleal@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
* / target/arm: Provide cpu property for controling FEAT_LPA2Richard Henderson2022-03-071-0/+2
|/ | | | | | | | | | | | | There is a Linux kernel bug present until v5.12 that prevents booting with FEAT_LPA2 enabled. As a workaround for TCG, allow the feature to be disabled from -cpu max. Since this kernel bug is present in the Fedora 31 image that we test in avocado, disable lpa2 on the command-line. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>