aboutsummaryrefslogtreecommitdiff
path: root/testing-strategy.org
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-04-27 13:20:30 -0500
committerCraig Jennings <c@cjennings.net>2026-04-27 13:20:30 -0500
commit6dcdf180289823fceda376c67af9d4ea659463a8 (patch)
tree28ddf17a13f70c7a05abe9a196888f3f66512a2a /testing-strategy.org
parent26f3f823ac17940a1b0153619f6140f45d856e33 (diff)
downloadarchangel-6dcdf180289823fceda376c67af9d4ea659463a8.tar.gz
archangel-6dcdf180289823fceda376c67af9d4ea659463a8.zip
refactor: extract MNTPOINT constant for the install chroot mount point
Last on the tech-debt drain. The installer hardcoded /mnt at 50+ sites: pacstrap, arch-chroot, mount/umount, fstab writes, and every host-side write into the chroot's /etc, /usr, /var, /boot, /tmp. Same magic-string smell as /mnt/efi but at much larger scale. Add MNTPOINT="/mnt" to lib/common.sh next to EFI_DIR. Replace literal /mnt/... with $MNTPOINT/... across installer/archangel, installer/lib/btrfs.sh, and installer/lib/common.sh. Replace bare /mnt (mount target, arch-chroot root, umount target, install_dropin parameter) with $MNTPOINT. EFI_DIR's own definition becomes EFI_DIR="$MNTPOINT/efi" for the natural composition. Folded in the related ticket: /mnt${chroot_efi_dir} in btrfs.sh:install_grub_all_efi becomes ${MNTPOINT}${chroot_efi_dir}. Was filed as a separate item but the ticket said it should ship with the MNTPOINT extraction, since the composition pattern is unusual and easy to miss in a global sed. Three /mnt references kept literal in comments where the comment describes the string concept rather than the mount point ("Remove /mnt prefix - config is used inside chroot where root is /", etc.). Substituting to $MNTPOINT in those comments would obscure the documentation. Bats: 146 → 147. One new test in test_common.bats pins MNTPOINT="/mnt". Lint clean (one shellcheck SC2295 warning fixed by quoting the parameter expansion: ${isp_firmware#"$MNTPOINT"}). VM verification deferred to a single full make test-install run after all three tech-debt commits land.
Diffstat (limited to 'testing-strategy.org')
-rw-r--r--testing-strategy.org2
1 files changed, 1 insertions, 1 deletions
diff --git a/testing-strategy.org b/testing-strategy.org
index 6078631..f618bd1 100644
--- a/testing-strategy.org
+++ b/testing-strategy.org
@@ -61,7 +61,7 @@ Current coverage lives in =tests/unit/=:
| File | What it covers |
|------+----------------|
-| =test_common.bats= | =command_exists=, =require_command=, =info=/=warn=/=error=, =enable_color=, =log=, =prompt_password=, =pacstrap_packages=, =install_dropin=, =parse_efibootmgr_*=, =EFI_DIR=, =enable_sshd_root_login=, =prepend_grub_cmdline_linux= |
+| =test_common.bats= | =command_exists=, =require_command=, =info=/=warn=/=error=, =enable_color=, =log=, =prompt_password=, =pacstrap_packages=, =install_dropin=, =parse_efibootmgr_*=, =EFI_DIR=, =MNTPOINT=, =enable_sshd_root_login=, =prepend_grub_cmdline_linux= |
| =test_config.bats= | =parse_args=, =load_config=, =validate_config=, =validate_filesystem=, =check_config=, default values pinned in config.sh |
| =test_raid.bats= | =raid_valid_levels_for_count=, =raid_is_valid=, =raid_usable_bytes=, =raid_fault_tolerance= |
| =test_disk.bats= | =get_efi_partition=, =get_root_partition=, =partition_disks= (orchestration shape) |