#212 Create Blivet standard partitioning with ext4 testcase.
Merged 7 days ago by adamwill. Opened 2 months ago by lruzicka.

file modified
+12
@@ -956,6 +956,18 @@ 

                  "ROOT_PASSWORD": "weakpassword"

              }

          },

+         "install_blivet_standard_partition_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_standard_partition_ext4",

+                 "ROOT_PASSWORD": "weakpassword"

+             }

+         },

          "install_blivet_with_swap": {

              "profiles": {

                  "fedora-universal-aarch64-*-aarch64": 50,

@@ -0,0 +1,39 @@ 

+ 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(filesystem => 'ext4', mountpoint => '/');

+     custom_blivet_add_partition(filesystem => 'ext4', size => 512, mountpoint => '/boot');

+     custom_blivet_add_partition(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:

@@ -0,0 +1,30 @@ 

+ use base "installedtest";

+ use strict;

+ use testapi;

+ 

+ sub run {

+     assert_screen "root_console";

+     my $count = 3;

+     my $devroot = 'vda2';

+     my $devboot = 'vda1';

+     if (get_var('OFW') || get_var('UEFI')) {

+         $count = 4; # extra boot partition (PreP or ESP)

+         $devroot = 'vda3';

+         $devboot = 'vda2';

+     }

+     # check number of partitions

+     script_run 'fdisk -l | grep /dev/vda'; # debug

+     validate_script_output 'fdisk -l | grep /dev/vda | wc -l', sub { $_ =~ m/$count/ };

+     # check mounted partitions are ext4 fs

+     script_run 'mount | grep /dev/vda'; # debug

+     validate_script_output "mount | grep /dev/$devboot", sub { $_ =~ m/on \/boot type ext4/ };

+     validate_script_output "mount | grep /dev/$devroot", sub { $_ =~ m/on \/ type ext4/ };

+ }

+ 

+ sub test_flags {

+     return { fatal => 1 };

+ }

+ 

+ 1;

+ 

+ # vim: set sw=4 et:

This PR introduces a test case that uses the Blivet partitioning
tool to create a standard partitioning layout with / and /boot
(and specific partitions for UEFI and ARM64) using ext4 as
the selected filesystem.

It also adds a postinstallation test to check that the partitions
have been created correctly.

Build succeeded.

Can we have "standard_partition" not just "standard" in the file and test suite names here, to match the other test and the test case?

Also, I think the postinstall is identical to the custom one, right? If so I think it'd be better to either make it a symlink, or come up with a tweak to main.pm so they use the same file, rather than duplicating it...

Thanks!

rebased onto ba10f18

17 days ago

Build succeeded.

1 new commit added

  • Rename tests according to a review.
17 days ago

Build succeeded.

2 new commits added

  • Rename tests according to a review.
  • Create Blivet standard partitioning with ext4 testcase.
17 days ago

The postinstall tests are not exactly the same, the partition numbers differ.

Build succeeded.

1 new commit added

  • Add test for tweaking
17 days ago

Build succeeded.

1 new commit added

  • Switch partitioning order.
17 days ago

1 new commit added

  • Delete postinstall call from templates.
17 days ago

Build succeeded.

Could we make it so the postinstall tests are the same, somehow? I just like to avoid redundancy if possible.

1 new commit added

  • Switch back
16 days ago

Build succeeded.

rebased onto a868b12

7 days ago

we should still be able to combine the postinstall tests by just having it check whether the TEST var contains 'blivet' and varying the expected devices as appropriate. But that can be a follow-up, I guess.

Build succeeded.

Pull-Request has been merged by adamwill

7 days ago