xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Anthony PERARD <anthony.perard@citrix.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>, xen-devel@lists.xen.org
Subject: Re: [PATCH OSSTEST v3 2/3] ts-openstack-tempest: Run Tempest to check OpenStack
Date: Wed, 30 Sep 2015 09:38:02 +0100	[thread overview]
Message-ID: <1443602282.16718.157.camel@citrix.com> (raw)
In-Reply-To: <20150929171515.GL1623@perard.uk.xensource.com>

On Tue, 2015-09-29 at 18:15 +0100, Anthony PERARD wrote:
> On Tue, Sep 29, 2015 at 04:43:50PM +0100, Ian Campbell wrote:
> > On Mon, 2015-09-28 at 16:56 +0100, Anthony PERARD wrote:
> > 
> > > +  # Ignore these tests:
> > > +  #
> > > tempest.scenario.test_volume_boot_pattern.TestVolumeBootPattern.test_
> > > volume_boot_pattern
> > > +  #   It try to start a guest with /dev/vda as boot device name.
> > > +  $ignored_tests .=
> > > '|.*TestVolumeBootPattern.test_volume_boot_pattern';
> > 
> > Don't you need to escape the second "." for the regex context in the
> > tempest script? \Q and \E might be helpful for this?
> 
> Yes, I should probably escape the dot. \Q and \E is for perl, isn't it?
> The regex is going to be interpreted by python.

$foo = "\Qtest.case\E" ends up with $foo having the a literal value which
is escaped i.e. "test\.case", which then gets passed to whichever regex
(including Pythons) and does the right thing.

e.g. 

$ perl -e 'print "\Qtest.case\E\n";'
test\.case
$ perl -e 'print "\Qtest.case*\E\n";'
test\.case\*

There is a subtle reliance on the Perl quoting rules and the Python quoting
rules being similar enough, but since these are regexp's I think that is
safe enough. We also assume Perl quoting is compatible with Shell quoting
in various places.

> > Also, you actually ignore any test ending with that string, not just
> > the
> > exact one in the comment, is that deliberate? Also any test with a
> > longer
> > name which has this substring will also be ignored.
> > 
> > If not then you could put the common prefix into a variable to avoid
> > repeating it (and the very long lines) and maybe add some anchors?
> 
> I'll clean that up, and use a prefix.
> 
> What are you speaking about when you say "anchors"?

I mean anchoring the match to the start of the string with ^ or to the end
with $. i.e. /^foo$/ only matches "foo" and not "foobar" or "bazfoo" etc.


> > > +  #
> > > tempest.scenario.test_shelve_instance.TestShelveInstance.test_shelve_
> > > volume_backed_instance
> > > +  #   It try to start a guest with /dev/vda as boot device name.
> > > +  $ignored_tests .=
> > > '|.*TestShelveInstance.test_shelve_volume_backed_instance';
> > > +  #
> > > scenario.test_volume_boot_pattern.TestVolumeBootPatternV2.test_volume
> > > _boot_pattern
> > > +  #   It access a volume through iSCSI. This does not work when both
> > > the
> > > +  #   server and client of iSCSI are on the same Xen host, Linux 4.0
> > > is the
> > > +  #   first Linux to have a fix.
> > > +  $ignored_tests .=
> > > '|.*TestVolumeBootPatternV2.test_volume_boot_pattern';
> > > +
> > > +  # Adding the tests to skip to the default regex.
> > > +  my $regex =
> > > "(?!.*\\[.*\\bslow\\b.*\\]$ignored_tests)(^tempest\\.(api|scenario|th
> > > irdparty))";
> > 
> > Where the default regex is:
> >     "(?!.*\\[.*\\bslow\\b.*\\])(^tempest\\.(api|scenario|thirdparty))";
> > ?
> 
> This regex of tests to execute can be found in tempest.git/tox.ini, in
> the
> section "[testenv:full]". That what's been used the OpenStack gate.
> 
> I'll add a comment about it in the next patch version.

Given that the upstream default might change under our feet maybe we should
just consider this to be our own decision to make, even if it happens to
match the default today?

> > This is a pretty rubbish interface which tempest has given you. What a
> > pain!
> 
> Yeah, that the only way to ignore a test on a specific third-party
> openstack CI loop...

Yuck. Oh well.

Ian.

  reply	other threads:[~2015-09-30  8:38 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-28 15:56 [PATCH OSSTEST v3 0/3] Have OpenStack tested on top of xen's master and libvirt's master Anthony PERARD
2015-09-28 15:56 ` [PATCH OSSTEST v3 1/3] ts-openstack-deploy: Deploy OpenStack on a host with devstack Anthony PERARD
2015-09-29 15:34   ` Ian Campbell
2015-09-29 16:19     ` Anthony PERARD
2015-09-29 17:04       ` Ian Jackson
2015-09-30  8:29       ` Ian Campbell
2015-09-29 17:02     ` Ian Jackson
2015-09-30  8:32   ` Ian Campbell
2015-09-30 10:52     ` Ian Jackson
2015-09-28 15:56 ` [PATCH OSSTEST v3 2/3] ts-openstack-tempest: Run Tempest to check OpenStack Anthony PERARD
2015-09-29 15:43   ` Ian Campbell
2015-09-29 17:15     ` Anthony PERARD
2015-09-30  8:38       ` Ian Campbell [this message]
2015-09-28 15:56 ` [PATCH OSSTEST v3 3/3] Create a flight to test OpenStack with xen-unstable and libvirt Anthony PERARD
2015-09-29 15:49   ` Ian Campbell
2015-09-29 17:21     ` Anthony PERARD
2015-09-29 16:52   ` Ian Jackson
2015-10-08 16:08     ` Ian Campbell
2015-10-08 16:42       ` Ian Jackson
2015-10-09 10:54         ` Anthony PERARD
2015-10-13 11:02           ` Ian Jackson
2015-10-13 11:39             ` Ian Campbell

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=1443602282.16718.157.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=anthony.perard@citrix.com \
    --cc=xen-devel@lists.xen.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).