On 9/11/2024 1:08 AM, Morten Brørup wrote: >> From: Ferruh Yigit [mailto:ferruh.yi...@amd.com] >> Sent: Wednesday, 11 September 2024 01.48 >> >> On 9/10/2024 5:56 PM, Morten Brørup wrote: >>> It would be convenient if the CI checked that the symbols in >> version.map files actually exist in the resulting code. >>> >> >> Is there instances that is not the case? > > While reviewing a patch, I noticed one such instance. > A previous version of the patch contained a global variable that had since > been removed, but not from the version.map file. > > Specifically "rte_lcore_var" in this earlier version: > https://patchwork.dpdk.org/project/dpdk/patch/20240208181644.455233-2-mattias.ronnb...@ericsson.com/ > > Which in this more recent patch has been removed, but remains in version.map: > https://patchwork.dpdk.org/project/dpdk/patch/20240910070344.699183-2-mattias.ronnb...@ericsson.com/ >
I expect build to catch them, via `./buildtools/check-symbols.sh`, which uses `./devtools/check-symbol-maps.sh` internally. I did a quick check, and add a non-existing symbol to a version.map file, build failed [1] as expected. For 'rte_lcore_var' instance, `check-symbol-maps.sh` does not catch it, but if you update the variable name in version.map to 'rte_lcore_bar' it does catch :) So I assume `check-symbol-maps.sh` uses wildcard search, and because of existing 'rte_lcore_var_alloc', detection fails. Probably we need to fix `check-symbol-maps.sh` for this, and build will catch extra symbols. [1] [133/264] Generating lib/ethdev.sym_chk with a custom command (wrapped by meson to capture output) FAILED: lib/ethdev.sym_chk