Repository navigation
rootfs: preserve Perl in kselftest ramdisks - #3249
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
trixie-kselftest installs Perl, but the later image cleanup forcibly purges
perl-base. The exec selftest'sbinfmt_script.pygenerates/usr/bin/perlinterpreters, producingrc:127failures in the resulting ramdisk.Add an opt-in
--keep-perlcleanup 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.