[PATCH net-next v1 1/4] net: selftests: drop test index from net_selftest_get_strings()
From: Oleksij Rempel
Date: Wed Apr 16 2025 - 12:15:05 EST
The test index is redundant and reduces available space for test names,
which are already limited to ETH_GSTRING_LEN (32 bytes). Removing the
index improves readability in tools like `ethtool -t`, especially when
longer test names are used.
Before this change:
3. PHY internal loopback, enab
7. PHY internal loopback, disa
After this change:
PHY internal loopback, enable
PHY internal loopback, disable
Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>
---
net/core/selftests.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/core/selftests.c b/net/core/selftests.c
index 35f807ea9952..3c3e2b2a22c9 100644
--- a/net/core/selftests.c
+++ b/net/core/selftests.c
@@ -408,8 +408,7 @@ void net_selftest_get_strings(u8 *data)
int i;
for (i = 0; i < net_selftest_get_count(); i++)
- ethtool_sprintf(&data, "%2d. %s", i + 1,
- net_selftests[i].name);
+ ethtool_sprintf(&data, "%s", net_selftests[i].name);
}
EXPORT_SYMBOL_GPL(net_selftest_get_strings);
--
2.39.5