Skip to contentSkip to conversation

tests/qtest: Fix npcm7xx_timer-test.c flaky test

PATCH Superseded Chris Rauer 2 participants 3 messages Sep 28, 2023 – Sep 29, 2023

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/qtest: Fix npcm7xx_timer-test.c flaky test

---
 tests/qtest/npcm7xx_timer-test.c | 1 +
 1 file changed, 1 insertion(+)
tests/qtest/npcm7xx_timer-test.c +1 -0
index 43711049ca..58f58c2f71 100644
@@ -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));
Signature · 1 line
2.42.0.515.g380fc7ccd1-goog
#1 lore raw

On 28/09/2023 05.45, Chris Rauer wrote:

Could you please add a proper patch description how this is fixing the issue?

Thanks,
Thomas

Quoted 18 lines
---
  tests/qtest/npcm7xx_timer-test.c | 1 +
  1 file changed, 1 insertion(+)
tests/qtest/npcm7xx_timer-test.c +1 -0
index 43711049ca..58f58c2f71 100644
@@ -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));
#2 lore raw

Ack. will send out v2.

Quoted 31 lines · Thomas Huth

On 28/09/2023 05.45, Chris Rauer wrote:

Could you please add a proper patch description how this is fixing the issue?

Thanks,
Thomas

Review

Quoted 7 lines
---
  tests/qtest/npcm7xx_timer-test.c | 1 +
  1 file changed, 1 insertion(+)
(quoted diff) +0 -0

b/tests/qtest/npcm7xx_timer-test.c

tests/qtest/npcm7xx_timer-test.c static void test_periodic_interrupt(gconstpointer

Quoted 4 lines

index 43711049ca..58f58c2f71 100644

tests/qtest/npcm7xx_timer-test.c +0 -0
@@ -465,6 +465,7 @@ static void test_periodic_interrupt(gconstpointer

test_data)

Quoted 7 lines
tests/qtest/npcm7xx_timer-test.c +1 -0
      int i;
 
      tim_reset(td);
+    clock_step_next();
 
      tim_write_ticr(td, count);
      tim_write_tcsr(td, CEN | IE | MODE_PERIODIC | PRESCALE(ps));