Skip to content

Regresion found on test for M-Module M099

A regression found while running functional tests.

The test for M99 just runs a binary to measure interruption latencies.

the binary used on the test is called "m99_latency" and outputs logs like this:

generating interrupts: timerval=250
(press any key for exit)
    current Interrupt-Latency        |     current Signal-Latency          
  min[us]  avg[us]  max[us]  (irq/s) |  min[us]  avg[us]  max[us]  (sigs/s)
 =================================== | ====================================
     0   4294967295        0    (     0) |      0   4294967295        0    (     0)
4294967292   4294967295        0    (     0) | 4294967292   4294967295        0    (     0)
4294967292   4294967295        0    (     0) | 4294967292   4294967295        0    (     0)
4294967292   4294967295        0    (     0) | 4294967292   4294967295        0    (     0)
4294967292   4294967295        0    (     0) | 4294967292   4294967295        0    (     0)
4294967292   4294967295        0    (     0) | 4294967292   4294967295        0    (     0)
4294967292   4294967295        0    (     0) | 4294967292   4294967295        0    (     0)
4294967292   4294967295        0    (     0) | 4294967292   4294967295        0    (     0)
4294967292   4294967295        0    (     0) | 4294967292   4294967295        0    (     0)
4294967292   4294967295        0    (     0) | 4294967292   4294967295        0    (     0

However, in the latest test run, I got logs like this:

generating interrupts: timerval=250
(press any key for exit)
    current Interrupt-Latency        |     current Signal-Latency          
  min[us]  avg[us]  max[us]  (irq/s) |  min[us]  avg[us]  max[us]  (sigs/s)
 =================================== | ====================================
     0       -1        0    (     0) |      0       -1        0    (     0)
    -4       -1        0    (     0) |     -4       -1        0    (     0)
    -4       -1        0    (     0) |     -4       -1        0    (     0)
    -4       -1        0    (     0) |     -4       -1        0    (     0)
    -4       -1        0    (     0) |     -4       -1        0    (     0)
    -4       -1        0    (     0) |     -4       -1        0    (     0)
    -4       -1        0    (     0) |     -4       -1        0    (     0)
    -4       -1        0    (     0) |     -4       -1        0    (     0)
    -4       -1        0    (     0) |     -4       -1        0    (     0)
    -4       -1        0    (     0) |     -4       -1        0    (     0)

The regression was introduced in commit 8f78d5a33ffa4bfde75d7f04ae03d6174c0e2d12 of submodule 13M099-06

diff --git a/DRIVERS/MDIS_LL/M099/TOOLS/M99_LATENCY/COM/m99_latency.c b/DRIVERS/MDIS_LL/M099/TOOLS/M99_LATENCY/COM/m99_latency.c
index ef761b9..e2db556 100644
--- a/DRIVERS/MDIS_LL/M099/TOOLS/M99_LATENCY/COM/m99_latency.c
+++ b/DRIVERS/MDIS_LL/M099/TOOLS/M99_LATENCY/COM/m99_latency.c
@@ -114,7 +114,7 @@ static void UpdateStats( STATS *st, int32 tval )
 
 static void PrintStats( const STATS *st )
 {
-       printf("%6ld   %6ld   %6ld    (%6ld)",
+       printf("%6d   %6d   %6d    (%6d)",
                   TICKS2US(st->min), 
                   st->count ? TICKS2US(st->avgAcc)/st->count : -1, 
                   TICKS2US(st->max),

Not really critical as this M-Module is only used internally but should be fixed to pass all functional tests