1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2026-07-18 04:06:00 +00:00
os-autoinst-distri-fedora/tests/error_checks.pm
Lukas Ruzicka 8d7ee86b3e Implement test for SELinux Crash notifications.
This test checks if any errors are reported using automatic error
reporting mechanisms. It checks whether there are any errors
reported through Desktop Notifications, Abrt, and CoredumpCTL.
In KDE, where the SETroubleshoot application is installed,
the test also checks whether there are any SELinux notifications.

The test case requires the above is checked within the Live environment,
and also post install, so the structure of this test consists of two parts:
- there are subroutines in utils.pm that are called within
  _do_install_and_reboot.pm, right after the installation
  completes.
- there is a error_checking.pm that utilizies the subroutines, but runs
  after the installed system has been booted.

In order not to fiddle with install_default test cases, we introduce
another installation test, install_error_checking, where the
checks are triggered.

This fixes https://pagure.io/fedora-qa/os-autoinst-distri-fedora/issue/354
2025-01-30 10:23:19 +01:00

33 lines
594 B
Perl

use base "installedtest";
use strict;
use testapi;
use utils;
# This test checks that no errors are reported through automated tools after installation.
# Currently, this checks for anything in system notifications, coredumpctl, and abrt-cli.
# The test fails if anything is reported by these tools.
#
sub clear {
type_very_safely("clear\n");
sleep(2);
}
sub run {
my $self = shift;
my $desktop = get_var("DESKTOP", "gnome");
check_errors_notifications($desktop);
check_errors_cli($desktop);
}
sub test_flags {
return {fatal => 1};
}
1;
# vim: set sw=4 et: