diff mbox

[RFC,OSSTEST,v1,04/12] mfi-common: always add host suite to hostos_runvars

Message ID 1452263399-14094-4-git-send-email-ian.campbell@citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ian Campbell Jan. 8, 2016, 2:29 p.m. UTC
This avoids situations where production-config* has changed
DebianSuite but the bisector is still picking up baselines etc from
before the change and reusing their runvars (without suite) with an
inconsistent config.

Switch selecthost() to use target_var when querying the suite. This
means it will check the "{ident}_suite" runvar first as before but
fallback to just looking at the "all_host_suite" runvar. We also
change the existing host_suite to all_host_suite in mfi-commong so
that test_matrix_iterate() needn't worry about ident=host vs
=src_host/dst_host etc (of course this can still be overridden if
desired by using src_host_suite etc, but nowhere does.

Other uses of $c{DebianSuite} have been abolished already.

Note that "$suite != $defsuite" is not true for any current production
invocation of osstest. If this was ever true then we would have set
the host_suite runvar, whereas now we always set all_host_suite.
However any old flights with host_suite would still be interpretted
the same. Note also that the "$suite != $defsuite" case was previously
broken for the -pair tests since the host idents there are 'src_host'
and 'dst_host', so the previous code would have fallen back to
$c{DebianSuite} without looking at the host_suite runvar.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
runvars changes are lots of:
+xen-unstable               test-amd64-amd64-amd64-pvgrub                         all_host_suite               jessie
+xen-unstable               test-amd64-amd64-i386-pvgrub                          all_host_suite               jessie
+xen-unstable               test-amd64-amd64-libvirt                              all_host_suite               jessie
and:
+xen-unstable               build-amd64                                           all_host_suite               jessie
+xen-unstable               build-amd64-libvirt                                   all_host_suite               jessie
+xen-unstable               build-amd64-oldkern                                   all_host_suite               jessie
---
 Osstest/TestSupport.pm |  3 +--
 mfi-common             | 12 ++----------
 2 files changed, 3 insertions(+), 12 deletions(-)

Comments

Ian Jackson Jan. 12, 2016, 11:27 a.m. UTC | #1
Ian Campbell writes ("[PATCH RFC OSSTEST v1 04/12] mfi-common: always add host suite to hostos_runvars"):
> This avoids situations where production-config* has changed
> DebianSuite but the bisector is still picking up baselines etc from
> before the change and reusing their runvars (without suite) with an
> inconsistent config.

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
diff mbox

Patch

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index baff4f8..3923b18 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -861,8 +861,7 @@  sub selecthost ($) {
         Info => [],
     };
     if (defined $job) {
-	$ho->{Suite} = get_runvar_default("${ident}_suite",$job,
-					  $c{DebianSuite});
+	$ho->{Suite} = target_var($ho, "suite") // $c{DebianSuite};
     }
 
     #----- handle hosts which are themselves guests (nested) -----
diff --git a/mfi-common b/mfi-common
index ccf8a5b..0e2b64f 100644
--- a/mfi-common
+++ b/mfi-common
@@ -123,11 +123,7 @@  create_build_jobs () {
     *)     suite=$defsuite;;
     esac
 
-    if [ $suite != $defsuite ] ; then
-        hostos_runvars="host_suite=$suite"
-    else
-        hostos_runvars=
-    fi
+    hostos_runvars="all_host_suite=$suite"
 
     # In 4.4 onwards xend is off by default. If necessary we build a
     # separate set of binaries with xend enabled in order to run those
@@ -409,11 +405,7 @@  test_matrix_iterate () {
     *)     suite=$defsuite; guestsuite=$defguestsuite;;
     esac
 
-    if [ $suite != $defsuite ] ; then
-        hostos_runvars="host_suite=$suite"
-    else
-        hostos_runvars=
-    fi
+    hostos_runvars="all_host_suite=$suite"
 
     for kern in ''; do