[PATCH] meta/classes-recipe/linux-kselftest: remove forced ISAR_CROSS_COMPILE = "0"

8 views
Skip to first unread message

srinuv...@siemens.com

unread,
Dec 10, 2025, 10:52:00 PM (7 days ago) Dec 10
to isar-...@googlegroups.com, srinuvasan
From: srinuvasan <srinuv...@siemens.com>

Removing the forced ISAR_CROSS_COMPILE = "0" improves kselftest build performance.
When cross-compilation is disabled, kselftests are executed under
QEMU emulated environment for foreign architectures, which significantly increases build time.
By dropping this override, ISAR can correctly enable or disable cross-compilation
based on the target architecture, resulting in much faster builds for non-native architectures.

Note: The memfd test case passes under both native and cross builds.
If you observe inconsistencies in other test cases,
they should be investigated and addressed in the upstream kselftest framework.

Signed-off-by: srinuvasan <srinuv...@siemens.com>
---
meta/classes-recipe/linux-kselftest.bbclass | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)

diff --git a/meta/classes-recipe/linux-kselftest.bbclass b/meta/classes-recipe/linux-kselftest.bbclass
index ec2d267e..67165683 100644
--- a/meta/classes-recipe/linux-kselftest.bbclass
+++ b/meta/classes-recipe/linux-kselftest.bbclass
@@ -8,11 +8,6 @@

inherit dpkg

-# Some test-cases like memfd compilation failed in cross-compilation.
-# Force native compilation for now to have consistent output across
-# ISAR native/cross compilation setups.
-ISAR_CROSS_COMPILE = "0"
-
DESCRIPTION ?= "Kernel selftests from Linux kernel ${PV}"

DEBIAN_BUILD_DEPENDS ?= " \
@@ -20,13 +15,13 @@ DEBIAN_BUILD_DEPENDS ?= " \
flex, \
bison, \
${@ 'fuse' if d.getVar('BASE_DISTRO_CODENAME') in ['bullseye', 'buster'] else 'fuse3'}, \
- libelf-dev:native, \
- libcap-ng-dev:native, \
- libpopt-dev:native, \
- libcap-dev:native, \
- libmount-dev:native, \
- libfuse-dev:native, \
- libmnl-dev:native, \
+ libelf-dev, \
+ libcap-ng-dev, \
+ libpopt-dev, \
+ libcap-dev, \
+ libmount-dev, \
+ libfuse-dev, \
+ libmnl-dev, \
pkg-config, \
clang:native, \
llvm:native, \
--
2.39.5

Anton Mikanovich

unread,
Dec 16, 2025, 2:29:30 AM (yesterday) Dec 16
to srinuv...@siemens.com, isar-...@googlegroups.com
11/12/2025 05:51, srinuvasan.a via isar-users wrote:
> From: srinuvasan <srinuv...@siemens.com>
>
> Removing the forced ISAR_CROSS_COMPILE = "0" improves kselftest build performance.
> When cross-compilation is disabled, kselftests are executed under
> QEMU emulated environment for foreign architectures, which significantly increases build time.
> By dropping this override, ISAR can correctly enable or disable cross-compilation
> based on the target architecture, resulting in much faster builds for non-native architectures.
>
> Note: The memfd test case passes under both native and cross builds.
> If you observe inconsistencies in other test cases,
> they should be investigated and addressed in the upstream kselftest framework.
>
> Signed-off-by: srinuvasan <srinuv...@siemens.com>
Applied to next, thanks.

MOESSBAUER, Felix

unread,
Dec 16, 2025, 3:26:48 AM (yesterday) Dec 16
to ami...@ilbers.de, isar-...@googlegroups.com, Arjunan, Srinu
Thanks for addressing this. This also was one of my findings regarding
inconsistencies in the testsuite (kselftests where part of the cross
test, but they were not cross). That's now consistent again.

Felix
Reply all
Reply to author
Forward
0 new messages