2016-01-11 20:30:24 +00:00
|
|
|
use base "installedtest";
|
|
|
|
use strict;
|
|
|
|
use testapi;
|
2017-01-18 07:15:44 +00:00
|
|
|
use utils;
|
2016-01-11 20:30:24 +00:00
|
|
|
|
|
|
|
sub run {
|
consolidate login waits, use postinstall not entrypoint for base
Summary:
I started out wanting to fix an issue I noticed today where
graphical upgrade tests were failing because they didn't wait
for the graphical login screen properly; the test was sitting
at the 'full Fedora logo' state of plymouth for a long time,
so the current boot_to_login_screen's wait_still_screen was
triggered by it and the function wound up failing on the
assert_screen, because it was still some time before the real
login screen appeared.
So I tweaked the boot_to_login_screen implementation to work
slightly differently (look for a login screen match, *then* -
if we're dealing with a graphical login - wait_still_screen
to defeat the 'old GPU buffer showing login screen' problem
and assert the login screen again). But while working on it,
I figured we really should consolidate all the various places
that handle the bootloader -> login, we were doing it quite
differently in all sorts of different places. And as part of
that, I converted the base tests to use POSTINSTALL (and thus
go through the shared _wait_login tests) instead of handling
boot themselves. As part of *that*, I tweaked main.pm to not
require all POSTINSTALL tests have the _postinstall suffix on
their names, as it really doesn't make sense, and renamed the
tests.
Test Plan: Run all tests, see if they work.
Reviewers: jskladan, garretraziel
Reviewed By: garretraziel
Subscribers: tflink
Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D1015
2016-09-27 18:48:15 +00:00
|
|
|
my $self = shift;
|
2016-01-11 20:30:24 +00:00
|
|
|
# switch to TTY3 for both, graphical and console tests
|
|
|
|
$self->root_console(tty=>3);
|
2020-06-17 23:34:30 +00:00
|
|
|
# we could make this slightly more 'efficient' by assuming chronyd
|
2016-01-11 20:30:24 +00:00
|
|
|
# is always going to be enabled/running at first, but it's safer
|
|
|
|
# to force an expected starting state.
|
2020-06-17 23:34:30 +00:00
|
|
|
script_run "systemctl stop chronyd.service";
|
|
|
|
script_run "systemctl disable chronyd.service";
|
2016-10-20 16:24:48 +00:00
|
|
|
script_run "reboot", 0;
|
consolidate login waits, use postinstall not entrypoint for base
Summary:
I started out wanting to fix an issue I noticed today where
graphical upgrade tests were failing because they didn't wait
for the graphical login screen properly; the test was sitting
at the 'full Fedora logo' state of plymouth for a long time,
so the current boot_to_login_screen's wait_still_screen was
triggered by it and the function wound up failing on the
assert_screen, because it was still some time before the real
login screen appeared.
So I tweaked the boot_to_login_screen implementation to work
slightly differently (look for a login screen match, *then* -
if we're dealing with a graphical login - wait_still_screen
to defeat the 'old GPU buffer showing login screen' problem
and assert the login screen again). But while working on it,
I figured we really should consolidate all the various places
that handle the bootloader -> login, we were doing it quite
differently in all sorts of different places. And as part of
that, I converted the base tests to use POSTINSTALL (and thus
go through the shared _wait_login tests) instead of handling
boot themselves. As part of *that*, I tweaked main.pm to not
require all POSTINSTALL tests have the _postinstall suffix on
their names, as it really doesn't make sense, and renamed the
tests.
Test Plan: Run all tests, see if they work.
Reviewers: jskladan, garretraziel
Reviewed By: garretraziel
Subscribers: tflink
Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D1015
2016-09-27 18:48:15 +00:00
|
|
|
boot_to_login_screen;
|
2016-01-11 20:30:24 +00:00
|
|
|
$self->root_console(tty=>3);
|
|
|
|
# note the use of ! here is a bash-ism, but it sure makes life easier
|
2020-06-17 23:34:30 +00:00
|
|
|
assert_script_run '! systemctl is-enabled chronyd.service';
|
|
|
|
assert_script_run '! systemctl is-active chronyd.service';
|
|
|
|
assert_script_run '! ps -C chronyd';
|
|
|
|
script_run "systemctl start chronyd.service";
|
|
|
|
assert_script_run '! systemctl is-enabled chronyd.service';
|
|
|
|
assert_script_run 'systemctl is-active chronyd.service';
|
|
|
|
assert_script_run 'ps -C chronyd';
|
|
|
|
script_run "systemctl stop chronyd.service";
|
|
|
|
assert_script_run '! systemctl is-enabled chronyd.service';
|
|
|
|
assert_script_run '! systemctl is-active chronyd.service';
|
|
|
|
assert_script_run '! ps -C chronyd';
|
|
|
|
script_run "systemctl enable chronyd.service";
|
|
|
|
assert_script_run 'systemctl is-enabled chronyd.service';
|
|
|
|
assert_script_run '! systemctl is-active chronyd.service';
|
|
|
|
assert_script_run '! ps -C chronyd';
|
2016-10-20 16:24:48 +00:00
|
|
|
script_run "reboot", 0;
|
consolidate login waits, use postinstall not entrypoint for base
Summary:
I started out wanting to fix an issue I noticed today where
graphical upgrade tests were failing because they didn't wait
for the graphical login screen properly; the test was sitting
at the 'full Fedora logo' state of plymouth for a long time,
so the current boot_to_login_screen's wait_still_screen was
triggered by it and the function wound up failing on the
assert_screen, because it was still some time before the real
login screen appeared.
So I tweaked the boot_to_login_screen implementation to work
slightly differently (look for a login screen match, *then* -
if we're dealing with a graphical login - wait_still_screen
to defeat the 'old GPU buffer showing login screen' problem
and assert the login screen again). But while working on it,
I figured we really should consolidate all the various places
that handle the bootloader -> login, we were doing it quite
differently in all sorts of different places. And as part of
that, I converted the base tests to use POSTINSTALL (and thus
go through the shared _wait_login tests) instead of handling
boot themselves. As part of *that*, I tweaked main.pm to not
require all POSTINSTALL tests have the _postinstall suffix on
their names, as it really doesn't make sense, and renamed the
tests.
Test Plan: Run all tests, see if they work.
Reviewers: jskladan, garretraziel
Reviewed By: garretraziel
Subscribers: tflink
Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D1015
2016-09-27 18:48:15 +00:00
|
|
|
boot_to_login_screen;
|
2016-01-11 20:30:24 +00:00
|
|
|
$self->root_console(tty=>3);
|
2020-06-17 23:34:30 +00:00
|
|
|
assert_script_run 'systemctl is-enabled chronyd.service';
|
|
|
|
assert_script_run 'systemctl is-active chronyd.service';
|
|
|
|
assert_script_run 'ps -C chronyd';
|
|
|
|
script_run "systemctl disable chronyd.service";
|
2016-10-20 16:24:48 +00:00
|
|
|
script_run "reboot", 0;
|
consolidate login waits, use postinstall not entrypoint for base
Summary:
I started out wanting to fix an issue I noticed today where
graphical upgrade tests were failing because they didn't wait
for the graphical login screen properly; the test was sitting
at the 'full Fedora logo' state of plymouth for a long time,
so the current boot_to_login_screen's wait_still_screen was
triggered by it and the function wound up failing on the
assert_screen, because it was still some time before the real
login screen appeared.
So I tweaked the boot_to_login_screen implementation to work
slightly differently (look for a login screen match, *then* -
if we're dealing with a graphical login - wait_still_screen
to defeat the 'old GPU buffer showing login screen' problem
and assert the login screen again). But while working on it,
I figured we really should consolidate all the various places
that handle the bootloader -> login, we were doing it quite
differently in all sorts of different places. And as part of
that, I converted the base tests to use POSTINSTALL (and thus
go through the shared _wait_login tests) instead of handling
boot themselves. As part of *that*, I tweaked main.pm to not
require all POSTINSTALL tests have the _postinstall suffix on
their names, as it really doesn't make sense, and renamed the
tests.
Test Plan: Run all tests, see if they work.
Reviewers: jskladan, garretraziel
Reviewed By: garretraziel
Subscribers: tflink
Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D1015
2016-09-27 18:48:15 +00:00
|
|
|
boot_to_login_screen;
|
2016-01-11 20:30:24 +00:00
|
|
|
$self->root_console(tty=>3);
|
2020-06-17 23:34:30 +00:00
|
|
|
assert_script_run '! systemctl is-enabled chronyd.service';
|
|
|
|
assert_script_run '! systemctl is-active chronyd.service';
|
|
|
|
assert_script_run '! ps -C chronyd';
|
2016-01-11 20:30:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
sub test_flags {
|
|
|
|
return { fatal => 1 };
|
|
|
|
}
|
|
|
|
|
|
|
|
1;
|
|
|
|
|
|
|
|
# vim: set sw=4 et:
|