summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/setup_disk_test28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/setup_disk_test b/tests/setup_disk_test
index 028d28e..56ae715 100755
--- a/tests/setup_disk_test
+++ b/tests/setup_disk_test
@@ -12,6 +12,7 @@ init_tests \
setup_disk_func_uuid_or_device \
setup_disk_non_existing_block_dev \
setup_disk_install_mounted_root_nvme \
+ setup_disk_install_mounted_root_efi \
setup_disk_install_mounted_root_efi_boot \
setup_disk_install_mounted_root_bootloader_none \
setup_disk_install_mounted_root_zfs
@@ -265,6 +266,33 @@ setup_disk_install_mounted_root_nvme_body() {
}
+setup_disk_install_mounted_root_efi_body() {
+ init_env
+ for fs in vfat msdos fat; do
+ rm -rf target sys etc proc
+ mkdir -p target/boot/efi \
+ sys/firmware/efi \
+
+ fake_mount "/dev/vda2 $PWD/target ext4 rw,noatime,data=ordered 0 0"
+ fake_mount "/dev/vda1 $PWD/target/boot/efi $fs rw,relatime,fmask=0022 0 0"
+
+ atf_check -s exit:0 \
+ -o match:"Installing system on /dev/vda2" \
+ -o match:"grub-install .* --efi-directory=$PWD/target/boot/efi .* --boot-directory=$PWD/target/boot" \
+ -o match:"install -D $PWD/target/boot/efi/EFI/alpine/grub.*efi $PWD/target/boot/efi/EFI/boot/bootaa64.efi" \
+ setup-disk -v target
+
+ atf_check \
+ -o match:"/dev/vda2 / ext4 rw,noatime,data=ordered 0 1" \
+ -o match:"/dev/vda1 /boot/efi $fs rw,relatime,fmask=0022 0 2" \
+ cat target/etc/fstab
+
+ atf_check -o match:"GRUB_CMDLINE_LINUX_DEFAULT=.*ext4" \
+ cat target/etc/default/grub
+ done
+}
+
+# test case when /boot is the efi vfat partition
setup_disk_install_mounted_root_efi_boot_body() {
init_env
mkdir -p target/boot \