[quality] test: BATS coverage for build_scripts/overrides/nvidia/20-nvidia.sh + overrides/x86_64/20-zfs.sh - #561
Open
kubestellar-hive[bot] wants to merge 1 commit into
Open
Conversation
build_scripts/overrides/nvidia/20-nvidia.sh (128 lines) and build_scripts/overrides/x86_64/20-zfs.sh (38 lines) had zero unit coverage. Both run inside the image build with set -euo pipefail and decide which akmods RPMs get installed against the qualified kernel; a regression there ships a broken initramfs. Adds tests/unit/nvidia_test.bats (27 tests) and tests/unit/zfs_test.bats (14 tests) using the existing sandbox pattern from packages_test.bats: absolute paths sed-rewritten into BATS_TEST_TMPDIR, stub rpm/dnf/dracut/ depmod/systemctl/semodule/nvidia-ctk on PATH, invocations asserted from log files. Covered behaviour: - nvidia: kmod RPM filtering on 'kernel-uname-r = $QUALIFIED_KERNEL', empty-match fail-closed, non-kmod RPM passthrough, ublue-os maxdepth 1, FEDORA_VERSION resolution (default 43 / FEDORA_AKMODS_VERSION / .fc NVR), repofrompath + gpgcheck pinning, 3:$KMOD_VERSION driver pinning, kmod/driver version-mismatch fail-closed, nouveau blacklist and bootc kargs contents, dracut omit_drivers -> force_drivers rewrite with i915/amdgpu injection, missing nvidia-modeset.conf tolerance on SBSA, initramfs rebuild flags, nvidia-ctk no-cgroups patch. - zfs: empty-RPM-set fail-closed, python3-pyzfs split out of the main transaction and installed with --skip-broken, maxdepth/non-rpm filtering, depmod on KERNEL_VRA, modules-load.d autoload, initramfs rebuild flags, last-kernel selection. No production code changed. Signed-off-by: sec-check[bot] <sec-check[bot]@users.noreply.github.com>
hanthor
approved these changes
Sep 2, 2026
hanthor
left a comment
Member
There was a problem hiding this comment.
New tests/unit/nvidia_test.bats (26 tests) + zfs_test.bats (13 tests), test-only. Not vacuous — sandboxes the real scripts with stubbed rpm/dnf/dracut/etc. and asserts concrete side effects (exact dnf args, kmod-kernel matching, generated file contents, specific failure messages). CI (Lint, bats) green.
Generated by Claude Code
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.
— hive: agent=quality backend=copilot model=claude-opus-5