[libvirt] [PATCH] commandtest: Remove commandhelper.log in test27

Daniel P. Berrangé berrange at redhat.com
Mon Jul 29 14:25:10 UTC 2019


On Mon, Jul 29, 2019 at 04:17:17PM +0200, Michal Privoznik wrote:
> The recently added test27 spawns commandhelper. This is fine,
> except, one of the things that commandhelper does is it records
> arguments it was spawn with into commandhelper.log. Other test
> cases then use checkoutput() to compare the arguments against the
> expected ones and also unlink() the log file. However, test27()
> is not doing that and thus it leaves the file behind. This
> breaks distcheck.
> 
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
> 
> Another approach would be to explicitly just unlink() the file somewhere
> in the cleanup label. But I figured, comparing the args and unlinking
> the file afterwards is more robust check IMO.
> 
>  tests/commanddata/test27.log | 20 ++++++++++++++++++++
>  tests/commandtest.c          |  3 +++
>  2 files changed, 23 insertions(+)
>  create mode 100644 tests/commanddata/test27.log

Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




More information about the libvir-list mailing list