qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Cody <jcody@redhat.com>
To: Max Reitz <mreitz@redhat.com>
Cc: Fam Zheng <famz@redhat.com>, Eric Blake <eblake@redhat.com>,
	kwolf@redhat.com, qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 for-2.10 1/1] qemu-iotests: _cleanup_qemu must be called on exit
Date: Wed, 19 Apr 2017 08:36:47 -0400	[thread overview]
Message-ID: <20170419123647.GL5704@localhost.localdomain> (raw)
In-Reply-To: <63eb8549-dea7-ba35-021c-78697aa5f099@redhat.com>

On Wed, Apr 19, 2017 at 02:13:35PM +0200, Max Reitz wrote:
> On 19.04.2017 12:36, Fam Zheng wrote:
> > On Tue, 04/18 15:42, Jeff Cody wrote:
> >>> One idea presented in an earlier thread was that common.rc should create
> >>> a subdirectory per test (rather than all tests sharing scratch/), and
> >>> then common.rc itself install the cleanup hook that wipes out the entire
> >>> subdirectory (or maybe even add a command-line option to ./check to
> >>> suppress wiping when it is desirable to debug a test failure by seeing
> >>> the droppings left behind).
> >>>
> >>
> >> Yep, good ideas.  I'll leave that for another series though; there are a few
> >> other changes based on some suggestions from Daniel that I'd like to
> >> implement as well, and I can fold your suggestions above into a new series
> >> (unless someone else does it first).
> > 
> > Sounds good, I was thinking about making ./check run tests in parallel. If each
> > test has its own tmpdir, it will be much easier.
> 

Neat - it'd be cool to be able to use the same options as for 'make', e.g.
./check -j5.


> In case you were not yet aware: you can manually set TEST_DIR, this is
> what I do.
> 
> (I have a script that basically does TEST_DIR=/tmp/test-$1 ./check -$1)
>

Baking it into common without relying on external env variables adds extra
niceties, because as Eric mentioned cleanup is not left up to the script
then, and the subdir can be nuked (or kept, via an option to 'check').

This would make the scripts simpler to read and implement, and less prone to
do Bad Things. (I keep waiting for some iotest script to misquote a var
during cleanup and do an rm -f ~/* or something...  it'd be nice to not have
to worry about that).


-Jeff

  reply	other threads:[~2017-04-19 12:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-18 17:45 [Qemu-devel] [PATCH v2 for-2.10 1/1] qemu-iotests: _cleanup_qemu must be called on exit Jeff Cody
2017-04-18 18:44 ` Eric Blake
2017-04-18 19:31   ` Jeff Cody
2017-04-18 19:39     ` Eric Blake
2017-04-18 19:42       ` Jeff Cody
2017-04-19 10:36         ` Fam Zheng
2017-04-19 12:13           ` Max Reitz
2017-04-19 12:36             ` Jeff Cody [this message]
2017-04-19 12:45               ` Max Reitz

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=20170419123647.GL5704@localhost.localdomain \
    --to=jcody@redhat.com \
    --cc=eblake@redhat.com \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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).