qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: John Snow <jsnow@redhat.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Cc: Kevin Wolf <kwolf@redhat.com>,
	"qemu-block@nongnu.org" <qemu-block@nongnu.org>,
	Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v4 1/4] iotests: add script_initialize
Date: Mon, 16 Sep 2019 14:56:40 +0000	[thread overview]
Message-ID: <974b64b8-a191-c529-4e77-6a38b372c4b8@virtuozzo.com> (raw)
In-Reply-To: <20190912001633.11372-2-jsnow@redhat.com>

12.09.2019 3:16, John Snow wrote:
> Like script_main, but doesn't require a single point of entry.
> Replace all existing initialization sections with this drop-in replacement.
> 
> This brings debug support to all existing script-style iotests.
> 
> Note: supported_oses=['linux'] was omitted, as it is a default argument.

But after this patch all test which didn't check os start to check linux
(as it's default).. So all tests which worked on other platforms will now
be skipped on these other platforms?

Finally do we support something except linux for iotests?
for bash tests _supported_os also used only with "Linux" in 87 tests..

May be we'd better drop both _supported_os and supported_oses alltogether,
and don't care?

Anyway, if we support only linux, any reason to skip almost all tests,
if someone tries to run test on other platform? Let him run what he wants.

> Signed-off-by: John Snow <jsnow@redhat.com>
> ---

[..]

> +def execute_test(test_function=None, *args, **kwargs):
> +    """Run either unittest or script-style tests."""
> +
> +    debug = execute_setup_common(*args, **kwargs)
>       if not test_function:
> -        execute_unittest(output, verbosity, debug)
> +        execute_unittest(debug)
>       else:
>           test_function()
>   
> +# This is called from script-style iotests without a single point of entry
> +def script_initialize(*args, **kwargs):
> +    """Initialize script-style tests without running any tests."""
> +    execute_setup_common(*args, **kwargs)
> +
> +# This is called from script-style iotests with a single point of entry
>   def script_main(test_function, *args, **kwargs):
>       """Run script-style tests outside of the unittest framework"""
>       execute_test(test_function, *args, **kwargs)
>   
> +# This is called from unittest style iotests
>   def main(*args, **kwargs):
>       """Run tests using the unittest framework"""


Hmm, now two different styles of code documenting used: comment and doc-string,
both containing almost equal meaning.. I don't like it, still don't really mind.

>       execute_test(None, *args, **kwargs)
> 


-- 
Best regards,
Vladimir

  reply	other threads:[~2019-09-16 16:17 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-12  0:16 [Qemu-devel] [PATCH v4 0/4] iotests: use python logging John Snow
2019-09-12  0:16 ` [Qemu-devel] [PATCH v4 1/4] iotests: add script_initialize John Snow
2019-09-16 14:56   ` Vladimir Sementsov-Ogievskiy [this message]
2019-09-16 16:32     ` John Snow
2019-09-16 16:39       ` Vladimir Sementsov-Ogievskiy
2019-09-16 17:13         ` John Snow
2019-09-17 22:29     ` John Snow
2019-09-18 10:30       ` Vladimir Sementsov-Ogievskiy
2019-09-18 16:44         ` Vladimir Sementsov-Ogievskiy
2019-09-18 17:00           ` John Snow
2019-09-18 13:05       ` Thomas Huth
2019-09-18 18:41         ` John Snow
2019-09-12  0:16 ` [Qemu-devel] [PATCH v4 2/4] iotest 258: use script_main John Snow
2019-09-17  9:36   ` Vladimir Sementsov-Ogievskiy
2019-09-12  0:16 ` [Qemu-devel] [PATCH v4 3/4] iotests: specify protocol support via initialization info John Snow
2019-09-17  9:51   ` Vladimir Sementsov-Ogievskiy
2019-09-12  0:16 ` [Qemu-devel] [PATCH v4 4/4] iotests: use python logging for iotests.log() John Snow
2019-09-17 11:35   ` Vladimir Sementsov-Ogievskiy
2019-09-17 19:46     ` John Snow

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=974b64b8-a191-c529-4e77-6a38b372c4b8@virtuozzo.com \
    --to=vsementsov@virtuozzo.com \
    --cc=jsnow@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).