All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: Cleber Rosa <crosa@redhat.com>
Cc: "Murilo Opsfelder Araujo" <muriloo@linux.ibm.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Caio Carrara" <ccarrara@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Wainer dos Santos Moschetta" <wainersm@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] Acceptance tests: host arch to target arch name mapping
Date: Wed, 17 Oct 2018 22:54:43 -0300	[thread overview]
Message-ID: <20181018015443.GS31060@habkost.net> (raw)
In-Reply-To: <ce3f2032-5c23-b48e-c5f2-16318070d55d@redhat.com>

On Wed, Oct 17, 2018 at 06:47:41PM -0400, Cleber Rosa wrote:
> 
> 
> On 10/17/18 6:15 PM, Eduardo Habkost wrote:
> > On Wed, Oct 17, 2018 at 04:59:25PM -0400, Cleber Rosa wrote:
> >> On 10/17/18 4:46 PM, Murilo Opsfelder Araujo wrote:
> > [...]
> >>> Then avocado could multiplex these variants file and call ./tests/acceptance/run
> >>> for each value of qemu_bin.  `run` script could skip and return if $qemu_bin
> >>> doesn't exist.  This approach also allows user forcing a value of qemu_bin when
> >>> calling `run` manually, for example:
> >>>
> >>>     ./tests/acceptance/run --qemu_bin=/path/to/your/qemu-system-blah ...
> >>>
> >>> This ./tests/acceptance/run can serve as an entry point to run all the tests.
> >>> If more parameters are considered mandatory in the future, the logic can be
> >>> placed there.
> >>>
> >>
> >> I'm completely favorable to having extra scripts or make rules that
> >> define a standard "job" behavior.  In fact, I think we'll end up having
> >> many of those.  "make check-acceptance" is just the first one.
> >>
> >> But being able to running individual tests should still be possible, and
> >> easy IMO.
> > 
> > Agreed.  But is there anything that requires "running an
> > individual test" to be synonymous to "running a test against only
> > one QEMU binary"?
> > 
> 
> I consider, generally speaking:
> 
>  * the test: the (parameterizable) code
>  * running an individual test: the execution of that code, once, with
> one parameter

This is where we're talking about completely different things.
When developers say "I want to run the test I have written", they
are probably expecting that code to run multiple times, each time
with different parameters.

If we implement this as multiple Avocado test cases, or in a
separate layer, it doesn't matter as long as it's easy and
obvious to run them.

> 
> There may be tests in which the logic of *one test* may require
> executing different QEMU binaries, but that is the exception, not the
> rule IMO.
> 
> Given that the acceptance tests are Avocado tests, I think it'd be a
> mistake (or very hard) to try to make "an individual (Avocado) test" use
> all the built QEMU binaries.  Variants (one for each unique set of
> parameters) is the natural thing to use here.

I trust your advice regarding the Avocado API.  If it's not good
practice, we don't need to make an individual Avocado test case
use built QEMU binaries.  We just need to provide an easy way for
developers to run the test they have written against all the
binaries.

If we can make that work with "avocado run mytest.py" it would
be nice, but not a must.

If we can make that work with "./tests/acceptance/mytest.py", it
would be great, but not a must.

If we need to make that work with "./tests/acceptance/run
mytest.py", it's good enough.


> 
> > We seem to have a terminology problem here: "I'm running one
> > individual test" may mean something to an user, but mean
> > something completely different to somebody thinking about Avocado
> > test cases.  Is this the source of our disagreement?
> > 
> 
> It could be, I'm certainly biased by the Avocado definition of tests and
> my limited understanding what others here may mean when they say "a
> test".  For instance, it may be that, to some, "make check" is
> considered "a test", and consequently, needs to run with all built QEMU
> binaries.

Probably "make check" wouldn't be called "a test", but:
* "tests/acceptance/mytest.py" is probably going to be called
  "a test".
* "I want to run mytest.py" would probably mean
  "I want to run mytst.py against all built QEMU binaries",
  not "I want to run one single Avocado test case with mytest.py".

-- 
Eduardo

  reply	other threads:[~2018-10-18  1:55 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-16 23:22 [Qemu-devel] [PATCH] Acceptance tests: host arch to target arch name mapping Cleber Rosa
2018-10-17 10:09 ` Philippe Mathieu-Daudé
2018-10-17 16:23   ` Cleber Rosa
2018-10-17 12:34 ` Peter Maydell
2018-10-17 16:29   ` Eduardo Habkost
2018-10-17 17:38     ` Cleber Rosa
2018-10-17 18:40       ` Peter Maydell
2018-10-17 19:05         ` Cleber Rosa
2018-10-17 19:20           ` Peter Maydell
2018-10-17 19:09         ` Eduardo Habkost
2018-10-17 19:25           ` Cleber Rosa
2018-10-17 19:48             ` Eduardo Habkost
2018-10-17 20:54               ` Cleber Rosa
2018-10-17 22:12                 ` Eduardo Habkost
2018-10-17 23:17                   ` Cleber Rosa
2018-10-18  2:02                     ` Eduardo Habkost
2018-10-17 20:46           ` Murilo Opsfelder Araujo
2018-10-17 20:59             ` Cleber Rosa
2018-10-17 22:15               ` Eduardo Habkost
2018-10-17 22:47                 ` Cleber Rosa
2018-10-18  1:54                   ` Eduardo Habkost [this message]
2018-10-17 19:43         ` Murilo Opsfelder Araujo
2018-10-17 20:05           ` Eduardo Habkost
2018-10-17 20:33             ` Wainer dos Santos Moschetta
2018-10-17 21:10               ` Cleber Rosa
2018-10-17 21:34                 ` Eduardo Habkost
2018-10-17 21:16               ` Eduardo Habkost
2018-10-17 21:34                 ` Cleber Rosa
2018-10-17 16:31   ` Cleber Rosa
2018-10-17 16:51     ` Daniel P. Berrangé
2018-10-17 17:46       ` Cleber Rosa
2018-10-17 14:54 ` Wainer dos Santos Moschetta
2018-10-17 18:24   ` Cleber Rosa

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=20181018015443.GS31060@habkost.net \
    --to=ehabkost@redhat.com \
    --cc=ccarrara@redhat.com \
    --cc=crosa@redhat.com \
    --cc=muriloo@linux.ibm.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=wainersm@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 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.