zhhyu7 opened a new pull request, #4142: URL: https://github.com/apache/nuttx-apps/pull/4142
## Summary
`net_bufpool` is being replaced by `mm/mempool` in nuttx, which leaves this
test without the code it tests.
`testing/nettest/others/test_others_bufpool.c` exercises `net_bufpool` and
nothing else. It declares a fixed, a limited and an unlimited pool with
`NET_BUFPOOL_DECLARE()`, then checks the preallocation, the `maxalloc`
ceiling and the unlimited expansion through `NET_BUFPOOL_ALLOC()`,
`_TRYALLOC()`, `_FREE()` and `_TEST()`. It reaches the declarations in the
private `net/utils/utils.h` through the `-I$(TOPDIR)/net` that the Makefile
adds, which is also why `TESTING_NET_OTHERS` depends on `BUILD_FLAT`. None
of those macros exist after the nuttx change, so the file stops compiling.
This removes the test file, its registration in `test_others.c`, its
prototype in `test_others.h` and its entries in `Makefile` and
`CMakeLists.txt`. The help text of `TESTING_NET_OTHERS` no longer mentions
`net_bufpool_*()`.
The equivalent coverage for `mempool` belongs with `mm/mempool` rather than
in a network test, so it is not carried over here.
Related nuttx pull request: `net: replace net_bufpool with mempool`. That
one must merge **after** this, and says so.
## Impact
* New feature added? NO.
* Impact on user? NO for anyone who does not run this test. The
`cmocka_net_others` program loses one of its two test cases; the
`chksum_iob()` case is untouched and still runs.
* Impact on build? NO on its own. This patch applies to current nuttx
master and the build stays green; the only effect is one test fewer. It
is required for the nuttx-side removal, though: with this test still in
place, every configuration with `CONFIG_TESTING_NET_OTHERS=y` fails to
build once `net_bufpool` is gone.
* Impact on hardware? NO.
* Impact on documentation? NO. The only documentation text that mentioned
`net_bufpool_*()` was the `TESTING_NET_OTHERS` help text, updated here.
* Impact on security? NO.
* Impact on compatibility? NO. `CONFIG_TESTING_NET_OTHERS` keeps its name,
its default and its `BUILD_FLAT` dependency, because `chksum_iob()` still
needs the private include path.
* Anything else? No other code in nuttx-apps refers to `net_bufpool`:
$ grep -rn 'net_bufpool\|NET_BUFPOOL' --include=*.c --include=*.h \
--include=Kconfig --include=Makefile --include=CMakeLists.txt .
(no output)
## Testing
Build Host: Linux x86_64, GCC (host compiler for the simulator).
Target: sim:citest, flat build, with CONFIG_TESTING_NET_TEST=y and
CONFIG_TESTING_NET_OTHERS=y
, which is what compiles this **test.**
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
