From: Matthieu Baerts <matttbe@kernel.org>
To: Ilya Maximets <i.maximets@ovn.org>
Cc: Netdev <netdev@vger.kernel.org>
Subject: Re: [ANN] Containers to run Netdev CI tests locally
Date: Fri, 4 Sep 2026 16:54:25 +0200 [thread overview]
Message-ID: <e6d815d3-ed9b-4904-8cbe-8e5ee226661b@kernel.org> (raw)
In-Reply-To: <dc460046-82bc-4c20-870e-716dee54a6cb@ovn.org>
Hi Ilya,
Thank you for your reply!
On 04/09/2026 16:01, Ilya Maximets wrote:
> On 9/3/26 6:19 PM, Matthieu Baerts wrote:
>>
>> 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?
Just in case, here are the recommended commands to execute to run the
selftests per target:
alias run="${nipa}/docker/selftests/run.sh"
rm -f .config
config="tools/testing/selftests/${target}/config"
run vng --build -v --force --config "${config}" ## + debug
run make headers
run make -C tools/testing/selftests TARGETS="${target}"
run sudo vng -v --run . --user root -a mitigations=off --cpus 4 \
--rw --network loop -- \
make -C tools/testing/selftests TARGETS="${target}" run_tests
> The $(pwd) part is a little tricky since it will be resolved outside of
> the container. I didn't try if that works.
Note that in the container, the current directory is mounted at the same
place. So $(pwd) can be used.
[1]
https://docs.kernel.org/dev-tools/kselftest.html#contributing-new-tests-details
Cheers,
Matt
next prev parent reply other threads:[~2026-09-04 14:54 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-03 16:19 [ANN] Containers to run Netdev CI tests locally Matthieu Baerts
2026-09-04 6:59 ` Hangbin Liu
2026-09-04 8:33 ` Matthieu Baerts
2026-09-04 11:44 ` Hangbin Liu
2026-09-04 17:29 ` Matthieu Baerts
2026-09-04 14:01 ` Ilya Maximets
2026-09-04 14:54 ` Matthieu Baerts [this message]
2026-09-04 15:25 ` Ilya Maximets
2026-09-04 16:17 ` Matthieu Baerts
2026-09-04 16:37 ` Ilya Maximets
2026-09-08 15:56 ` Stanislav Fomichev
2026-09-08 16:25 ` Matthieu Baerts
2026-09-08 17:35 ` Stanislav Fomichev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e6d815d3-ed9b-4904-8cbe-8e5ee226661b@kernel.org \
--to=matttbe@kernel.org \
--cc=i.maximets@ovn.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.