From: Jeff Cody <jcody@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, kwolf@redhat.com, jsnow@redhat.com,
stefanha@redhat.com, qemu-block@nongnu.org
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 [thread overview]
Message-ID: <20171018172744.GI17962@localhost.localdomain> (raw)
In-Reply-To: <d6b6250f-4215-adfa-f09a-e35360f04597@redhat.com>
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.
next prev parent reply other threads:[~2017-10-18 17:28 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-17 16:31 [Qemu-devel] [PATCH v5 00/10] qemu-iotests improvements Jeff Cody
2017-10-17 16:31 ` [Qemu-devel] [PATCH v5 01/10] qemu-iotests: refuse to run if TEST_DIR contains spaces Jeff Cody
2017-10-18 1:03 ` Eric Blake
2017-10-18 3:05 ` Jeff Cody
2017-10-17 16:31 ` [Qemu-devel] [PATCH v5 02/10] qemu-iotests: set TEST_DIR to a unique dir for each test Jeff Cody
2017-10-17 16:31 ` [Qemu-devel] [PATCH v5 03/10] qemu-iotests: automatically clean up bash protocol servers Jeff Cody
2017-10-18 1:15 ` Eric Blake
2017-10-18 14:46 ` Paolo Bonzini
2017-10-18 15:03 ` Jeff Cody
2017-10-18 15:16 ` Paolo Bonzini
2017-10-18 15:34 ` Jeff Cody
2017-10-18 15:39 ` Paolo Bonzini
2017-10-18 15:50 ` Jeff Cody
2017-10-18 15:51 ` Paolo Bonzini
2017-10-18 16:19 ` Jeff Cody
2017-10-18 16:39 ` Paolo Bonzini
2017-10-18 17:27 ` Jeff Cody [this message]
2017-10-19 10:23 ` Paolo Bonzini
2017-10-19 14:52 ` Jeff Cody
2017-10-19 21:03 ` Paolo Bonzini
2017-10-18 15:06 ` Eric Blake
2017-10-18 15:43 ` Daniel P. Berrange
2017-10-17 16:31 ` [Qemu-devel] [PATCH v5 04/10] qemu-iotests: remove file cleanup from bash tests Jeff Cody
2017-10-18 13:46 ` Eric Blake
2017-10-18 13:56 ` Jeff Cody
2017-10-17 16:31 ` [Qemu-devel] [PATCH v5 05/10] qemu-iotests: change qemu pid and fd tracking / cleanup Jeff Cody
2017-10-18 13:59 ` Jeff Cody
2017-10-18 14:11 ` Eric Blake
2017-10-18 14:22 ` Eric Blake
2017-10-17 16:31 ` [Qemu-devel] [PATCH v5 06/10] qemu-iotests: make ./check automatically reap QEMU processes Jeff Cody
2017-10-18 14:24 ` Eric Blake
2017-10-17 16:31 ` [Qemu-devel] [PATCH v5 07/10] qemu-iotests: run python tests in own subdirectories Jeff Cody
2017-10-17 16:31 ` [Qemu-devel] [PATCH v5 08/10] qemu-iotests: modify python tests to run from subdir Jeff Cody
2017-10-17 16:31 ` [Qemu-devel] [PATCH v5 09/10] qemu-iotests: add option to save temp files on error Jeff Cody
2017-10-18 14:33 ` Eric Blake
2017-10-17 16:31 ` [Qemu-devel] [PATCH v5 10/10] qemu-iotests: add support for running multi-threaded iotests Jeff Cody
2017-10-18 3:45 ` Jeff Cody
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171018172744.GI17962@localhost.localdomain \
--to=jcody@redhat.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).