Skip to content

rootfs: preserve Perl in kselftest ramdisks - #3249

Merged
nuclearcat merged 1 commit into
kernelci:mainfrom
nuclearcat:fix/kselftest-preserve-perl
Oct 21, 2026
Merged

nuclearcat merged 1 commit into
kernelci:mainfrom
nuclearcat:fix/kselftest-preserve-perl

Conversation

@nuclearcat

Copy link
Copy Markdown
Member

trixie-kselftest installs Perl, but the later image cleanup forcibly purges perl-base. The exec selftest's binfmt_script.py generates /usr/bin/perl interpreters, producing rc:127 failures in the resulting ramdisk.

Add an opt-in --keep-perl cleanup flag and enable it for trixie-kselftest. Used alone, the flag retains the full default cleanup sequence. Explicit component selection and the default behavior of other images are preserved.

Validation: all 187 unit tests pass. The new regressions execute the actual shell script with package and filesystem operations stubbed, covering default cleanup, the configured kselftest image, and both option orders with explicit components. Shell syntax, all 19 rootfs configurations, and CI-pinned Ruff checks pass. Deployment still requires rebuilding and booting the ramdisk.

trixie-kselftest installs Perl, but the later crush step forcibly purges
perl-base. exec/binfmt_script.py generates interpreters with a
/usr/bin/perl shebang, so the resulting ramdisk produces rc:127 failures
instead of testing the intended execution behavior.

Add an opt-in --keep-perl flag and enable it for trixie-kselftest.
A flag without component names still runs the full default cleanup;
explicit component selection and other images retain their behavior.

Exercise the real shell script with destructive commands stubbed, checking
both default cleanup and configured kselftest cleanup, including option
ordering with explicit components.

Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
@nuclearcat
nuclearcat added this pull request to the merge queue Oct 21, 2026
Merged via the queue into kernelci:main with commit 9b87ac8 Oct 21, 2026
3 checks passed
@nuclearcat
nuclearcat deleted the fix/kselftest-preserve-perl branch October 21, 2026 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant