From: Chris Rauer Date: Fri, 29 Sep 2023 00:08:31 +0000 (+0000) Subject: tests/qtest: Fix npcm7xx_timer-test.c flaky test X-Git-Tag: v8.2.0-rc0~71^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d0353b6e7b3f9ba6132f0fa9b3605e4d4275af0c;p=thirdparty%2Fqemu.git tests/qtest: Fix npcm7xx_timer-test.c flaky test npcm7xx_timer-test occasionally fails due to the state of the timers from the previous test iteration. Advancing the clock step after the reset resolves this issue. Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1897 Signed-off-by: Chris Rauer Message-ID: <20230929000831.691559-1-crauer@google.com> Signed-off-by: Thomas Huth --- diff --git a/tests/qtest/npcm7xx_timer-test.c b/tests/qtest/npcm7xx_timer-test.c index 43711049ca7..58f58c2f71b 100644 --- a/tests/qtest/npcm7xx_timer-test.c +++ b/tests/qtest/npcm7xx_timer-test.c @@ -465,6 +465,7 @@ static void test_periodic_interrupt(gconstpointer test_data) int i; tim_reset(td); + clock_step_next(); tim_write_ticr(td, count); tim_write_tcsr(td, CEN | IE | MODE_PERIODIC | PRESCALE(ps));