866a8ef
@@ -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
+ "xpos": 415,
+ "ypos": 149,
+ "width": 84,
+ "height": 18,
@@ -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"
@@ -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_part_accept_changes";
+ # Anaconda hub
+ assert_screen "anaconda_main_hub", 300; #
+ sub test_flags {
+ return { fatal => 1 };
+ 1;
+ # vim: set sw=4 et:
@@ -16,8 +16,8 @@
# 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";
@@ -0,0 +1,32 @@
+ use base "installedtest";
+ 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/ };
This PR adds a test that uses the Bliver interface to create an LVM layout with ext4 filesystem as well as a postinstall test that checks that the LVM layout has been created correctly.
Build succeeded.
rebased onto 2d6c69e
why the commented line?
would this post-install also work for disk_custom_lvm? That test doesn't actually have a postinstall right now, but maybe it should. We should also possibly rename that test to match this test's name as this name is a better fit for the wiki test case name...
rebased onto af4f883
Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
rebased onto b3614e2
1 new commit added
Rename the custom lvm test and use the blivet postinstall.
Delete commented-out line.
I am testing the postinstall test for the custom_lvm_ext4 test as well.
custom_lvm_ext4
Thhe postinstall test failed for the above. It looks like the order of partition creation is different and different names are assigned to the partitions which confuses the postinstall script. I will need to fix it.
Add a needle to cover default and switch order.
rebased onto ef6b553
So the postinstall test can be used for both of the tests, blivet and custom. I renamed the original test to go better with the blivet test. Hopefully, I understood you correctly, @adamwill .
Yep, that's almost there :) Just to be super nitpicky, I'd probably call the postinstall test module disk_custom_lvm_ext4_postinstall.pm - i.e. the version without _blivet in it - and then the install_lvm_ext4 template wouldn't need POSTINSTALL set explicitly at all (as the magic would work for it). You could set POSTINSTALL explicitly for the install_blivet_lvm_ext4 template, to use the same file.
disk_custom_lvm_ext4_postinstall.pm
_blivet
install_lvm_ext4
POSTINSTALL
install_blivet_lvm_ext4
rebased onto f1e1178
rebased onto 5da015d
There are still some problems in the postinstall test, because we expect that the partition name will be vda2 on UEFI and indeed it is created that way. However changing the filesystem to ext4 will change the name to vda3 and that caused a failure.
vda2
ext4
vda3
I have switched the test to vda3 and tests are running to prove the point.
I'm not totally sure I get it, but are you saying everything should be OK now?
rebased onto 77f83bd
So, I have finally run several batches of tests and they all are passing, so I believe that everything should be ok now.
rebased onto de38785
rebased onto 866a8ef
Pull-Request has been merged by adamwill
This PR adds a test that uses the Bliver interface to create an LVM
layout with ext4 filesystem as well as a postinstall test that checks
that the LVM layout has been created correctly.