1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-12-22 02:13:08 +00:00

Don't snapshot after wait_login tests (usually)

We currently snapshot after every run of _console_wait_login or
_graphical_wait_login, which means we snapshot *twice* on most
update tests as those modules get run twice. However, we almost
never use those snapshots. Snapshotting takes quite some time,
and hits the disk pretty hard, so we should avoid it unless it
is really needed.

We only have a few modules that are not fatal (and so might use
the snapshots), and most of those don't run after one of these
tests, or run after a later module that's also a milestone. Best
I can tell, only two test suites really need to use a snapshot
from a login test: server_cockpit_updates and modularity_tests.
To handle these and potential future cases, we'll add a new
module that does nothing, but is marked 'milestone', so it will
take a snapshot, and load that test after the login test if the
var LOGIN_SNAPSHOT is set, and set that var for those two suites.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2022-12-07 15:24:02 -08:00
parent 27a45493e1
commit f752b4c00a
6 changed files with 23 additions and 3 deletions

View File

@ -246,6 +246,7 @@ sub _load_early_postinstall_tests {
# Appropriate login method for install type
if (get_var("DESKTOP")) {
_load_instance("tests/_graphical_wait_login", $instance);
_load_instance("tests/_snapshot_only") if (get_var("LOGIN_SNAPSHOT"));
}
# Test non-US input at this point, on language tests
if (get_var("SWITCHED_LAYOUT") || get_var("INPUT_METHOD")) {
@ -261,6 +262,7 @@ sub _load_early_postinstall_tests {
# the installation is interrupted on purpose.
unless (get_var("DESKTOP") || get_var("CRASH_REPORT")) {
_load_instance("tests/_console_wait_login", $instance);
_load_instance("tests/_snapshot_only") if (get_var("LOGIN_SNAPSHOT"));
}
}

View File

@ -2237,6 +2237,7 @@
"settings": {
"BOOTFROM": "c",
"HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2",
"LOGIN_SNAPSHOT": "1",
"POSTINSTALL": "modularity_module_list modularity_enable_disable_module modularity_install_module",
"ROOT_PASSWORD": "weakpassword",
"START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%",
@ -2385,6 +2386,7 @@
"+HDD_1": "disk_%MACHINE%_cockpit.qcow2",
"+START_AFTER_TEST": "server_cockpit_default",
"BOOTFROM": "c",
"LOGIN_SNAPSHOT": "1",
"POSTINSTALL": "server_cockpit_updates server_cockpit_autoupdate",
"ROOT_PASSWORD": "weakpassword",
"USER_LOGIN": "false"

View File

@ -32,7 +32,7 @@ sub run {
}
sub test_flags {
return {};
return {fatal => 1};
}
1;

View File

@ -37,7 +37,7 @@ sub run {
}
sub test_flags {
return {fatal => 1, milestone => 1};
return {fatal => 1};
}
1;

View File

@ -121,7 +121,7 @@ sub run {
}
sub test_flags {
return {fatal => 1, milestone => 1};
return {fatal => 1};
}
1;

16
tests/_snapshot_only.pm Normal file
View File

@ -0,0 +1,16 @@
use base "installedtest";
use strict;
use testapi;
use utils;
sub run {
my $self = shift;
}
sub test_flags {
return {fatal => 1, milestone => 1};
}
1;
# vim: set sw=4 et: