tests: Return failure if log not fopen'd
tests: Return failure if log not fopen'd

If @log is not fopen'd then, going to cleanup and calling fclose
will make for an unhappy callee. So just fail immediately instead
since there's nothing to clean up.

Found by Coverity

Signed-off-by: John Ferlan <87558058f6f829e5ec976c8ef960720af4ff9c7d@redhat.com>

fabianfreyer/libvirt,andreabolognani/libvirt,eskultety/libvirt,eskultety/libvirt,libvirt/libvirt,jardasgit/libvirt,jardasgit/libvirt,jardasgit/libvirt,jfehlig/libvirt,eskultety/libvirt,olafhering/libvirt,andreabolognani/libvirt,crobinso/libvirt,crobinso/libvirt,libvirt/libvirt,zippy2/libvirt,fabianfreyer/libvirt,andreabolognani/libvirt,jardasgit/libvirt,libvirt/libvirt,olafhering/libvirt,eskultety/libvirt,zippy2/libvirt,nertpinx/libvirt,jfehlig/libvirt,andreabolognani/libvirt,nertpinx/libvirt,zippy2/libvirt,jfehlig/libvirt,nertpinx/libvirt,nertpinx/libvirt,libvirt/libvirt,nertpinx/libvirt,fabianfreyer/libvirt,fabianfreyer/libvirt,crobinso/libvirt,andreabolognani/libvirt,crobinso/libvirt,eskultety/libvirt,zippy2/libvirt,jfehlig/libvirt,jardasgit/libvirt,olafhering/libvirt,fabianfreyer/libvirt,olafhering/libvirt