diff options
author | Magnus Sandin <magnus.sandin@valitron.se> | 2023-01-30 14:32:53 +0100 |
---|---|---|
committer | Magnus Sandin <magnus.sandin@valitron.se> | 2023-01-30 19:24:39 +0100 |
commit | b527b1b2eea9a9ed11a11dcb8c50fb0a28d36120 (patch) | |
tree | 87e09ded9c38df4c2be0f7429337ad14958c0dff /tests/setup_disk_test | |
parent | 3c563344e98c9ac187d56d2600de0a37b3967373 (diff) | |
download | alpine-conf-b527b1b2eea9a9ed11a11dcb8c50fb0a28d36120.zip |
setup-disk: Add support for booting zfs (in grub)
Diffstat (limited to 'tests/setup_disk_test')
-rwxr-xr-x | tests/setup_disk_test | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/tests/setup_disk_test b/tests/setup_disk_test index 7418c89..028d28e 100755 --- a/tests/setup_disk_test +++ b/tests/setup_disk_test @@ -13,7 +13,8 @@ init_tests \ setup_disk_non_existing_block_dev \ setup_disk_install_mounted_root_nvme \ setup_disk_install_mounted_root_efi_boot \ - setup_disk_install_mounted_root_bootloader_none + setup_disk_install_mounted_root_bootloader_none \ + setup_disk_install_mounted_root_zfs setup_disk_usage_body() { test_usage setup-disk @@ -302,3 +303,25 @@ setup_disk_install_mounted_root_bootloader_none_body() { atf_fail "etc/default/grub should not exist" fi } + +setup_disk_install_mounted_root_zfs_body() { + init_env + mkdir -p target/boot \ + sys/firmware/efi + + fake_mount "rpool/root-a $PWD/target zfs rw,noatime,data=ordered 0 0" + + atf_check -s exit:0 \ + -o match:"grub" \ + -e not-match:"zfs is not supported" \ + setup-disk -v target + atf_check \ + -o match:"GRUB_CMDLINE_LINUX_DEFAULT=.*zfs" \ + -o match:"GRUB_FS=zfs" \ + cat target/etc/default/grub + atf_check \ + -o match:'features=.*nvme' \ + -o match:'features=.*zfs' \ + cat target/etc/mkinitfs/mkinitfs.conf +} + |