New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce LVM thin volume test #5520
Conversation
83a41ea
to
3f67bb8
Compare
@@ -165,6 +165,9 @@ sub addlv { | |||
send_key 'ret'; # create logical volume | |||
assert_screen 'partition-lv-type'; | |||
type_string $args{name}; | |||
|
|||
send_key($args{thinpool} ? 'alt-t' : $args{thinvolume} ? 'alt-i' : 'alt-o'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So now in case it's not thin pool or thin volume we additionally press alt-o
. Can it have any impact on existing tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tests/installation/lvm_thin_check.pm
Outdated
assert_script_run 'lvs -a'; | ||
assert_script_run 'pvs -a'; | ||
# thin volume does not exceed thin pool size in our tests | ||
#my $thin_volume_size = script_output q[lvs | grep Vwi | awk '{print $(NF-1)}' | cut -d'.' -f 1]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not leave any commented code.
tests/installation/lvm_thin_check.pm
Outdated
|
||
foreach (@volumes) { | ||
chomp; | ||
assert_script_run "lvdisplay $_"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's about adding some more validation, except return code of the command?
use partition_setup qw(create_new_partition_table addpart addlv); | ||
use version_utils 'is_storage_ng'; | ||
|
||
sub addvg { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's about moving it to lib/partition_setup.pm
so if someone needs same method she/he can find it easier?
type_string $args{name}; | ||
wait_screen_change { send_key 'tab' } for (0 .. 1); | ||
wait_screen_change { send_key 'spc' }; | ||
assert_screen 'partition-select-first-from-top'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JFYI, as long as we don't run it yet in textmode, we could use assert_and_click, which is a bit more scalable in case of UI changes.
lib/main_common.pm
Outdated
@@ -398,6 +398,7 @@ sub load_reboot_tests { | |||
} | |||
} | |||
loadtest "installation/first_boot"; | |||
loadtest "installation/lvm_thin_check" if get_var('LVM_THIN_LV'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO, we should move this to console tests, as running consoletest_setup
is definitely not a bad idea. I also don't find it wrong if we run only this test module after we finish installation, but it doesn't belong here. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No probs at all. This is just a mere suggestion where it can be placed, besides it saved a bit waiting time for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm...but on the other thought, we would need to run console tests after installation, which does not happen always.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, so basically I would say that it would be enough just to run this test module (with consoletest_setup in front). Or put it in console tests and execute same set of tests we run on cryptlvm (e.g. https://openqa.suse.de/tests/1896209).
Needles are merged. |
2b4f3a3
to
ec1fac5
Compare
sub run { | ||
create_new_partition_table; | ||
# create boot and 2 lvm partitions | ||
addpart(role => 'raw', fsid => 'bios-boot', size => 2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please update ticket for SLE to adjust this line for other architectures? We need prep boot on ppc64, boot/zipl for s390x and efi for UEFI (aarch64).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
tests/console/lvm_thin_check.pm
Outdated
|
||
foreach (@volumes) { | ||
chomp; | ||
assert_script_run "lvdisplay $_"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rwx788, please wait with the merge. I am still working on extra check over here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I've added WIP label just for the case. Thanks for the reminder =)
I do not have rights to remove WIP label... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor comments, but could you also squash or change commit messages?
tests/console/lvm_thin_check.pm
Outdated
chomp; | ||
my $lvdisp_out = script_output "lvdisplay $volume"; | ||
foreach (keys %{$lv_stats}) { | ||
die "Value of $_" unless ($lvdisp_out =~ /(?<tested_string>$lv_stats->{$_})/); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please put a bit more details in the die message, so reason is more obvious.
} | ||
} | ||
|
||
sub post_fail_hook { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess standard set of logs could be helpful here too, so what's about calling SUPER
postfail hook too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
8b34729
to
e6a4dec
Compare
We are missing needles: |
done |
Ah, somehow got a feeling that already merged them. Thanks! ;) |
@rwx788, That is my fault! Sorry! I should let you know that with the |
@mloviska no worries, you did a great job by reminding to merge ;) |
*opensuse-Tumbleweed-DVD-x86_64-BuildBuild20180731-lvm_thin_volumes@64bit
*opensuse-Tumbleweed-DVD-x86_64-BuildBuild20180731-lvm_thin_volumes@64bit - post fail hook