diff --git a/needles/anaconda/partitioning/blivet/anaconda_blivet_part_devicetype_lvm-20210208.json b/needles/anaconda/partitioning/blivet/anaconda_blivet_part_devicetype_lvm-20210208.json new file mode 100644 index 00000000..1b2c79ad --- /dev/null +++ b/needles/anaconda/partitioning/blivet/anaconda_blivet_part_devicetype_lvm-20210208.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "height": 26, + "ypos": 145, + "xpos": 397, + "width": 64, + "type": "match" + } + ], + "properties": [], + "tags": [ + "anaconda_blivet_part_devicetype_lvm" + ] +} \ No newline at end of file diff --git a/needles/anaconda/partitioning/blivet/anaconda_blivet_part_devicetype_lvm-20210208.png b/needles/anaconda/partitioning/blivet/anaconda_blivet_part_devicetype_lvm-20210208.png new file mode 100644 index 00000000..ded54359 Binary files /dev/null and b/needles/anaconda/partitioning/blivet/anaconda_blivet_part_devicetype_lvm-20210208.png differ diff --git a/needles/anaconda/partitioning/blivet/anaconda_blivet_part_devicetype_lvm.json b/needles/anaconda/partitioning/blivet/anaconda_blivet_part_devicetype_lvm.json new file mode 100644 index 00000000..fc4e49aa --- /dev/null +++ b/needles/anaconda/partitioning/blivet/anaconda_blivet_part_devicetype_lvm.json @@ -0,0 +1,15 @@ +{ + "properties": [], + "tags": [ + "anaconda_blivet_part_devicetype_lvm" + ], + "area": [ + { + "xpos": 415, + "ypos": 149, + "width": 84, + "height": 18, + "type": "match" + } + ] +} \ No newline at end of file diff --git a/needles/anaconda/partitioning/blivet/anaconda_blivet_part_devicetype_lvm.png b/needles/anaconda/partitioning/blivet/anaconda_blivet_part_devicetype_lvm.png new file mode 100644 index 00000000..0734d328 Binary files /dev/null and b/needles/anaconda/partitioning/blivet/anaconda_blivet_part_devicetype_lvm.png differ diff --git a/templates.fif.json b/templates.fif.json index 02762ae7..8df415c0 100644 --- a/templates.fif.json +++ b/templates.fif.json @@ -956,6 +956,19 @@ "ROOT_PASSWORD": "weakpassword" } }, + "install_blivet_lvm_ext4": { + "profiles": { + "fedora-Server-dvd-iso-aarch64-*-aarch64": 40, + "fedora-Server-dvd-iso-ppc64le-*-ppc64le": 40, + "fedora-Server-dvd-iso-x86_64-*-64bit": 40, + "fedora-Server-dvd-iso-x86_64-*-uefi": 41 + }, + "settings": { + "PARTITIONING": "custom_blivet_lvm_ext4", + "POSTINSTALL": "disk_custom_lvm_ext4_postinstall", + "ROOT_PASSWORD": "weakpassword" + } + }, "install_blivet_standard_partition_ext4": { "profiles": { "fedora-Server-dvd-iso-aarch64-*-aarch64": 40, @@ -1249,7 +1262,7 @@ "fedora-Server-dvd-iso-x86_64-*-uefi": 41 }, "settings": { - "PARTITIONING": "custom_lvm", + "PARTITIONING": "custom_lvm_ext4", "ROOT_PASSWORD": "weakpassword", "STORE_HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2" } diff --git a/tests/disk_custom_blivet_lvm_ext4.pm b/tests/disk_custom_blivet_lvm_ext4.pm new file mode 100644 index 00000000..eb739bf3 --- /dev/null +++ b/tests/disk_custom_blivet_lvm_ext4.pm @@ -0,0 +1,43 @@ +use base "anacondatest"; +use strict; +use testapi; +use anaconda; + +sub run { + my $self = shift; + # Go to INSTALLATION DESTINATION and ensure the disk is selected. + # Because PARTITIONING starts with 'custom_blivet', this will select blivet-gui. + select_disks(); + assert_and_click "anaconda_spoke_done"; + + if (get_var("UEFI")) { + # if we're running on UEFI, we need esp + custom_blivet_add_partition(size => 512, mountpoint => '/boot/efi', filesystem => 'efi_filesystem'); + } + if (get_var("OFW")) { + custom_blivet_add_partition(size => 4, filesystem => 'ppc_prep_boot'); + } + + custom_blivet_add_partition(size => 512, mountpoint => '/boot', filesystem => 'ext4'); + # add new LVM device + custom_blivet_add_partition(devicetype => 'lvm'); + # select newly created LVM device for adding new partition + assert_and_click "anaconda_blivet_volumes_icon"; + # add lvm partition with ext4 and mount is as / + custom_blivet_add_partition(devicetype => 'lvm', filesystem => 'ext4', mountpoint => '/'); + + assert_and_click "anaconda_spoke_done"; + assert_and_click "anaconda_part_accept_changes"; + + # Anaconda hub + assert_screen "anaconda_main_hub", 300; # + +} + +sub test_flags { + return { fatal => 1 }; +} + +1; + +# vim: set sw=4 et: diff --git a/tests/disk_custom_lvm.pm b/tests/disk_custom_lvm_ext4.pm similarity index 100% rename from tests/disk_custom_lvm.pm rename to tests/disk_custom_lvm_ext4.pm index be438d5b..da08aa0b 100644 --- a/tests/disk_custom_lvm.pm +++ b/tests/disk_custom_lvm_ext4.pm @@ -16,8 +16,8 @@ sub run { # Do 'automatic' partition creation assert_and_click "anaconda_part_automatic"; # Change file system to ext4 on root and boot partitions. - custom_change_fs("ext4", "root"); custom_change_fs("ext4", "boot"); + custom_change_fs("ext4", "root"); # Confirm changes assert_and_click "anaconda_spoke_done"; assert_and_click "anaconda_part_accept_changes"; diff --git a/tests/disk_custom_lvm_ext4_postinstall.pm b/tests/disk_custom_lvm_ext4_postinstall.pm new file mode 100644 index 00000000..8f66a443 --- /dev/null +++ b/tests/disk_custom_lvm_ext4_postinstall.pm @@ -0,0 +1,32 @@ +use base "installedtest"; +use strict; +use testapi; + +sub run { + assert_screen "root_console"; + my $devboot = 'vda1'; + + if (get_var('OFW') || get_var('UEFI')) { + $devboot = 'vda2'; + } + # check that lvm is present: + validate_script_output "lvdisplay | grep 'LV Status'", sub { $_ =~ m/available/ }; + + # Check for standard LVM attributes, w - writable, i-inherited, a-active, o-open + validate_script_output "lvs -o lv_attr", sub { $_ =~ m/wi-ao/ }; + + # Check that the partitions are ext4. + validate_script_output "mount | grep /dev/$devboot", sub { $_ =~ m/on \/boot type ext4/ }; + + # There should be one partition in the LVM. + validate_script_output "mount | grep /dev/mapper", sub { $_ =~ m/on \/ type ext4/ }; + +} + +sub test_flags { + return { fatal => 1 }; +} + +1; + +# vim: set sw=4 et: