fix installedtest post-fail hook when no /var/tmp/abrt
ClosedPublic

Authored by adamwill on Apr 27 2016, 5:27 AM.

Details

Summary

you can't use validate_script_output like this, it doesn't just
return a bool, it actually kills the test if the output doesn't
validate. So any time we didn't have anything in /var/tmp/abrt,
the post_fail_hook would die at that point and not upload the
contents of /var/log as we wanted it to.

Note that even script_output will kill the test if the return
code is >0. That's OK in this case, but always be careful with
these subroutines.

Test Plan

Run a test that fails in post-install but doesn't
produce anything in /var/tmp/abrt (you may have to artificially
break something). Check that it now uploads /var/log. I noticed
this while working on FreeIPA tests...

Diff Detail

Repository
rOPENQATESTS os-autoinst-distri-fedora
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
adamwill retitled this revision from to fix installedtest post-fail hook when no /var/tmp/abrt.Apr 27 2016, 5:27 AM
adamwill updated this object.
adamwill edited the test plan for this revision. (Show Details)
adamwill added reviewers: jskladan, garretraziel.
garretraziel accepted this revision.Apr 27 2016, 12:10 PM

Looks OK.

This revision is now accepted and ready to land.Apr 27 2016, 12:10 PM
This revision was automatically updated to reflect the committed changes.