|WARNING| sched: fix infinite loop in rational approximation
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Thu Nov 26 07:19:40 CET 2026
Test-Label: ai-code-review
Test-Status: WARNING
https://dpdk.org/patch/173187
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-11-26
**Warning: `rte_approx.h` is included outside the Windows guard**
In `app/test/test_sched.c` the new include sits above the `#ifdef RTE_EXEC_ENV_WINDOWS` block:
```
+#include <rte_approx.h>
#include <rte_cycles.h>
```
The existing sched header (`#include <rte_sched.h>`) is included only in the non-Windows `#else` branch. On Windows the sched library is not built, so its headers are not on the test include path. An unconditional `#include <rte_approx.h>` can therefore break the Windows build of `app/test`.
The Windows stub for `test_sched_approx()` does not use anything from this header. Move the include into the `#else` branch next to `#include <rte_sched.h>`.
**Info: test functions return 0 instead of `TEST_SUCCESS`**
```
+ return 0;
```
The new `test_sched_approx()` returns `0` rather than `TEST_SUCCESS`. The values are the same, so this is only a readability point. It matches the existing `test_sched()` style in this file.
Review-Result: WARNING
More information about the test-report
mailing list