mirror of
https://github.com/rocky-linux/os-autoinst-distri-rocky.git
synced 2024-12-06 19:46:26 +00:00
Create Blivet standard partitioning with ext4 testcase.
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.
This commit is contained in:
parent
7ad6628d84
commit
a868b1241a
@ -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,
|
||||
|
39
tests/disk_custom_blivet_standard_partition_ext4.pm
Normal file
39
tests/disk_custom_blivet_standard_partition_ext4.pm
Normal file
@ -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:
|
Loading…
Reference in New Issue
Block a user