2016-12-08 16:58:29 +00:00
|
|
|
use base "installedtest";
|
|
|
|
use strict;
|
2017-01-18 07:15:44 +00:00
|
|
|
use utils;
|
2016-12-08 16:58:29 +00:00
|
|
|
use testapi;
|
|
|
|
|
|
|
|
sub run {
|
|
|
|
my $self = shift;
|
2022-06-07 01:34:44 +00:00
|
|
|
$self->root_console(tty=>3, timeout=>30);
|
2016-12-08 20:18:45 +00:00
|
|
|
# if this is a non-English, non-switched layout, load US layout
|
|
|
|
# at this point
|
|
|
|
# FIXME: this is all kind of a mess, as on such configs we need
|
|
|
|
# native layout to log in to a console but US layout to type
|
|
|
|
# anything at a console. the more advanced upstream 'console'
|
|
|
|
# handling may help us here if we switch to it
|
|
|
|
console_loadkeys_us;
|
2017-04-10 22:44:13 +00:00
|
|
|
# check there are no AVCs. We expect an error here: if we don't
|
|
|
|
# get an error, it means there *are* AVCs.
|
2017-09-05 16:35:59 +00:00
|
|
|
my $hook_run = 0;
|
|
|
|
unless (script_run 'ausearch -m avc -ts yesterday > /tmp/avcs.txt 2>&1') {
|
|
|
|
record_soft_failure "AVC(s) found (see avcs.txt log)";
|
|
|
|
upload_logs "/tmp/avcs.txt";
|
|
|
|
# Run the post-fail hook so we have all the logs
|
|
|
|
$self->post_fail_hook();
|
|
|
|
$hook_run = 1;
|
|
|
|
}
|
2017-04-10 22:44:13 +00:00
|
|
|
# check there are no crashes. Similarly expect an error here
|
2017-09-05 16:35:59 +00:00
|
|
|
unless (script_run 'coredumpctl list > /tmp/coredumps.txt 2>&1') {
|
|
|
|
record_soft_failure "Crash(es) found (see coredumps.txt log)";
|
|
|
|
upload_logs "/tmp/coredumps.txt";
|
|
|
|
$self->post_fail_hook() unless ($hook_run);
|
|
|
|
}
|
2016-12-08 16:58:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
sub test_flags {
|
2017-04-10 22:44:13 +00:00
|
|
|
return {};
|
2016-12-08 16:58:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
1;
|
|
|
|
|
|
|
|
# vim: set sw=4 et:
|