|SUCCESS| [v2,1/1] log: add name query functions
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Thu Nov 19 19:55:26 CET 2026
Test-Label: ai-code-review
Test-Status: SUCCESS
https://dpdk.org/patch/173052
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-11-19
Info
1. app/test/test_logs.c: the test passes the return value straight to `strcmp()`.
```
TEST_ASSERT(strcmp(rte_log_get_level_name(RTE_LOG_ERR), "error") == 0,
```
```
TEST_ASSERT(strcmp(rte_log_get_type_name(logtype1), "logtype1") == 0,
```
If a regression makes either function return NULL, the test segfaults instead of failing cleanly. Check for NULL first, for example:
```
name = rte_log_get_level_name(RTE_LOG_ERR);
TEST_ASSERT_NOT_NULL(name, "no name for error log level\n");
TEST_ASSERT(strcmp(name, "error") == 0, ...);
```
The same applies to the "disabled" and "logtype1" checks.
2. lib/log/rte_log.h vs lib/log/log.c: the parameter name differs between the declaration and the definition.
- The header declares `const char *rte_log_get_type_name(uint32_t logtype);`.
- The definition is `rte_log_get_type_name(uint32_t type)`.
Consider using `logtype` in both so the Doxygen `@param logtype` matches the implementation.
Review-Result: CLEAN
More information about the test-report
mailing list