mbox series

[0/7] testing/next (qtest timer stuff)

Message ID 20250120210212.3890255-1-alex.bennee@linaro.org
Headers show
Series testing/next (qtest timer stuff) | expand

Message

Alex Bennée Jan. 20, 2025, 9:02 p.m. UTC
Hi,

Thomas found that a number of tests fail under CFI and other exotic
setups. The eventual realisation was that --enable-slirp masks a lot
of timer misuse because it ensures there is always a timer and
therefor things tend to move on (until the system is shutting down).

It turns out that bc02be4508 wasn't the solution after all. The first
few patches are clean-ups and various tightening of test expectations
before we revert the patch.

Please review:

  Revert "util/timer: avoid deadlock when shutting down"
  tests/qtest: tighten up the checks on clock_step
  tests/qtest: rename qtest_send_prefix and roll-up into qtest_send
  tests/qtest: simplify qtest_process_inbuf
  tests/qtest: don't step clock at start of npcm7xx periodic IRQ test
  tests/qtest: don't attempt to clock_step while waiting for virtio ISR
  tests/docker: replicate the check-rust-tools-nightly CI job

Alex.

Alex Bennée (7):
  tests/docker: replicate the check-rust-tools-nightly CI job
  tests/qtest: don't attempt to clock_step while waiting for virtio ISR
  tests/qtest: don't step clock at start of npcm7xx periodic IRQ test
  tests/qtest: simplify qtest_process_inbuf
  tests/qtest: rename qtest_send_prefix and roll-up into qtest_send
  tests/qtest: tighten up the checks on clock_step
  Revert "util/timer: avoid deadlock when shutting down"

 include/system/qtest.h                 |  1 -
 hw/ppc/spapr_rtas.c                    |  1 -
 hw/riscv/riscv_hart.c                  |  1 -
 system/qtest.c                         | 53 +++++++++-----------------
 tests/qtest/libqos/virtio-pci-modern.c |  6 +--
 tests/qtest/libqos/virtio-pci.c        |  6 +--
 tests/qtest/npcm7xx_timer-test.c       |  1 -
 util/qemu-timer.c                      | 16 ++------
 tests/docker/Makefile.include          |  3 ++
 tests/docker/test-rust                 | 21 ++++++++++
 10 files changed, 48 insertions(+), 61 deletions(-)
 create mode 100755 tests/docker/test-rust

Comments

Thomas Huth Jan. 21, 2025, 12:51 p.m. UTC | #1
On 20/01/2025 22.02, Alex Bennée wrote:
> Hi,
> 
> Thomas found that a number of tests fail under CFI and other exotic
> setups. The eventual realisation was that --enable-slirp masks a lot
> of timer misuse because it ensures there is always a timer and
> therefor things tend to move on (until the system is shutting down).
> 
> It turns out that bc02be4508 wasn't the solution after all. The first
> few patches are clean-ups and various tightening of test expectations
> before we revert the patch.
> 
> Please review:
> 
>    Revert "util/timer: avoid deadlock when shutting down"
>    tests/qtest: tighten up the checks on clock_step
>    tests/qtest: rename qtest_send_prefix and roll-up into qtest_send
>    tests/qtest: simplify qtest_process_inbuf
>    tests/qtest: don't step clock at start of npcm7xx periodic IRQ test
>    tests/qtest: don't attempt to clock_step while waiting for virtio ISR
>    tests/docker: replicate the check-rust-tools-nightly CI job
> 
> Alex.
> 
> Alex Bennée (7):
>    tests/docker: replicate the check-rust-tools-nightly CI job
>    tests/qtest: don't attempt to clock_step while waiting for virtio ISR
>    tests/qtest: don't step clock at start of npcm7xx periodic IRQ test
>    tests/qtest: simplify qtest_process_inbuf
>    tests/qtest: rename qtest_send_prefix and roll-up into qtest_send
>    tests/qtest: tighten up the checks on clock_step
>    Revert "util/timer: avoid deadlock when shutting down"

Thanks, I've checked that this fixes the check-cfi-* CI jobs and it also 
seems to help with the travis jobs that use --disable-slirp:

  https://app.travis-ci.com/github/huth/qemu/builds/273921493

Tested-by: Thomas Huth <thuth@redhat.com>
Fabiano Rosas Jan. 21, 2025, 1:50 p.m. UTC | #2
Alex Bennée <alex.bennee@linaro.org> writes:

> Hi,
>
> Thomas found that a number of tests fail under CFI and other exotic
> setups. The eventual realisation was that --enable-slirp masks a lot
> of timer misuse because it ensures there is always a timer and
> therefor things tend to move on (until the system is shutting down).
>
> It turns out that bc02be4508 wasn't the solution after all. The first
> few patches are clean-ups and various tightening of test expectations
> before we revert the patch.
>
> Please review:
>
>   Revert "util/timer: avoid deadlock when shutting down"
>   tests/qtest: tighten up the checks on clock_step
>   tests/qtest: rename qtest_send_prefix and roll-up into qtest_send
>   tests/qtest: simplify qtest_process_inbuf
>   tests/qtest: don't step clock at start of npcm7xx periodic IRQ test
>   tests/qtest: don't attempt to clock_step while waiting for virtio ISR
>   tests/docker: replicate the check-rust-tools-nightly CI job
>
> Alex.
>
> Alex Bennée (7):
>   tests/docker: replicate the check-rust-tools-nightly CI job
>   tests/qtest: don't attempt to clock_step while waiting for virtio ISR
>   tests/qtest: don't step clock at start of npcm7xx periodic IRQ test
>   tests/qtest: simplify qtest_process_inbuf
>   tests/qtest: rename qtest_send_prefix and roll-up into qtest_send
>   tests/qtest: tighten up the checks on clock_step
>   Revert "util/timer: avoid deadlock when shutting down"
>
>  include/system/qtest.h                 |  1 -
>  hw/ppc/spapr_rtas.c                    |  1 -
>  hw/riscv/riscv_hart.c                  |  1 -
>  system/qtest.c                         | 53 +++++++++-----------------
>  tests/qtest/libqos/virtio-pci-modern.c |  6 +--
>  tests/qtest/libqos/virtio-pci.c        |  6 +--
>  tests/qtest/npcm7xx_timer-test.c       |  1 -
>  util/qemu-timer.c                      | 16 ++------
>  tests/docker/Makefile.include          |  3 ++
>  tests/docker/test-rust                 | 21 ++++++++++
>  10 files changed, 48 insertions(+), 61 deletions(-)
>  create mode 100755 tests/docker/test-rust

Series:

Acked-by: Fabiano Rosas <farosas@suse.de>