1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-22 14:03:09 +00:00

Tweak _console_avc_crash so we get soft failures

We do want soft failures (but not hard) when _console_avc_crash
fails. So let's tweak it to ensure that's what happens.
This commit is contained in:
Adam Williamson 2017-04-10 15:44:13 -07:00
parent e68e113f76
commit ee283b1411

View File

@ -13,14 +13,15 @@ sub run {
# anything at a console. the more advanced upstream 'console' # anything at a console. the more advanced upstream 'console'
# handling may help us here if we switch to it # handling may help us here if we switch to it
console_loadkeys_us; console_loadkeys_us;
# check there are no AVCs. We use ! because this returns 1 # check there are no AVCs. We expect an error here: if we don't
validate_script_output '! ausearch -m avc -ts yesterday 2>&1', sub { $_ =~ m/<no matches>/ }; # get an error, it means there *are* AVCs.
# check there are no crashes record_soft_failure "AVC(s) found" unless (script_run 'ausearch -m avc -ts yesterday 2>&1');
validate_script_output '! coredumpctl list 2>&1', sub { $_ =~ m/No coredumps found/ }; # check there are no crashes. Similarly expect an error here
record_soft_failure "Crash(es) found" unless (script_run 'coredumpctl list 2>&1');
} }
sub test_flags { sub test_flags {
return { 'ignore_failure' => 1 }; return {};
} }
1; 1;