latencystats: make errors visible
PATCH 1/1 latencystats: make errors visible
This is attempt to get more info from latencystats test failures. When updating stats fails print message with ERR priority so it is not hidden. When updating stats fails in the test print the error code.
Signed-off-by Stephen Hemminger <[email protected]>
--- app/test/test_latencystats.c | 3 ++- lib/latencystats/rte_latencystats.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)
app/test/test_latencystats.c +2 -1
@@ -49,7 +49,8 @@ static int test_latency_update(void)int ret =0 ; ret =rte_latencystats_update (); -TEST_ASSERT (ret >=0 ,"Test Failed: rte_latencystats_update failed" ); +TEST_ASSERT (ret >=0 ,"Test Failed: rte_latencystats_update failed: %d (%s)" , + ret,strerror (-ret));return TEST_SUCCESS ; }
lib/latencystats/rte_latencystats.c +1 -1
@@ -129,7 +129,7 @@ rte_latencystats_update(void) latency_stats_index, values, NUM_LATENCY_STATS);if (ret <0 ) -LATENCY_STATS_LOG (INFO ,"Failed to push the stats" ); +LATENCY_STATS_LOG (ERR ,"Failed to push the stats" );return ret; }
Signature · 1 line
2.47.2