[PATCH] latencystats: make errors visible
Stephen Hemminger
stephen at networkplumber.org
Tue Jul 15 17:06:46 CEST 2025
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 <stephen at networkplumber.org>
---
app/test/test_latencystats.c | 3 ++-
lib/latencystats/rte_latencystats.c | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/app/test/test_latencystats.c b/app/test/test_latencystats.c
index 676a99d385..cdfc033b59 100644
--- a/app/test/test_latencystats.c
+++ b/app/test/test_latencystats.c
@@ -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;
}
diff --git a/lib/latencystats/rte_latencystats.c b/lib/latencystats/rte_latencystats.c
index f61d5a273f..1ce94fc5e5 100644
--- a/lib/latencystats/rte_latencystats.c
+++ b/lib/latencystats/rte_latencystats.c
@@ -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;
}
--
2.47.2
More information about the dev
mailing list