aboutsummaryrefslogtreecommitdiff
path: root/tests/avocado/reverse_debugging.py
AgeCommit message (Collapse)Author
2024-02-20tests: correct typosManos Pitsidianakis
Correct typos automatically found with the `typos` tool <https://crates.io/crates/typos> Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org> Reviewed-by: Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru> Reviewed-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2023-12-01gitlab: add optional job to run flaky avocado testsAlex Bennée
One problem with flaky tests is they often only fail under CI conditions which makes it hard to debug. We add an optional allow_fail job so developers can trigger the only the flaky tests in the CI environment if they are debugging. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20231201093633.2551497-8-alex.bennee@linaro.org>
2023-12-01docs/devel: rationalise unstable gitlab tests under FLAKY_TESTSAlex Bennée
It doesn't make sense to have two classes of flaky tests. While it may take the constrained environment of CI to trigger failures easily it doesn't mean they don't occasionally happen on developer machines. As CI is the gating factor to passing there is no point developers running the tests locally anyway unless they are trying to fix things. While we are at it update the language in the docs to discourage the QEMU_TEST_FLAKY_TESTS becoming a permanent solution. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20231201093633.2551497-3-alex.bennee@linaro.org>
2023-11-21Revert "tests/avocado: Enable reverse_debugging.py tests in gitlab CI"Thomas Huth
This reverts commit c4d74ab24a02c90b7a3240510b3dd4e1bec536dd. The reverse debugging test is sometimes still failing. See: https://gitlab.com/qemu-project/qemu/-/issues/1992 Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Message-ID: <20231121100842.677363-1-thuth@redhat.com>
2023-11-16tests/avocado: Enable reverse_debugging.py tests in gitlab CINicholas Piggin
Let's try enable reverse_debugging.py in gitlab CI. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Message-ID: <20231116115354.228678-3-npiggin@gmail.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2023-11-16tests/avocado: reverse_debugging drain console to prevent hangNicholas Piggin
Like replay_linux.py, reverse_debugging.py starts the vm with console set but does not interact with it (e.g., with wait_for_console_pattern). In this situation, the console should have a drainer attached so the socket does not fill. replay_linux.py has a drainer, but it is missing from reverse_debugging.py. Per analysis in Link: this can cause the console socket/pipe to fill and QEMU get stuck in qemu_chr_write_buffer, leading to strange test case failures (ppc64 fails because it prints a lot to console in early bios). Attaching a drainer prevents this. Note, this commit does not fix bugs introduced by the commits referenced in the first two Fixes: tags, but together those commits conspire to irritate the problem and cause test case failure, which this commit fixes. Link: https://lore.kernel.org/qemu-devel/ZVT-bY9YOr69QTPX@redhat.com/ Fixes: 1d4796cd0083 ("python/machine: use socketpair() for console connections") Fixes: 761a13b23946 ("tests/avocado: ppc64 reverse debugging tests for pseries and powernv") Fixes: be52eca30978 ("tests/acceptance: add reverse debugging test") Tested-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Message-ID: <20231116115354.228678-1-npiggin@gmail.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2023-09-06tests/avocado: ppc64 reverse debugging tests for pseries and powernvNicholas Piggin
These machines run reverse-debugging well enough to pass basic tests. Wire them up. Reviewed-by: Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru> Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
2023-09-06tests/avocado: reverse-debugging cope with re-executing breakpointsNicholas Piggin
The reverse-debugging test creates a trace, then replays it and: 1. Steps the first 10 instructions and records their addresses. 2. Steps backward and verifies their addresses match. 3. Runs to (near) the end of the trace. 4. Sets breakpoints on the first 10 instructions. 5. Continues backward and verifies execution stops at the last breakpoint. Step 5 breaks if any of the other 9 breakpoints are re-executed in the trace after the 10th instruction is run, because those will be unexpectedly hit when reverse continuing. This situation does arise with the ppc pseries machine, the SLOF bios branches to its own entry point. Deal with this by switching steps 3 and 4, so the trace will be run to the end *or* one of the breakpoints being re-executed. Step 5 then reverses from there to the 10th instruction will not hit a breakpoint in between, by definition. Another step is added between steps 2 and 3, which steps forward over the first 10 instructions and verifies their addresses, to support this. Reviewed-by: Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru> Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
2023-02-16tests/avocado: Tag TCG tests with accel:tcgFabiano Rosas
This allows the test to be skipped when TCG is not present in the QEMU binary. Signed-off-by: Fabiano Rosas <farosas@suse.de> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2021-11-08tests/acceptance: rename tests acceptance to tests avocadoWillian Rampazzo
In the discussion about renaming the `tests/acceptance` [1], the conclusion was that the folders inside `tests` are related to the framework running the tests and not directly related to the type of the tests. This changes the folder to `tests/avocado` and adjusts the MAKEFILE, the CI related files and the documentation. [1] https://lists.gnu.org/archive/html/qemu-devel/2021-05/msg06553.html Reviewed-by: Niek Linnenbank <nieklinnenbank@gmail.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Willian Rampazzo <willianr@redhat.com> Message-Id: <20211105155354.154864-3-willianr@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>