[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH 20/26] Xen built versions: ts-xen-build: check versions of Xen subtrees, only

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

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.

 * 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@xxxxxxxxxxxxx>
 ts-xen-build | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/ts-xen-build b/ts-xen-build
index f5cff8b..cc171ef 100755
--- a/ts-xen-build
+++ b/ts-xen-build
@@ -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 = ?
-    $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/^.*://;

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.