#206 Add an installation test using LVM paritioning as asset for resize tests.
Merged 3 years ago by adamwill. Opened 3 years ago by lruzicka.

file modified
+2 -2
@@ -85,7 +85,7 @@ 

  for num in range(1, 10):

      testliterals.append(f"anaconda_install_destination_select_disk_{num}")

  # custom_scheme_select

- for scheme in ("standard", "lvmthin", "btrfs"):

+ for scheme in ("standard", "lvmthin", "btrfs", "lvm"):

      testliterals.append(f"anaconda_part_scheme_{scheme}")

  # custom_blivet_add_partition

  for dtype in ("lvm", "lvmthin", "raid"):
@@ -97,7 +97,7 @@ 

  # one value

  testliterals.append("anaconda_part_device_type_raid")

  # custom_change_fs

- for fsys in ("ext3", "xfs"):

+ for fsys in ("ext3", "xfs", "ext4"):

      testliterals.append(f"anaconda_part_fs_{fsys}")

      testliterals.append(f"anaconda_part_fs_{fsys}_selected")

  # variable-y in custom_change_device but we only have one value

@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 505,

+       "ypos": 283,

+       "width": 34,

+       "height": 19,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "anaconda_part_fs_ext4"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,18 @@ 

+ {

+   "area": [

+     {

+       "xpos": 64,

+       "ypos": 311,

+       "width": 33,

+       "height": 18,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "anaconda_part_scheme_lvm",

+     "ENV-DISTRI-fedora",

+     "LANGUAGE-english",

+     "ENV-FLAVOR-server"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
file modified
+19 -5
@@ -746,15 +746,16 @@ 

          },

          "install_resize_lvm": {

              "profiles": {

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

-                 "fedora-universal-ppc64le-*-ppc64le": 20,

-                 "fedora-universal-x86_64-*-64bit": 20

+                 "fedora-Server-dvd-iso-aarch64-*-aarch64": 40,

+                 "fedora-Server-dvd-iso-ppc64le-*-ppc64le": 40,

+                 "fedora-Server-dvd-iso-x86_64-*-64bit": 40

              },

              "settings": {

                  "PARTITIONING": "custom_resize_lvm",

-                 "HDD_1": "disk_f%PREVREL%_desktop_4_%ARCH%.img",

+                 "HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2",

                  "INSTALL": "1",

-                 "ROOT_PASSWORD": "weakpassword"

+                 "ROOT_PASSWORD": "weakpassword",

+                 "START_AFTER_TEST": "install_lvm_ext4"

              }

          },

          "desktop_browser": {
@@ -1185,6 +1186,19 @@ 

                  "ROOT_PASSWORD": "weakpassword"

              }

          },

+         "install_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_lvm",

+                 "ROOT_PASSWORD": "weakpassword",

+                 "STORE_HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2"

+             }

+         },

          "install_mirrorlist_graphical": {

              "profiles": {

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

@@ -0,0 +1,36 @@ 

+ 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_', this will select custom.

+     select_disks();

+     assert_and_click "anaconda_spoke_done";

+ 

+     # Manual partitioning spoke should be displayed. Select LVM

+     # Partitioning scheme

+     custom_scheme_select("lvm");

+     # 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");

+     # Confirm changes

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

@@ -79,10 +79,12 @@ 

      send_key "tab";

      assert_and_click "anaconda_part_add_mountpoint";

  

-     # Then mount the Swap partition.

-     assert_and_click "anaconda_part_select_swap";

-     assert_and_click "anaconda_part_device_reformat";

-     assert_and_click "anaconda_part_update_settings";

+     # Then mount the Swap partition if it is present.

+     if (check_screen "anaconda_part_select_swap") {

+         assert_and_click "anaconda_part_select_swap";

+         assert_and_click "anaconda_part_device_reformat";

+         assert_and_click "anaconda_part_update_settings";

+     }

  

      # Close the spoke.

      assert_and_click "anaconda_spoke_done";

When Fedora went to BTRFS as a default, we lost the LVM based image to
run LVM resize tests with.

This PR introduces the install_lvm.pm installation test that creates
an LVM based qcow2 image to be used by follow-up tests.

rebased onto f3951fb7f9d872793d516eef1d2d08d6c077d3ab

3 years ago

Build failed.

rebased onto c62015a9e22279f7e8c7529cdf511626144fd983

3 years ago

Build succeeded.

I think we should make this specify ext4 filesystem. I don't know whether it defaults to that or not - I didn't run it and find out - but as discussed in the ticket, I think it would make sense for this test to match the https://fedoraproject.org/wiki/QA:Testcase_partitioning_custom_lvm_ext4 wiki test case, so we should make it check that the ext4 filesystem is used and select it if not (I think we already have a function for that). In that case we should also call it install_lvm_ext4.

is this a copy/paste mistake? we're selecting regular LVM, I think, not thinp.

rebased onto 8fe2b0f0a3e32fe57ab1bced35f7d4cf6353c694

3 years ago

is this a copy/paste mistake? we're selecting regular LVM, I think, not thinp.

Yeah, I corrected it.

I think we should make this specify ext4 filesystem. I don't know whether it defaults to that or not - I didn't run it and find out - but as discussed in the ticket, I think it would make sense for this test to match the https://fedoraproject.org/wiki/QA:Testcase_partitioning_custom_lvm_ext4 wiki test case, so we should make it check that the ext4 filesystem is used and select it if not (I think we already have a function for that). In that case we should also call it install_lvm_ext4.

The ext4 was selected by default, when using the LVM partitioning scheme. But I will make sure, it gets selected if that should change in the future.

Update: With Server DVD, the filesystem is XFS by default. So, this must be changed.

Build succeeded.

1 new commit added

  • Create ext4 fs on partitions.
3 years ago

Build succeeded.

2 new commits added

  • Create ext4 fs on partitions.
  • Add an installation test using LVM paritioning as asset for resize tests.
3 years ago

1 new commit added

  • Rename test according to its target.
3 years ago

Build failed.

1 new commit added

  • Whitelist needle.
3 years ago

Build succeeded.

rebased onto 295f3dc653fbcfd8c4191c75cdab6c2ca06d90fd

3 years ago

Build succeeded.

Looks pretty good. Can you flatten it down to one commit and correct the typo in the message (missing 't' in 'partitioning')? Thanks!

rebased onto 5718c7f

3 years ago

Build succeeded.

Pull-Request has been merged by adamwill

3 years ago