|WARNING| [v2] test/event_eth_tx_adapter: skip tests if no eventdev
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Tue Jul 21 19:23:46 CEST 2026
Test-Label: ai-code-review
Test-Status: WARNING
https://dpdk.org/patch/166846
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-07-21
# Review of DPDK Patch: test/event_eth_tx_adapter: skip tests if no eventdev
## Summary
This patch modifies the test suite setup to skip tests gracefully when no event device is available and the SW eventdev driver is not compiled in, rather than failing. The logic conditionally creates an SW eventdev only when `RTE_EVENT_SW` is defined.
---
## Errors
None found.
---
## Warnings
### 1. Variable scope unnecessarily widened by conditional compilation
**Issue:** The `vdev_name` variable declaration is moved inside the `#ifdef RTE_EVENT_SW` block, but the variable initialization (`"event_sw0"`) could be compile-time constant. While the current code is functionally correct, declaring `vdev_name` only within the `ifdef` where it's used is good practice and the patch does this correctly.
**Action:** No change needed - the patch already follows best practice here.
---
## Info
### 1. Consider adding release notes entry
**Context:** This patch changes test behavior (converting a failure to a skip) which could be significant for CI systems and test runners.
**Suggestion:** Consider whether a brief release notes entry under "**Tested Platforms**" or "**Known Issues**" would be appropriate to document that these tests are now properly skipped when event/sw is not compiled, rather than failing.
**Rationale:** While test-only changes typically don't require release notes per the guidelines, this changes CI/test behavior from FAIL to SKIP, which automation may care about.
---
## Positive Observations
1. **Correct test skip usage:** The patch properly uses `TEST_SKIPPED` when the required driver is unavailable, which is the correct pattern for optional feature tests.
2. **Preserves failure case:** The patch correctly maintains the original error checking when `RTE_EVENT_SW` is defined but `rte_vdev_init()` fails - this is important to catch actual failures versus unavailability.
3. **Good use of conditional compilation:** The `#ifdef RTE_EVENT_SW` approach correctly checks for compile-time availability of the SW eventdev driver.
4. **Variable scope:** Moving `vdev_name` inside the conditional block is good practice - it's only needed when creating the vdev.
5. **Clear user feedback:** Both the original "testing with event_sw0" message and the new "skipping test" message provide clear information about why the test behavior differs.
---
## Conclusion
The patch is well-structured and correctly addresses the issue of test failures when no event device is available. No errors were found. The optional suggestion about release notes is informational only - test-only changes typically don't require them, but the behavior change from FAIL-SKIP might be worth documenting for CI system maintainers.
More information about the test-report
mailing list