other_revision_job_suffix: Take and pass referring runvar name
PATCH 1/2 other_revision_job_suffix: Take and pass referring runvar name
We are going to need this to sort out bisection for freebsd's recursive builds.
--- Osstest.pm | 6 +++--- cs-bisection-step | 17 +++++++++-------- 2 files changed, 12 insertions(+), 11 deletions(-)
Osstest.pm +3 -3
@@ -374,8 +374,8 @@ sub flight_otherjob ($$) { confess "$otherflightjob ?"; } -sub other_revision_job_suffix ($$) { - my ($jobfield, $separator) = @_; +sub other_revision_job_suffix ($$$) { + my ($jobfield, $refrunvar, $separator) = @_; return <<END (CASE WHEN ($jobfield) LIKE 'build-%-prev' THEN '${separator}prev'
@@ -386,7 +386,7 @@ END sub main_revision_job_cond ($) { my ($jobfield) = @_; - return "(${\ other_revision_job_suffix($jobfield,'x') } = '')"; + return "(${\ other_revision_job_suffix($jobfield,'x','x') } = '')"; } sub get_harness_rev () {
cs-bisection-step +9 -8
@@ -232,7 +232,7 @@ END SELECT url.val AS uval, rev.val AS rval, url.job AS job, - ${\ other_revision_job_suffix('url.job',' ') } AS othrev, + ${\ other_revision_job_suffix('url.job','url.use',' ') } AS othrev, url.name AS longname FROM tmp_build_info AS rev
@@ -1135,9 +1135,9 @@ our %jobs_created; our %builds_investigated; # $builds_investigated{$popjob} = 0, or {..row..} our %recursion_track; -sub preparejob ($$$); -sub preparejob ($$$) { - my ($popjob, $copyflight, $cacheok) = @_; +sub preparejob ($$$$); +sub preparejob ($$$$) { + my ($popjob, $copyflight, $refrunvar, $cacheok) = @_; # runs in db_retry qw(flights) if (exists $jobs_created{$popjob}) {
@@ -1168,13 +1168,13 @@ END SELECT name FROM runvars WHERE flight=? AND job=? AND name = ? - AND ${\ other_revision_job_suffix('job',' ') } = ? + 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, $othrev); + $treeq->execute($copyflight, $popjob, $treevar, $refrunvar, $othrev); my ($treerow) = $treeq->fetchrow_array(); $treeq->finish(); next unless defined $treerow;
@@ -1312,7 +1312,8 @@ END print STDERR "Reusing $target for $subjob->{name}". " in $popflight.$popjob\n"; } else { - $target= preparejob($subjob->{job}, $subjob->{orgflight}, 1); + $target= preparejob($subjob->{job}, $subjob->{orgflight}, + $subjob->{name}, 1); } $jobsetq->execute($target, $popflight, $popjob, $subjob->{name}); }
@@ -1339,7 +1340,7 @@ END db_retry($popflight,'constructing', $dbh_tests,[qw(flights)], sub { print STDERR "Populating $popflight...\n"; undef %jobs_created; - preparejob($job, $latest_flight, 0); + preparejob($job, $latest_flight, '', 0); foreach my $hostspec (split /,/, $hosts) { # / $hostspec =~ m/=/; $addvar->execute($popflight, $job, $`, $'); # '
Signature · 7 lines
2.11.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 2/2 freebsd build job bisection: add special case
other_revision_job_suffix contains ad-hoc code which returns an identifier distinguishing certain jobs which are expected to refer to different revisions within their flight.
Add the special case for freebsdbuildjob's recursion.
After this change we are now willing to tolerate the fact that a freebsd build job has as input multiple different revisions of freebsd.
cs-bisection-step has code to avoid creating recursive build jobs: the created top-level job will therefore reuse the same freebsdbuildjob as the template. Hopefully that will be the previously anointed one and still be available.
The bisector wants to repro on the same host as before. This means it won't necessarily use the most recent pass as the basis build. So long as the previous build has not been expired, this is fine. It does involve building an earlier freebsd on a later one but this should be OK.
--- Osstest.pm | 2 ++ 1 file changed, 2 insertions(+)
Osstest.pm +2 -0
@@ -379,6 +379,8 @@ sub other_revision_job_suffix ($$$) { return <<END (CASE WHEN ($jobfield) LIKE 'build-%-prev' THEN '${separator}prev' + WHEN (($jobfield) LIKE 'build-%-freebsd' + AND $refrunvar = 'freebsdbuildjob') THEN '${separator}recurse' ELSE '' END) END
Signature · 7 lines
2.11.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel