qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v5 03/10] qemu-iotests: automatically clean up b


From: Jeff Cody
Subject: Re: [Qemu-devel] [PATCH v5 03/10] qemu-iotests: automatically clean up bash protocol servers
Date: Wed, 18 Oct 2017 13:27:44 -0400
User-agent: Mutt/1.5.24 (2015-08-30)

On Wed, Oct 18, 2017 at 06:39:26PM +0200, Paolo Bonzini wrote:
> On 18/10/2017 18:19, Jeff Cody wrote:
> >>> Here is what we need from common.rc for this series:
> >>>
> >>> _rm_test_img
> >>> _cleanup_nbd
> >>> _cleanup_vxhs
> >>> _cleanup_rbd
> >>> _cleanup_sheepdog
> >>> _cleanup_protocols
> >>> _cleanup_test_img
> >>>
> >>> They all have a common theme (cleanup), so I could move them all to a
> >>> common.cleanup (naming suggestion?) file (which would need to be included 
> >>> by
> >>> common.rc, as well).
> >>>
> >>> Would this be a strong enough delineation to overcome your concerns?
> >>
> >> A great start.  Which of these are actually needed by the tests (and
> >> hence by common.rc) and why?
> >
> >  Some tests are written such that they do intermediate cleanups between
> >  multiple internal sub-tests for varying reasons, and so use those cleanup
> >  functions as part of their testing.  The function _cleanup_test_img
> >  effectively calls all the other functions I listed, so they are really all
> >  required for the tests, if they choose to call _cleanup_test_img.
> > 
> > And for 'check' to tear everything down to a clean state, it also needs to
> > use the cleanup functions for everything that is not just a file/directory.
> 
> Do these tests really need the "cleanup protocols" part, because the few
> that have more than one _cleanup_test_img (059, 066, 070, 084, 146, 171)
> are either file-only or non-raw, so they should be able to just rebuild
> the format on top of the same image.
> 

Maybe not, but that could just be the nature of what bugs we are testing for
at this time.  These specific tests may not need to, but it is not
inconceivable to have a test that involves bringing up and tearing down
a protocol based server some arbitrary number times, to test that specific
behavior.

> Maybe that's where the separation lies---protocol vs. format, where
> cleaning up the "file" protocol need not do anything because it's done
> when removing the test directory.  If that's the case, it'd be nice
> because it might also make it much easier to tackle the issue with
> parallel tests.
>

On final exit, yes, a test needs not remember to remove all of its mouse
droppings.  But as far as not needing to remove images in intermediate
stages of a given test, I think that assumes too much. For instance,
qemu-img _should_ be able to rebuild a format on top of the same image.  But
maybe a test wants to see if that specific functionality actually works as
intended, and compares removing and creating an image to rebuilding on top
of an image, etc.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]