From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>,
Ian Campbell <ian.campbell@citrix.com>
Subject: [OSSTEST PATCH 6/6] Other-revision-jobs: Update cs-bisection-step
Date: Fri, 28 Aug 2015 17:34:01 +0100 [thread overview]
Message-ID: <1440779641-22477-6-git-send-email-ian.jackson@eu.citrix.com> (raw)
In-Reply-To: <1440779641-22477-1-git-send-email-ian.jackson@eu.citrix.com>
This is rather more subtle. We want to be able to bisect over all the
relevant inputs.
What we actually want to do if one of the *prev* tests fail is to
treat the "previous Xen branch" as a separate "tree" when bisecting,
so each revision tuple has both "current" and "old" Xen versions.
That way if the stable-4.x branch has broken forward migration, we
will report it properly.
Indeed, this needs to be extended not just to the Xen revision, but
all the inputs to the *prev* build.
We achieve this with new concept `other-revision job suffix',
introduced in the previous patch. The bisector now works internally
always with tree names which are `<tree>[ <suffix>]' (delimited by a
space). (Henceforth, we'll call `[ <suffix>]' the `othrev'.)
That is, all the revisions specified in prev build jobs are treated as
revisions of different trees to the revisions of apparently-same trees
in non-prev jobs.
The specific changes needed to cs-bisection-step are very small. We
only need to adjust the code which reads and writes the database:
* When we do the cross join on urls and revisions which generates the
rev tuple for a particular flight, also have the database compute
the othrev for each tree. Then, print the othrev in the debug
output, and append it to the tree name.
That resulting name is used everywhere:
It affects `mixed revision' detection, so we consider build-*-prev
jobs with differing revisions to problematic, or main-revision build
jobs with differing revisions, but we treat each category of build
job separately so the fact that the prev and main build jobs have
different revisions is fine.
The name is used for the key that is returned from flight_rmap.
Thence it is used for the Name in @treeinfos, and therefore the
results from flight_rtuple will be terms of this decorated tree
namespace.
* When we are preparing a new job to go, we need to (effectively) undo
this transformation. The query which finds the `tree_' variables
for a particular tree name is arranged to take an additional
parameter, which is the othrev. If the othrev does not match the
job, the name is not returned in the results.
Actually, because both the job and the othrev are query parameters,
what happens is either that they match (ie, the othrev in the tree
name from @treeinfos is indeed the othrev for the job we are
constructing) in which case we process the variable as before; or
they don't match, in which case the query contains contradictory
conditions in its AND clauses, and returns no rows.
So the ultimate effect is that we process each Name from @treeinfos
only if it is for the this kind of job. This slightly convoluted
implementation arises from the fact that the job-to-othrev mapping
is implemented as SQL, so we need to ask the database.
There is no need to change any of the output processing and reporting,
because "<tree> prev" is a perfectly good thing to print in all the
relevant contexts.
And there is no need to change how we drive adhoc-revtuple-generator,
because we do not pass it tree names at all, only urls.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
cs-bisection-step | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/cs-bisection-step b/cs-bisection-step
index 57ecac4..42bf20b 100755
--- a/cs-bisection-step
+++ b/cs-bisection-step
@@ -108,7 +108,7 @@ our ($branch,$job,$testid) = @ARGV;
our ($latest_flight, $hosts, $basispass_flight);
our (@treeinfos);
-# $treeinfos[]{Name}
+# $treeinfos[]{Name} Name might be "<treename> <other-job-revision-spec>"
# $treeinfos[]{Url}
our $restrictflight_cond= restrictflight_cond();
@@ -208,6 +208,7 @@ END
SELECT url.val AS uval,
rev.val AS rval,
url.job AS job,
+ ${\ other_revision_job_suffix('url.job',' ') } AS othrev,
url.name AS longname
FROM tmp_build_info AS rev
@@ -232,7 +233,8 @@ END
$row->{longname} =~ m/^tree_/ or die "$row->{longname} ?";
my $name= $'; #'
print DEBUG " $flight.$row->{job} uval=$row->{uval}".
- " rval=$row->{rval} name=$name\n";
+ " rval=$row->{rval} name=$name othrev=\`$row->{othrev}'\n";
+ $name .= $row->{othrev};
my $rev= $row->{rval};
next unless length $rev;
$rev =~ s/\+//g;
@@ -1069,14 +1071,21 @@ END
SELECT name FROM runvars
WHERE flight=? AND job=?
AND name = ?
+ AND ${\ other_revision_job_suffix('job',' ') } = ?
END
foreach (my $i=0; $i<@treeinfos; $i++) {
my $name= $treeinfos[$i]{Name};
+ my $othrev = $name =~ s{ (.+)$}{} ? $1 : '';
my $treevar= 'tree_'.$name;
- $treeq->execute($copyflight, $popjob, $treevar);
+ $treeq->execute($copyflight, $popjob, $treevar, $othrev);
my ($treerow) = $treeq->fetchrow_array();
$treeq->finish();
next unless defined $treerow;
+ # Effect of the check on other_revison_job_suffix is that
+ # we don't see a runvar row if the othrev from the treeinfo
+ # does not correspond to that of the job - ie, the treeinfo
+ # does not apply to this job.
+
my $revname= "revision_$name";
my $revval= $trevisions[$i];
--
1.7.10.4
next prev parent reply other threads:[~2015-08-28 16:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-28 16:33 [OSSTEST PATCH 1/6] Other-revision-jobs: Provide central test Ian Jackson
2015-08-28 16:33 ` [OSSTEST PATCH 2/6] Other-revision-jobs: Update report__find_test Ian Jackson
2015-08-28 16:33 ` [OSSTEST PATCH 3/6] Other-revision-jobs: Update sg-check-tested Ian Jackson
2015-08-28 16:33 ` [OSSTEST PATCH 4/6] Other-revision-jobs: Update sg-report-flight and -job-history Ian Jackson
2015-08-28 16:34 ` [OSSTEST PATCH 5/6] Other-revision-jobs: Provide other_revision_job_suffix Ian Jackson
2015-08-28 16:34 ` Ian Jackson [this message]
2015-08-28 16:36 ` [OSSTEST PATCH 1/6] Other-revision-jobs: Provide central test Ian Jackson
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=1440779641-22477-6-git-send-email-ian.jackson@eu.citrix.com \
--to=ian.jackson@eu.citrix.com \
--cc=ian.campbell@citrix.com \
--cc=xen-devel@lists.xenproject.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).