]> xenbits.xensource.com Git - people/liuw/osstest.git/commitdiff
Xen built versions: ts-xen-build: check versions of Xen subtrees, only
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 1 Jul 2016 14:44:41 +0000 (15:44 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 5 Sep 2016 14:03:20 +0000 (15:03 +0100)
ts-xen-build has a check that the actually-built versions of the
various subtrees are right.  This allows it to spot if the machinery
for specifying the subtree revision hasn't worked.

However, this machinery is troublesome: it assumes that the value
specified in the revision_TREE runvar is a commit id, just like the
value specified in built_revision_TREE.  This is, currently, true in
flights created by cr-daily-branch and cs-try-bisect.

But it is not necessarily true for flights created other ways.  In
principle it would be possible to look into each checked out subtree,
and use git-rev-parse (and its equivalent for nother VCSs) to check
whether the specified revision is right (by comparing it to
origin/<revision_TREE>, not <revision_TREE>, I guess).  This is quite
fiddly.

The reason this is causing trouble now is that some of the ad-hoc rump
kernel flights I'm currently making contain non-git-revison-id values
for the revision_TREE for parts of the rumprun build.

So for now, limiting this check to TREEs which are actually Xen
subtrees will fix the problem for me (and this will be necessary for
the fuller fix, which I describe above).  So do that.

Specifically:
 * Add a new WHERE clause to the query statement, so that it selects
   only the row for one specific tree
 * Run the query once for each tree in %xensubtrees

This leaves the query overly-complicated, but this doesn't matter,
because if and when we make a fuller fix we'll throw this entire query
away.  So it is easier to put off rewriting it in the hope that this
will never been needed.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
ts-xen-build

index f5cff8b59b07d5a9c2a6782335326f77883487c2..cc171ef24f690d85e8883f9b9fb09a0c79c7fbfd 100755 (executable)
@@ -217,10 +217,13 @@ sub checkversions () {
          WHERE reqd.flight=? and reqd.job=?
            AND built.flight=? and built.job=?
            AND built.name = 'built_' || reqd.name
+           AND reqd.name = ?
 END
-    $chk->execute($flight,$job,$flight,$job);
     my $mismatches= 0;
-    while (my $row= $chk->fetchrow_arrayref()) {
+    foreach my $subtree (sort keys %xensubtrees) {
+       $chk->execute($flight,$job,$flight,$job,$subtree);
+       my $row= $chk->fetchrow_arrayref();
+       next unless $row;
         my ($tree, $reqd, $built) = @$row;
         next unless defined $reqd && defined $built;
         $reqd =~ s/^.*://;