All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sascha Silbe <silbe@linux.vnet.ibm.com>
To: Max Reitz <mreitz@redhat.com>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>
Subject: Re: [Qemu-devel] [PATCH for-2.6?] qemu-iotests: iotests: fail hard if not run via "check"
Date: Tue, 19 Apr 2016 14:22:43 +0200	[thread overview]
Message-ID: <87fuuh7ppo.fsf@oc4731375738.ibm.com> (raw)
In-Reply-To: <57101588.3080204@redhat.com>

Dear Max,

Max Reitz <mreitz@redhat.com> writes:

> On 14.04.2016 13:32, Sascha Silbe wrote:
[tests/qemu-iotests/iotests.py]
[...]
>>  def main(supported_fmts=[], supported_oses=['linux']):
>>      '''Run tests'''
>>  
>> +    if test_dir is None or qemu_default_machine is None:
>
> I think checking test_dir would have been sufficient; this makes it look
> like it might want to be a complete list of variables that have to be
> set, but then "cachemode" is missing.

Markus Armbruster basically pointed out the same issue, so how about
this version:

    # We are using TEST_DIR and QEMU_DEFAULT_MACHINE as proxies to
    # indicate that we're not being run via "check". There may be
    # other things set up by "check" that individual test cases rely
    # on.
    if test_dir is None or qemu_default_machine is None:
        sys.stderr.write('Please run this test via the "check" script\n')
        sys.exit(os.EX_USAGE)


>> +        sys.stderr.write('Please run this test via ./check\n')
>
> Or not ./, for people who have separate build and source trees, you
> don't want to invoke check in the source tree. ;-)

Yeah, was thinking about that, but ultimately considered ./check to be
the best indication of a) "check" being the name of a script and b)
residing in the same directory as the test. But I don't care much about
this, so see the above version.

Sascha
-- 
Softwareentwicklung Sascha Silbe, Niederhofenstraße 5/1, 71229 Leonberg
https://se-silbe.de/
USt-IdNr. DE281696641

  reply	other threads:[~2016-04-19 12:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-14 11:32 [Qemu-devel] [PATCH for-2.6?] qemu-iotests: iotests: fail hard if not run via "check" Sascha Silbe
2016-04-14 22:11 ` Max Reitz
2016-04-19 12:22   ` Sascha Silbe [this message]
2016-04-19 19:06     ` Max Reitz
2016-04-19 19:32       ` Sascha Silbe
2016-04-20  6:55       ` Markus Armbruster
2016-04-20  8:37         ` Sascha Silbe
2016-04-18  7:19 ` Markus Armbruster
2016-04-19 11:59   ` Sascha Silbe
2016-04-19 12:25     ` Markus Armbruster
2016-04-19 16:49       ` Sascha Silbe
2016-04-20  8:38         ` Kevin Wolf
2016-04-20  8:51           ` Sascha Silbe
2016-04-19 19:34 ` [Qemu-devel] [PATCH for-2.6? v2] " Sascha Silbe
2016-05-11 15:43   ` 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=87fuuh7ppo.fsf@oc4731375738.ibm.com \
    --to=silbe@linux.vnet.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.