Skip to contentSkip to conversation

Build-time tests?

DISCUSSION Joe Lawrence 2 participants 2 messages May 8, 2019 – May 12, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hello kbuild, kselftest,

I've been working on a patchset which adds an additional build script to the toolchain when compiling livepatches. There are a few kernel section features in which this script does not yet support, but can detect and abort when it encounters. To test this detection, I've written a small set of kernel modules that require such sections.

A few questions:

Is build-testing out of scope for kernel selftests? For expediency, it was really easy to spin out new lib/livepatch kernel modules.

Does kbuild support the notion of expected failure? In this case, the build script returns a non-zero error and the build stops.

Am I trying to fit a square peg in a round hole? I could easily keep these build tests in a private branch, but could they exist in a different format somewhere else in the tree?

Suggestions welcome,

-- Joe

#1 lore raw
Quoted 9 lines · Joe Lawrence

Hello kbuild, kselftest,

I've been working on a patchset which adds an additional build script to the toolchain when compiling livepatches. There are a few kernel section features in which this script does not yet support, but can detect and abort when it encounters. To test this detection, I've written a small set of kernel modules that require such sections.

Quoted 7 lines

A few questions:

Is build-testing out of scope for kernel selftests? For expediency, it was really easy to spin out new lib/livepatch kernel modules.

Does kbuild support the notion of expected failure? In this case, the build script returns a non-zero error and the build stops.

If I understood correctly, your are asking about kselftest, maintained by Shuah Khan.

(Unfortunately), makefiles under tools/ adopted completely different build system, and it is out of scope of kbuild.

Quoted 7 lines

Am I trying to fit a square peg in a round hole? I could easily keep these build tests in a private branch, but could they exist in a different format somewhere else in the tree?

Suggestions welcome,

-- Joe

Signature · 2 lines
Best Regards
Masahiro Yamada