Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Matthieu Baerts <matttbe@kernel.org>
Cc: "Maxime Chevallier (Netdev Foundation)"
	<maxime.chevallier@bootlin.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	davem@davemloft.net, Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Donald Hunter <donald.hunter@gmail.com>,
	Simon Horman <horms@kernel.org>, Shuah Khan <shuah@kernel.org>,
	Stanislav Fomichev <sdf@fomichev.me>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	thomas.petazzoni@bootlin.com, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net-next v2 0/2] selftests: drv-net: Allow cross-compiling the hardware tests
Date: Thu, 3 Sep 2026 22:55:31 +0200	[thread overview]
Message-ID: <24d07be4-79e9-4541-b97b-a6735baf5fed@lunn.ch> (raw)
In-Reply-To: <c3f649fa-24b6-41d3-b6a1-7f37edec87ff@kernel.org>

On Thu, Sep 03, 2026 at 07:25:22PM +0200, Matthieu Baerts wrote:
> Hi Andrew,
> 
> On 03/09/2026 19:11, Andrew Lunn wrote:
> >> Tested on an aarch64 target, built on x86_64.
> > 
> > Probably a question for Jakub or Matthieu.
> > 
> > As part of the CI system which is feeding into patchworks, I don't
> > think we build the selftests? Do we have the CPU resources to build
> > them?
> 
> We do: the "build_tools" script [1] checks that. And they are also built
> before launching the selftests.
> 
> > We currently do x86 64 and 32 bit builds. Do we have the CPU resources
> > to do an arm64 cross build?
> 
> I think we do, but I don't know if we need to (see below)
> 
> > I assume a cross build the self tests needs something like buildroot
> > to be sensible? Or Debians multi-arch stuff where you can install .deb
> > packages for libraries for other architectures? So maybe that is going
> > too far?
> 
> >From what I understood, the goal is to execute the selftests on embedded
> systems as well, which will require building new image including the
> kernel and the drivers/net selftests. Do we need to build the whole
> kernel for arm64? :)

I see a few different goals.

Picking a patch at random:

https://patchwork.kernel.org/project/netdevbpf/patch/20260903-netcons_ipv6-v4-2-bdd183c844d3@gmail.com/

We see 32bit, allmodconfig, clang, and clang_rust. These are all
native builds, which given are servers are AMD64, these are AMD64
builds.

However, many of the network drivers are used on ARM platforms. Most
probably do compile on AMD64, but i expect there are a few which
don't. So we could do an ARM64 cross compile, to make sure the patches
are clean on ARM64 as well as AMD64.

We are encouraging developers to write self tests. Ideally we want
self test patches to be held to the same standard as driver
patches. So if a patch touches the self tests, it would be good to
build the self tests in order to show the number of warnings & errors
has not gone up. I expect such a build will be native.

But if we have gone to the time/effort to cross compile the kernel,
can we also cross compile the self tests? Can we ensure with cross
compile self tests don't have more warnings/errors, because the self
test write has AMD64 blinkers on?

And sometime down the road, we would like to get ARM servers, with
NICs in them, to run the self tests on. At that point, we either need
to cross compile the kernel to run all the self tests, or we need
another build server which is ARM64, so it can do native ARM64 builds
of the kernel to run on the ARM64 runners.

     Andrew

  reply	other threads:[~2026-09-03 20:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-03 15:55 [PATCH net-next v2 0/2] selftests: drv-net: Allow cross-compiling the hardware tests Maxime Chevallier (Netdev Foundation)
2026-09-03 15:55 ` [PATCH net-next v2 1/2] tools: ynl: Allow cross-compiling ynl and associated tools Maxime Chevallier (Netdev Foundation)
2026-09-03 16:22   ` Matthieu Baerts
2026-09-03 15:55 ` [PATCH net-next v2 2/2] selftests: drv-net: Use cross-compilation environment for the io_uring check Maxime Chevallier (Netdev Foundation)
2026-09-03 16:22   ` Matthieu Baerts
2026-09-03 16:51 ` [PATCH net-next v2 0/2] selftests: drv-net: Allow cross-compiling the hardware tests Andrew Lunn
2026-09-03 17:25   ` Matthieu Baerts
2026-09-03 21:44   ` Maxime Chevallier
2026-09-03 21:59     ` Andrew Lunn
2026-09-04  6:11       ` Maxime Chevallier
2026-09-03 23:40     ` Jakub Kicinski
2026-09-03 17:11 ` Andrew Lunn
2026-09-03 17:25   ` Matthieu Baerts
2026-09-03 20:55     ` Andrew Lunn [this message]
2026-09-04  9:43       ` Matthieu Baerts

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=24d07be4-79e9-4541-b97b-a6735baf5fed@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=donald.hunter@gmail.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=matttbe@kernel.org \
    --cc=maxime.chevallier@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@fomichev.me \
    --cc=shuah@kernel.org \
    --cc=thomas.petazzoni@bootlin.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox