Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: Thorsten Leemhuis <linux@leemhuis.info>
Cc: "Nathan Chancellor" <nathan@kernel.org>,
	"Nicolas Schier" <nsc@kernel.org>,
	linux-kbuild@vger.kernel.org, "Shuah Khan" <shuah@kernel.org>,
	linux-kselftest@vger.kernel.org,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Ingo Molnar" <mingo@redhat.com>,
	"Arnaldo Carvalho de Melo" <acme@kernel.org>,
	"Namhyung Kim" <namhyung@kernel.org>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Alexander Shishkin" <alexander.shishkin@linux.intel.com>,
	"Jiri Olsa" <jolsa@kernel.org>, "Ian Rogers" <irogers@google.com>,
	"Adrian Hunter" <adrian.hunter@intel.com>,
	"James Clark" <james.clark@linaro.org>,
	linux-perf-users@vger.kernel.org,
	"Thomas Weißschuh" <linux@weissschuh.net>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v2 0/7] kbuild: build the userspace tools in tools/ with the kernel
Date: Tue, 20 Oct 2026 08:43:09 -0400	[thread overview]
Message-ID: <20261020124309.3022372-1-sashal@kernel.org> (raw)
In-Reply-To: <e77d6e7e-bc46-4363-8bea-d95ed521b5ab@leemhuis.info>

On Tue, Oct 20, 2026 at 01:52:17PM +0200, Thorsten Leemhuis wrote:
>I noticed that "keeps what is built the same on every machine" in 3/6.
>But is it explained anywhere why this is the done?
>
>I wonder, as the overall goal of this patch set is to increase build
>coverage. So why disable optional features that could be built on
>machines that have the required userland libs installed?

Only allmodconfig and allyesconfig turn TOOLS_BUILD_PERF_MINIMAL on. It is off
by default, and then perf is built as a standalone build would build it, with
every feature whose libraries are installed.

For allmodconfig the main reason is that perf's feature detection does not
always turn a feature off when its library is missing: without libelf,
libtraceevent, pkg-config, or python for jevents, the build stops with an
error. Building perf with everything it detects would make those a requirement
for "make allmodconfig all" on every machine, and cross builds would fail
unless the target's libraries are installed as well.

The rest is about reproducing failures: when a bot reports that allmodconfig
breaks perf, the same build should break on the developer's machine too,
whatever libraries it has.

>Isn't that in a very limited scope what we do for the kernel itself
>already, as some small aspects of the build environment (like the
>versions of gcc or rust installed or the availability of things like
>gcc-plugins) already influence somewhat what is built when you run "make
>allmodconfig all"? Or do I misremember this bit?

You remember it right. The difference is that Kconfig probes for those, so a
missing tool turns the option off rather than failing the build, and the result
is recorded in .config.

That is how I'd like to add the selftests that need libraries: a Kconfig
probe per library, so allmodconfig builds them where the libraries are
installed and .config says which ones were built.

-- 
Thanks,
Sasha

  reply	other threads:[~2026-10-20 12:43 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-16 14:31 [RFC PATCH v2 0/7] kbuild: build the userspace tools in tools/ with the kernel Sasha Levin
2026-10-16 14:31 ` [RFC PATCH v2 1/7] kbuild: factor the userspace ABI flags out into KBUILD_USERABI Sasha Levin
     [not found]   ` <sashiko-outbox-175552@kernel.org>
2026-10-18 14:39     ` Sasha Levin
2026-10-16 14:31 ` [RFC PATCH v2 2/7] kbuild: add "make tools_build" to build userspace tools from tools/ Sasha Levin
     [not found]   ` <sashiko-outbox-175553@kernel.org>
2026-10-18 14:39     ` Sasha Levin
2026-10-16 14:31 ` [RFC PATCH v2 3/7] perf build: Add MINIMAL=1 to build without optional features Sasha Levin
2026-10-16 15:41   ` Ian Rogers
2026-10-18 13:53     ` Sasha Levin
2026-10-16 14:31 ` [RFC PATCH v2 4/7] tools: build perf in tools_build Sasha Levin
2026-10-16 14:31 ` [RFC PATCH v2 5/7] tools: build kernel selftests " Sasha Levin
2026-10-16 16:17   ` Shuah Khan
     [not found]   ` <sashiko-outbox-175556@kernel.org>
2026-10-18 14:39     ` Sasha Levin
2026-10-16 14:31 ` [RFC PATCH v2 6/7] kbuild: build the tools selected in tools/Kconfig as part of "make all" Sasha Levin
2026-10-16 14:31 ` [RFC PATCH v2 7/7] Documentation: describe building tools with the kernel Sasha Levin
2026-10-20 11:52 ` [RFC PATCH v2 0/7] kbuild: build the userspace tools in tools/ " Thorsten Leemhuis
2026-10-20 12:43   ` Sasha Levin [this message]
2026-10-20 13:14     ` Thorsten Leemhuis

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=20261020124309.3022372-1-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=irogers@google.com \
    --cc=james.clark@linaro.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linux@leemhuis.info \
    --cc=linux@weissschuh.net \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=nathan@kernel.org \
    --cc=nsc@kernel.org \
    --cc=peterz@infradead.org \
    --cc=shuah@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox