qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Cleber Rosa <crosa@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	qemu-devel@nongnu.org,
	"Alistair Francis" <alistair@alistair23.me>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Subbaraya Sundeep" <sundeep.lkml@gmail.com>,
	qemu-arm@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2] BootLinuxConsoleTest: Test the SmartFusion2 board
Date: Thu, 6 Jun 2019 14:29:26 -0400	[thread overview]
Message-ID: <20190606182926.GA4501@dhcp-17-47.bos.redhat.com> (raw)
In-Reply-To: <20190605204323.GF22416@habkost.net>

On Wed, Jun 05, 2019 at 05:43:23PM -0300, Eduardo Habkost wrote:
> On Wed, Jun 05, 2019 at 12:06:59PM -0400, Cleber Rosa wrote:
> > On Tue, May 21, 2019 at 12:06:35AM +0200, Philippe Mathieu-Daudé wrote:
> > > Similar to the x86_64/pc test, it boots a Linux kernel on an
> > > Emcraft board and verify the serial is working.
> > > 
> > > If ARM is a target being built, "make check-acceptance" will
> > > automatically include this test by the use of the "arch:arm" tags.
> > > 
> > > Alternatively, this test can be run using:
> > > 
> > >   $ avocado run -t arch:arm tests/acceptance
> > >   $ avocado run -t machine:emcraft-sf2 tests/acceptance
> > >
> > 
> > The pattern accepted as a tag currently doesn't include a dash, see:
> > 
> >    https://avocado-framework.readthedocs.io/en/68.0/ReferenceGuide.html#docstring-directives-rules
> > 
> 
> Why isn't this causing test jobs to fail?

Because docstring directives are searched for "gracefully", that is,
if it doesn't match the pattern, it's not considered a docstring
directive.

Also, there's nothing in the jobs that require or check for that
specific machine tag.  The "check-acceptance" rule uses the built
targets, and adds "arch:<$TARGET>" tags to the command line.

Now, if one run this (as exemplified in the commit message):

  $ avocado run -t machine:emcraft-sf2 tests/acceptance

The *tag* failure/limitation would have been noticed.  BTW, it should
be easy to expand the docstring directive pattern and fix this
limitation on newer Avocado versions.

You can also see the parsed key/val tags with:

  $ avocado list -V tests/acceptance

Although only on new Avocado versions (>69.0), you can also see the
parsed key:val tags.

> 
> This patch is already queued on python-next, should I remove it?
>

Or ammended it?  It's a minor issue IMO (s/-/_/).

> 
> > My suggestion is to replace the dash for an underline.  This was done
> > on the s390 test:
> > 
> >    :avocado: tags=machine:s390_ccw_virtio
> 
> I would love if we stopped using the docstring to store
> machine-readable data and used Python class attributes or
> methods, like most Python APIs do.  e.g.:
> 
>   class MyTest(avocado.Test):
>       tags = {'machine':'s390-ccw-virtio'}
> 
>       def test_my_feature(self):
>           ...
>
> 
> I understand the Avocado runner currently tries to not run any
> test code at the "list" step.  But can we have a mode where it
> will actually load the Python module and look at the class
> objects directly, instead of trying to parse the Python code
> without evaluating it?
> 
> > [...]
> 
> -- 
> Eduardo

I get your point, and I'd love to have no "no learning wheels" mode
too.  But given that the "safe loader" was a very basic architecture
design, and we probably wouldn't be dropping it, this means twice the
code to maintain.

I'd be interested in collecting more use cases (besides this s/-/_/)
to better justify such an effort.

Regards,
- Cleber.


      reply	other threads:[~2019-06-06 18:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-20 22:06 [Qemu-devel] [PATCH 0/2] tests: Avocado-test for the SmartFusion2 board Philippe Mathieu-Daudé
2019-05-20 22:06 ` [Qemu-devel] [PATCH 1/2] BootLinuxConsoleTest: Do not log empty lines Philippe Mathieu-Daudé
2019-05-20 22:34   ` Alistair Francis
2019-05-23 13:48   ` Cleber Rosa
2019-06-05 15:57   ` Cleber Rosa
2019-06-05 20:52   ` Aleksandar Markovic
2019-05-20 22:06 ` [Qemu-devel] [PATCH 2/2] BootLinuxConsoleTest: Test the SmartFusion2 board Philippe Mathieu-Daudé
2019-05-20 22:35   ` Alistair Francis
2019-05-23 14:07   ` Cleber Rosa
2019-06-05 16:06   ` Cleber Rosa
2019-06-05 20:43     ` Eduardo Habkost
2019-06-06 18:29       ` Cleber Rosa [this message]

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=20190606182926.GA4501@dhcp-17-47.bos.redhat.com \
    --to=crosa@redhat.com \
    --cc=alistair@alistair23.me \
    --cc=ehabkost@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sundeep.lkml@gmail.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).