mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-11-25 15:23:08 +00:00
47 lines
1.1 KiB
Perl
47 lines
1.1 KiB
Perl
use base "installedtest";
|
|
use strict;
|
|
use testapi;
|
|
use utils;
|
|
|
|
|
|
# This test reboots the computer and checks that a correct boot entry
|
|
# is booted.
|
|
|
|
sub run {
|
|
my $self = shift;
|
|
my $boot_count = 0;
|
|
my $old_cmdline = '';
|
|
my $new_cmdline = '';
|
|
|
|
# Let's go to the virtual console to perform the testing.
|
|
$self->root_console(tty => 3);
|
|
|
|
# Now, we have a freshly booted system, so we will
|
|
# record the current kernel command line.
|
|
$old_cmdline = script_output("cat /proc/cmdline");
|
|
|
|
# Reboot the system.
|
|
enter_cmd("reboot");
|
|
# Wait until we arrive at the login screen and log
|
|
# onto the console again.
|
|
boot_to_login_screen;
|
|
$self->root_console(tty => 3);
|
|
|
|
# Now, let us check the cmdline again and compare it
|
|
# to the previous. We will fail, if the two cmdlines
|
|
# differ.
|
|
$new_cmdline = script_output("cat /proc/cmdline");
|
|
diag("Expected cmdline: $old_cmdline");
|
|
diag("Current cmdline: $new_cmdline");
|
|
die("CMDline check failed.") if ($old_cmdline ne $new_cmdline);
|
|
}
|
|
|
|
|
|
sub test_flags {
|
|
return {always_rollback => 1};
|
|
}
|
|
|
|
1;
|
|
|
|
# vim: set sw=4 et:
|