Re: [ANN] Containers to run Netdev CI tests locally
From: Ilya Maximets <i.maximets@ovn.org>
Date: 2026-09-04 16:37:56
On 9/4/26 6:17 PM, Matthieu Baerts wrote:
On 04/09/2026 17:25, Ilya Maximets wrote:quoted
On 9/4/26 4:54 PM, Matthieu Baerts wrote:quoted
Hi Ilya, Thank you for your reply! On 04/09/2026 16:01, Ilya Maximets wrote:quoted
On 9/3/26 6:19 PM, Matthieu Baerts wrote:quoted
A wiki page has been added to cover this and explain how to validate the different tests: https://github.com/linux-netdev/nipa/wiki/Running-Netdev-CI-tests-locally To help developers, containers are now built, packing all the required dependencies to run these tests in order to run the tests in an environment that would be as close as possible to the CI one. The goal is to have an environment that is easy to maintain -- no heavy optimisations to reduce the images size -- but also easy to use. In short, people (and non-humans) can continue to use the different tools as before, but add a prefix to the different commands to execute them from a container, e.g. alias run="${nipa}/docker/selftests/run.sh" run vng --build run make headers (...)The headers are not used unless the USERCFLAGS="-I$(pwd)/usr/include" is passed into the actual make command for the selftests. So, uAPI changes will not be picked up. Would be good to fix that in the wiki.I think setting USERCFLAGS is not supposed to be required for this purpose: KHDR_INCLUDES is there for that. According to the doc [1], each target building binaries should have "CFLAGS = $(KHDR_INCLUDES)" in their Makefile. If KHDR_INCLUDES is not set by the user, then lib.mk will set it to "-I$(top_srcdir)/usr/include", so the default directory when "make headers" is used. It needs to be adapted with building in a different directory. At least, when validating all net and drv-net selftests on my side, I didn't need to specify extra CFLAGS. (I think the netfilter target is missing KHDR_INCLUDES, I will fix that.) Or did you have to do that for a specific target?I was actually having trouble with the netfilter target specifically as I'm working on a patch that changes uAPI and the selftest build can't pick it up without the USERCFLAGS. But if it's actually a bug in the makefile for that target, then it's better to fix this target, of course, instead of changing the docs. :)Indeed, it looks like you picked a target not setting KHDR_INCLUDES :) Apparently the net/forwarding one also had the same issue. Fixes have been sent. Don't hesitate to validate them ;) https://lore.kernel.org/20260904-net-sft-nf-khdr_includes-v1-0-92455af428e9@kernel.org/ (local)
Will do. Thanks! Best regards, Ilya Maximets.