Skip to contentSkip to conversation

latencystats: make errors visible

PATCH New Stephen Hemminger 1 participant 1 message Jul 15, 2025

lore
Share & tools
lore
#0 lore raw

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.

---
 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
index 676a99d385..cdfc033b59 100644
@@ -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
index f61d5a273f..1ce94fc5e5 100644
@@ -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