2020-01-10 14:39:02 +00:00
|
|
|
use base "installedtest";
|
|
|
|
use strict;
|
|
|
|
use testapi;
|
|
|
|
use utils;
|
|
|
|
|
|
|
|
|
|
|
|
sub test_routine {
|
|
|
|
# Save the result of the error tracking grep operation on journalctl output.
|
|
|
|
script_run 'journalctl -b | grep -E "dirty bit|data may be corrupt|recovery|unmounted|recovering" > errors.txt';
|
|
|
|
# Count the number of errors.
|
|
|
|
my $errors_count = script_run "cat errors.txt | wc -l";
|
|
|
|
# Die, if errors have been found.
|
|
|
|
if ($errors_count != 0) {
|
|
|
|
die "Unmount errors have been found in journalctl.";
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
sub run {
|
2020-01-24 11:30:58 +00:00
|
|
|
my $self = shift;
|
2020-01-24 10:51:18 +00:00
|
|
|
# switch to TTY3 for both graphical and console tests
|
2022-07-28 20:32:57 +00:00
|
|
|
$self->root_console(tty => 3);
|
2020-01-10 14:39:02 +00:00
|
|
|
# Run test for the first time
|
|
|
|
test_routine();
|
|
|
|
# Reboot the system.
|
|
|
|
type_safely "reboot\n";
|
|
|
|
# This time, we will need to login manually.
|
|
|
|
boot_to_login_screen;
|
2022-07-28 20:32:57 +00:00
|
|
|
$self->root_console(tty => 3);
|
2020-01-10 14:39:02 +00:00
|
|
|
|
|
|
|
# Run the tests for the second time.
|
|
|
|
test_routine();
|
|
|
|
}
|
|
|
|
|
|
|
|
sub test_flags {
|
2022-07-28 20:32:57 +00:00
|
|
|
return {fatal => 1};
|
2020-01-10 14:39:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
1;
|
|
|
|
|
|
|
|
# vim: set sw=4 et:
|