On 23/05/2024 12.28, Dmitry Frolov wrote:
If QTestState was already CLOSED due to error, calling qtest_clock_step()
afterwards makes no sense and only raises false-crash with message:
"assertion timer != NULL failed".

Signed-off-by: Dmitry Frolov <fro...@swemel.ru>
---
  tests/qtest/fuzz/virtio_net_fuzz.c | 3 +++
  1 file changed, 3 insertions(+)

diff --git a/tests/qtest/fuzz/virtio_net_fuzz.c 
b/tests/qtest/fuzz/virtio_net_fuzz.c
index e239875e3b..2f57a8ddd8 100644
--- a/tests/qtest/fuzz/virtio_net_fuzz.c
+++ b/tests/qtest/fuzz/virtio_net_fuzz.c
@@ -81,6 +81,9 @@ static void virtio_net_fuzz_multi(QTestState *s,
          /* Run the main loop */
          qtest_clock_step(s, 100);
          flush_events(s);
+        if (!qtest_probe_child(s)) {
+            return;
+        }

According to your patch description, it rather sounds like the check should be done before the qtest_clock_step() ? ... or where does the QTestState get closed? During flush_events() ?

 Thomas


Reply via email to