dev-debug/bpftrace: only check host kernel config when running tests

When tests are enabled, linux-info will check an on-disk configuration
first before checking the running kernel. This fails when the tests
are run in e.g. a container which contains a valid kernel configuration
on disk, but the host kernel does not. Fix this by forcing linux-info
to look for kernel sources in a directory that (hopefully) does not
exist and therefore fall back to runtime checks only.

Closes: https://bugs.gentoo.org/977516
Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
Part-of: https://codeberg.org/gentoo/gentoo/pulls/1215
Merges: https://codeberg.org/gentoo/gentoo/pulls/1215
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
This commit is contained in:
Holger Hoffstätte
2026-06-22 08:46:16 +02:00
committed by Joonas Niilola
parent f9d237f84c
commit 7a96a8a0e2
4 changed files with 24 additions and 0 deletions

View File

@@ -89,6 +89,12 @@ pkg_pretend() {
~HAVE_EBPF_JIT
"
if use test; then
# force linux-info to check kernel configurations only in the
# running kernel, not in any on-disk configuration (bug 977516)
KERNEL_DIR="linux-info-runtime-checks-only"
fi
check_extra_config
if use test; then

View File

@@ -88,6 +88,12 @@ pkg_pretend() {
~HAVE_EBPF_JIT
"
if use test; then
# force linux-info to check kernel configurations only in the
# running kernel, not in any on-disk configuration (bug 977516)
KERNEL_DIR="linux-info-runtime-checks-only"
fi
check_extra_config
if use test; then

View File

@@ -88,6 +88,12 @@ pkg_pretend() {
~HAVE_EBPF_JIT
"
if use test; then
# force linux-info to check kernel configurations only in the
# running kernel, not in any on-disk configuration (bug 977516)
KERNEL_DIR="linux-info-runtime-checks-only"
fi
check_extra_config
if use test; then

View File

@@ -88,6 +88,12 @@ pkg_pretend() {
~HAVE_EBPF_JIT
"
if use test; then
# force linux-info to check kernel configurations only in the
# running kernel, not in any on-disk configuration (bug 977516)
KERNEL_DIR="linux-info-runtime-checks-only"
fi
check_extra_config
if use test; then