Specify host and guest os version in runvars
v2 cover Specify host and guest os version in runvars
The following series makes it possible to specify the OS used on the host and in guests (e.g. DebianSuite, d-i version, ISO image version) via runvars and causes the production configurations to always fully specify these rather than relying on test scripts picking up the defaults from the configuration (but retaining that as a fall back for adhoc and other uses).
There are two reasons for this, both of which were noticed during the recent update of osstest to use Debian Jessie in place of Debian Wheezy as the host and guest OS.
Firstly we noticed that bisection could be inconsistent if e.g. the baseline pass ran with Wheezy but the failure ran with Jessie. In this case prior to these changes the attempt to reproduce the baseline pass would then use DebianSuite=Jessie (from the config) but hostflags=suite-wheezy (copied from the template) and fail in various ways. After these changes the DebianSuite would come from the runvars in the template and therefore be Wheezy (i.e. consistent).
Secondly some older branches of Xen (e.g. 4.3 and earlier) do not build with the toolchain in Jessie, which has gained additional warnings etc. In at least one case the backport for that fix was considered too invasive for a stable branch. With these changes it is now possible for different branches to select a different DebianSuite and this is done for 4.3 and earlier.
Note that when configuring the DebianSuite it is also necessary to select a corresponding d-i version, this is handled here too. In general one also wants the Debian ISO used for debianhvm tests to match too, this is also handled here.
I have run standalone-generate-dump-flight-runvars at each step and satisfied myself the changes are correct but I have not yet actually run this. I intend to run adhoc flights with xen-unstable and xen-4.3-testing, in the meantime this is an RFC.
I didn't include the full runvar diff this time.
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
PATCH v2 1/12 Debian: Abolish $suite and $xopts{Suite} from preseed_* interfaces.
Generating a preseed for a suite which does not match the ->{Suite} of the underlying guest or host object does not seem useful, so remove this option and use ->{Suite} instead.
For guests ->{Suite} is set by debian_guest_suite() (which is called from preseed_guest_create(), although it is often also called prior to that) and by selectguest()
For hosts $ho->{Suite} is initialised by selecthost if we are in the context of a $job (and if we aren't we had best not be trying to reinstall a host).
--- Osstest/Debian.pm | 14 ++++++++------ ts-debian-di-install | 1 - ts-debian-hvm-install | 2 +- ts-host-install | 1 - 4 files changed, 9 insertions(+), 9 deletions(-)
Osstest/Debian.pm +8 -6
@@ -794,8 +794,10 @@ sub debian_overlays ($) { $func->('overlay', 'overlay.tar'); } -sub preseed_base ($$$$;@) { - my ($ho,$suite,$sfx,$extra_packages,%xopts) = @_; +sub preseed_base ($$$;@) { + my ($ho,$sfx,$extra_packages,%xopts) = @_; + + my $suite = $ho->{Suite}; $xopts{ExtraPreseed} ||= '';
@@ -927,7 +929,7 @@ END sub preseed_create_guest ($$$;@) { my ($ho, $arch, $sfx, %xopts) = @_; - my $suite= $xopts{Suite} || $c{DebianSuite}; + my $suite= debian_guest_suite($ho); my $extra_packages = ""; if ($xopts{PvMenuLst}) {
@@ -962,7 +964,7 @@ END } } - my $preseed_file= preseed_base($ho, $suite, $sfx, $extra_packages, %xopts); + my $preseed_file= preseed_base($ho, $sfx, $extra_packages, %xopts); $preseed_file.= (<<END); d-i partman-auto/method string regular d-i partman-auto/choose_recipe \\
@@ -1004,7 +1006,7 @@ sub preseed_create ($$;@) { my ($ho, $sfx, %xopts) = @_; my $disk= $xopts{DiskDevice} || '/dev/sda'; - my $suite= $xopts{Suite} || $c{DebianSuite}; + my $suite= $ho->{Suite}; my $d_i= $ho->{Tftp}{Path}.'/'.$ho->{Tftp}{DiBase}.'/'.$r{arch}.'/'. $c{TftpDiVersion}.'-'.$ho->{Suite};
@@ -1192,7 +1194,7 @@ END my $extra_packages = join(",",@extra_packages); - my $preseed_file= preseed_base($ho,$suite,$sfx,$extra_packages,%xopts); + my $preseed_file= preseed_base($ho,$sfx,$extra_packages,%xopts); $preseed_file .= (<<END); d-i partman-auto/method string lvm
ts-debian-di-install +0 -1
@@ -204,7 +204,6 @@ END my $pvmenulst = ($bl eq "pvgrub" || $arch =~ /arm/); $ps_url = preseed_create_guest($gho, $arch, '', - Suite=>$suite, PvMenuLst=>$pvmenulst); $extra_disk = "";
ts-debian-hvm-install +1 -1
@@ -55,7 +55,7 @@ our $gsuite; sub preseed () { - my $preseed_file = preseed_base($gho,$gsuite,'','',()); + my $preseed_file = preseed_base($gho,'','',()); my $disk = guest_var($gho,'diskdevice','/dev/xvda');
ts-host-install +0 -1
@@ -59,7 +59,6 @@ sub install () { my ($ps_url,$ps_file)= preseed_create ($ho, '', - Suite => $ho->{Suite}, DiskDevice => $ho->{DiskDevice}, Properties => $ho->{Properties}, ExtraPreseed => <<END );
Signature · 1 line
2.6.1
PATCH v2 2/12 target_var: Support fallback to all_(guest|host)_$vn
In reply to Ian CampbellHaving to set {ident}_foo for all idents used in a job (e.g host vs src_host+dst_host) in make-flight would be a little fiddly.
Instead follow the lead of all_hostflags and consult all_host_$vn.
I have no immediate use for all_guest_$vn, but support it for consistency.
--- Osstest/TestSupport.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
Osstest/TestSupport.pm +4 -1
@@ -2091,7 +2091,10 @@ sub target_var_prefix ($) { sub target_var ($$) { my ($ho,$vn) = @_; - return $r{ target_var_prefix($ho). $vn }; + my $pfx = target_var_prefix($ho); + my $allthing = exists $ho->{Guest} ? "guest" : "host"; + return $r{ $pfx. $vn } // + $r{ "all_${allthing}_${vn}" }; } sub target_kernkind_check ($) {
Signature · 1 line
2.6.1
PATCH v2 3/12 mfi-common: Rename $suite_runvars as $hostos_runvars
In reply to Ian CampbellLater in the series more runvars to control the host install will be added.
--- mfi-common | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-)
mfi-common +14 -13
@@ -80,7 +80,7 @@ create_build_jobs () { local arch local pvops_kernel pvops_kconfig_overrides - local suite suite_runvars + local suite hostos_runvars local want_xend build_defxend build_extraxend local enable_ovmf local build_hostflags
@@ -124,9 +124,9 @@ create_build_jobs () { esac if [ $suite != $defsuite ] ; then - suite_runvars="host_suite=$suite" + hostos_runvars="host_suite=$suite" else - suite_runvars= + hostos_runvars= fi # In 4.4 onwards xend is off by default. If necessary we build a
@@ -192,7 +192,7 @@ create_build_jobs () { tree_seabios=$TREE_SEABIOS \ tree_ovmf=$TREE_OVMF \ $RUNVARS $BUILD_RUNVARS $BUILD_XEN_RUNVARS $arch_runvars \ - $suite_runvars \ + $hostos_runvars \ host_hostflags=$build_hostflags \ revision_xen=$REVISION_XEN \ revision_qemu=$REVISION_QEMU \
@@ -214,7 +214,7 @@ create_build_jobs () { enable_xsm=false \ tree_xen=$TREE_XEN \ $RUNVARS $BUILD_RUNVARS $BUILD_XEN_RUNVARS $arch_runvars \ - $suite_runvars \ + $hostos_runvars \ host_hostflags=$build_hostflags \ revision_xen=$REVISION_PREVXEN fi
@@ -226,7 +226,7 @@ create_build_jobs () { tree_qemuu=$TREE_QEMU_UPSTREAM \ tree_xen=$TREE_XEN \ $RUNVARS $BUILD_RUNVARS $BUILD_XEN_RUNVARS $arch_runvars \ - $suite_runvars \ + $hostos_runvars \ host_hostflags=$build_hostflags \ revision_xen=$REVISION_XEN \ revision_qemu=$REVISION_QEMU \
@@ -236,7 +236,7 @@ create_build_jobs () { job_create_build build-$arch-pvops build-kern \ arch=$arch kconfighow=xen-enable-xen-config \ $RUNVARS $BUILD_RUNVARS $BUILD_LINUX_RUNVARS $arch_runvars \ - $suite_runvars \ + $hostos_runvars \ host_hostflags=$build_hostflags \ $pvops_kernel $pvops_kconfig_overrides \ ${TREEVCS_LINUX:+treevcs_linux=}${TREEVCS_LINUX} \
@@ -249,7 +249,7 @@ create_build_jobs () { arch=$arch \ tree_xen=$TREE_XEN \ $RUNVARS $BUILD_RUNVARS $BUILD_LIBVIRT_RUNVARS $arch_runvars \ - $suite_runvars \ + $hostos_runvars \ host_hostflags=$build_hostflags \ buildjob=${bfi}build-$arch \ tree_libvirt=$TREE_LIBVIRT revision_libvirt=$REVISION_LIBVIRT\
@@ -264,7 +264,7 @@ create_build_jobs () { arch=$arch \ tree_xen=$TREE_XEN \ $RUNVARS $BUILD_RUNVARS $BUILD_RUMPUSERXEN_RUNVARS $arch_runvars \ - $suite_runvars \ + $hostos_runvars \ host_hostflags=$build_hostflags \ buildjob=${bfi}build-$arch \ tree_rumpuserxen=$TREE_RUMPUSERXEN \
@@ -293,7 +293,7 @@ create_build_jobs () { arch=$arch kconfighow=create-config-sh \ kimagefile=vmlinux \ $RUNVARS $BUILD_RUNVARS $BUILD_LINUX_OLD_RUNVARS \ - $arch_runvars $suite_runvars \ + $arch_runvars $hostos_runvars \ host_hostflags=$build_hostflags \ tree_linux=http://xenbits.xen.org/linux-2.6.18-xen.hg \ revision_linux=$REVISION_LINUX_OLD
@@ -355,6 +355,7 @@ usual_debianhvm_image () { # Provides various convenience variables for the callback. # test_matrix_iterate () { + local hostos_runvars case "$xenbranch" in xen-3.*-testing) pairtoolstack=xend ;;
@@ -409,9 +410,9 @@ test_matrix_iterate () { esac if [ $suite != $defsuite ] ; then - suite_runvars="host_suite=$suite" + hostos_runvars="host_suite=$suite" else - suite_runvars= + hostos_runvars= fi for kern in ''; do
@@ -452,7 +453,7 @@ test_matrix_iterate () { arch=$dom0arch \ kernbuildjob=${bfi}build-$dom0arch-$kernbuild \ kernkind=$kernkind \ - $arch_runvars $suite_runvars + $arch_runvars $hostos_runvars " test_matrix_do_one
Signature · 1 line
2.6.1
PATCH v2 4/12 mfi-common: always add host suite to hostos_runvars
In reply to Ian CampbellThis 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.
---
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(-)
Osstest/TestSupport.pm +1 -2
@@ -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) -----
mfi-common +2 -10
@@ -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
Signature · 1 line
2.6.1
PATCH v2 5/12 mfi-common: Always add debian_suite to debian_runvars
In reply to Ian CampbellThis adds an explicit debian_suite to some jobs which didn't already have one, meaning that those jobs will remain the same when cloned for a bisect and run in a tree where $c{DebianGuestSuite} has changed since the original construction.
No expected semantic change.
---
v2: Replaces "make-*flight: Abolish $defsuite and $guestdefsuite", just always set debian_suite.
@@ -444,13 +444,42 @@
xen-unstable test-amd64-amd64-xl-pvh-intel debian_pvh 1 xen-unstable test-amd64-amd64-amd64-pvgrub debian_suite jessie xen-unstable test-amd64-amd64-i386-pvgrub debian_suite jessie +xen-unstable test-amd64-amd64-libvirt debian_suite jessie +xen-unstable test-amd64-amd64-libvirt-pair debian_suite jessie xen-unstable test-amd64-amd64-libvirt-vhd debian_suite jessie +xen-unstable test-amd64-amd64-libvirt-xsm debian_suite jessie +xen-unstable test-amd64-amd64-migrupgrade debian_suite jessie +xen-unstable test-amd64-amd64-pair debian_suite jessie xen-unstable test-amd64-amd64-pygrub debian_suite jessie +xen-unstable test-amd64-amd64-xl debian_suite jessie +xen-unstable test-amd64-amd64-xl-credit2 debian_suite jessie +xen-unstable test-amd64-amd64-xl-multivcpu debian_suite jessie +xen-unstable test-amd64-amd64-xl-pvh-amd debian_suite jessie +xen-unstable test-amd64-amd64-xl-pvh-intel debian_suite jessie xen-unstable test-amd64-amd64-xl-qcow2 debian_suite jessie +xen-unstable test-amd64-amd64-xl-rtds debian_suite jessie +xen-unstable test-amd64-amd64-xl-xsm debian_suite jessie +xen-unstable test-amd64-i386-libvirt debian_suite jessie +xen-unstable test-amd64-i386-libvirt-pair debian_suite jessie +xen-unstable test-amd64-i386-libvirt-xsm debian_suite jessie +xen-unstable test-amd64-i386-migrupgrade debian_suite jessie +xen-unstable test-amd64-i386-pair debian_suite jessie +xen-unstable test-amd64-i386-xl debian_suite jessie xen-unstable test-amd64-i386-xl-raw debian_suite jessie +xen-unstable test-amd64-i386-xl-xsm debian_suite jessie +xen-unstable test-armhf-armhf-libvirt debian_suite jessie xen-unstable test-armhf-armhf-libvirt-qcow2 debian_suite jessie xen-unstable test-armhf-armhf-libvirt-raw debian_suite jessie +xen-unstable test-armhf-armhf-libvirt-xsm debian_suite jessie +xen-unstable test-armhf-armhf-xl debian_suite jessie +xen-unstable test-armhf-armhf-xl-arndale debian_suite jessie +xen-unstable test-armhf-armhf-xl-credit2 debian_suite jessie +xen-unstable test-armhf-armhf-xl-cubietruck debian_suite jessie +xen-unstable test-armhf-armhf-xl-midway debian_suite jessie +xen-unstable test-armhf-armhf-xl-multivcpu debian_suite jessie +xen-unstable test-armhf-armhf-xl-rtds debian_suite jessie xen-unstable test-armhf-armhf-xl-vhd debian_suite jessie +xen-unstable test-armhf-armhf-xl-xsm debian_suite jessie xen-unstable test-amd64-amd64-libvirt-qemuu-debianhvm-amd64-xsm debianhvm_image debian-8.2.0-amd64-CD-1.iso xen-unstable test-amd64-amd64-xl-qemut-debianhvm-amd64 debianhvm_image debian-8.2.0-amd64-CD-1.iso xen-unstable test-amd64-amd64-xl-qemut-debianhvm-amd64-xsm debianhvm_image debian-8.2.0-amd64-CD-1.iso --- mfi-common | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
mfi-common +5 -5
@@ -351,7 +351,7 @@ usual_debianhvm_image () { # Provides various convenience variables for the callback. # test_matrix_iterate () { - local hostos_runvars + local suite guestsuite hostos_runvars case "$xenbranch" in xen-3.*-testing) pairtoolstack=xend ;;
@@ -431,10 +431,10 @@ test_matrix_iterate () { arch_runvars=\"\$ARCH_RUNVARS_$dom0arch\" " - debian_runvars="debian_kernkind=$kernkind debian_arch=$dom0arch" - if [ $guestsuite != $defguestsuite ] ; then - debian_runvars="$debian_runvars debian_suite=$guestsuite" - fi + debian_runvars="debian_kernkind=$kernkind \ + debian_arch=$dom0arch \ + debian_suite=$guestsuite \ + " most_hostflags="arch-$dom0arch,arch-xen-$xenarch,suite-$suite,purpose-test" if [ "x$min_linux_hostflag" != "x" ] ; then
Signature · 1 line
2.6.1
PATCH v2 6/12 ts-host-install: Support DiVersion coming from runvars
In reply to Ian CampbellTo do so initialise $ho->{DiVersion} in select host and use it in ts-host-install.
--- Osstest/TestSupport.pm | 1 + ts-host-install | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
Osstest/TestSupport.pm +1 -0
@@ -862,6 +862,7 @@ sub selecthost ($) { }; if (defined $job) { $ho->{Suite} = target_var($ho, "suite") // $c{DebianSuite}; + $ho->{DiVersion} = target_var($ho, "diversion") // $c{TftpDiVersion}; } #----- handle hosts which are themselves guests (nested) -----
ts-host-install +1 -1
@@ -157,7 +157,7 @@ END sub setup_pxeboot_firstboot($) { my ($ps_url) = @_; - my $d_i= $ho->{Tftp}{DiBase}.'/'.$r{arch}.'/'.$c{TftpDiVersion}.'-'.$ho->{Suite}; + my $d_i= $ho->{Tftp}{DiBase}.'/'.$r{arch}.'/'.$ho->{DiVersion}.'-'.$ho->{Suite}; my @dicmdline= qw(vga=normal); push @dicmdline, di_installcmdline_core($ho, $ps_url, %xopts);
Signature · 1 line
2.6.1
PATCH v2 7/12 ts-debian-di-install: Allow Di Version to come from runvars
In reply to Ian Campbelland following the lead of the suite arrange for a version selected from the defaults to be written back to the runvars.
---
v2: s/diversion/di_version/
--- Osstest/Debian.pm | 15 ++++++++++++++- ts-debian-di-install | 3 ++- 2 files changed, 16 insertions(+), 2 deletions(-)
Osstest/Debian.pm +14 -1
@@ -35,7 +35,7 @@ BEGIN { @ISA = qw(Exporter); @EXPORT = qw(debian_boot_setup debian_overlays - debian_guest_suite + debian_guest_suite debian_guest_di_version %preseed_cmds preseed_base preseed_create
@@ -1352,4 +1352,17 @@ sub debian_guest_suite ($) { return $gho->{Suite}; } +sub debian_guest_di_version ($) { + my ($gho) = @_; + + $gho->{DiVersion} //= guest_var($gho,'di_version',undef); + + if (!$gho->{DiVersion}) { + $gho->{DiVersion} = $c{TftpDiVersion}; + store_runvar("$gho->{Guest}_di_version", $gho->{DiVersion}); + } + + return $gho->{DiVersion}; +} + 1;
ts-debian-di-install +2 -1
@@ -151,7 +151,8 @@ sub setup_netboot($$$) die if $r{ "$gho->{Guest}_netboot_kernel" } || $r{ "$gho->{Guest}_netboot_ramdisk" }; - my $di_path = $c{TftpPath}.'/'.$ho->{Tftp}{DiBase}.'/'.${arch}.'/'.$c{TftpDiVersion}.'-'.$ho->{Suite}; + my $di_path = $c{TftpPath}.'/'.$ho->{Tftp}{DiBase}.'/'.${arch}.'/'.\ + debian_guest_diversion($ho).'-'.$ho->{Suite}; if (${arch} =~ m/amd64|i386/) { $kernel = "$di_path/vmlinuz-xen";
Signature · 1 line
2.6.1
PATCH v2 8/12 make-flight: Set di_version runvar on d-i based test jobs.
In reply to Ian CampbellNote that make-distros-flight does not want this, since it uses d-i fetched from the web not the version in our config.
---
v2: s/diversion/di_version/
--- make-flight | 4 ++++ 1 file changed, 4 insertions(+)
make-flight +4 -0
@@ -33,6 +33,7 @@ flight=`./cs-flight-create $blessing $branch` defsuite=`getconfig DebianSuite` defguestsuite=`getconfig GuestDebianSuite` +guest_di_version=`getconfig TftpDiVersion` case "$branch" in xen-unstable-smoke)
@@ -433,6 +434,7 @@ do_pygrub_tests () { test-debian-di xl $xenarch $dom0arch \ debian_arch=amd64 \ debian_suite=$guestsuite \ + debian_di_version=$guest_di_version \ debian_method=netboot \ debian_bootloader=pygrub \ all_hostflags=$most_hostflags
@@ -447,6 +449,7 @@ do_pvgrub_tests () { test-debian-di xl $xenarch $dom0arch \ debian_arch=amd64 \ debian_suite=$guestsuite \ + debian_di_version=$guest_di_version \ debian_method=netboot \ debian_bootloader=pvgrub \ all_hostflags=$most_hostflags \
@@ -455,6 +458,7 @@ do_pvgrub_tests () { test-debian-di xl $xenarch $dom0arch \ debian_arch=i386 \ debian_suite=$guestsuite \ + debian_di_version=$guest_di_version \ debian_method=netboot \ debian_bootloader=pvgrub \ all_hostflags=$most_hostflags
Signature · 1 line
2.6.1
PATCH v2 9/12 mfi-common: Set di_version for build & test host install
In reply to Ian CampbellThis means that bisections will use the same version, even if production-config changed in the mean time.
---
v2: s/diversion/di_version/
Moved to same model of setting $def... as used for the suites. Dropped ack due to change to $def...
--- make-flight | 4 +++- mfi-common | 15 +++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-)
make-flight +3 -1
@@ -33,7 +33,9 @@ flight=`./cs-flight-create $blessing $branch` defsuite=`getconfig DebianSuite` defguestsuite=`getconfig GuestDebianSuite` -guest_di_version=`getconfig TftpDiVersion` +defdi_version=`getconfig TftpDiVersion` + +guest_di_version=$defdi_version case "$branch" in xen-unstable-smoke)
mfi-common +9 -6
@@ -80,7 +80,7 @@ create_build_jobs () { local arch local pvops_kernel pvops_kconfig_overrides - local suite hostos_runvars + local suite di_version hostos_runvars local want_xend build_defxend build_extraxend local enable_ovmf local build_hostflags
@@ -120,10 +120,10 @@ create_build_jobs () { esac case "$arch" in - *) suite=$defsuite;; + *) suite=$defsuite; di_version=$defdi_version;; esac - hostos_runvars="all_host_suite=$suite" + hostos_runvars="all_host_suite=$suite all_host_di_version=$di_version" # 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
@@ -351,7 +351,7 @@ usual_debianhvm_image () { # Provides various convenience variables for the callback. # test_matrix_iterate () { - local suite guestsuite hostos_runvars + local suite guestsuite di_version hostos_runvars case "$xenbranch" in xen-3.*-testing) pairtoolstack=xend ;;
@@ -402,10 +402,13 @@ test_matrix_iterate () { esac case "$xenarch" in - *) suite=$defsuite; guestsuite=$defguestsuite;; + *) suite=$defsuite + guestsuite=$defguestsuite + di_version=$defdi_version + ;; esac - hostos_runvars="all_host_suite=$suite" + hostos_runvars="all_host_suite=$suite all_host_di_version=$di_version" for kern in ''; do
Signature · 1 line
2.6.1
PATCH v2 10/12 Qualify TftpDiVersion with the suite.
In reply to Ian CampbellThis allows the version to differ e.g. between Wheezy and Jessie.
Update production-config* to set TftpDiVersion_jessie instead of just TftpDiVersion, also add TftpDiVersion_wheezy using the version replaced in commit f610ea162836 "Switch to Debian 8.0 (jessie) as OS for test hosts".
In mfi-common we need to check for TftpDiVersion_$suite (_$guestsuite) and TftpDiVersion manually since getconfig In that context will not see any DebianSuite override in the environment.
This ensures that when a non-default suite is configured a corresponding useful version of DI is selected.
---
v2: di_version
--- Osstest.pm | 2 +- make-flight | 10 +++++++++- production-config | 3 ++- production-config-cambridge | 3 ++- 4 files changed, 14 insertions(+), 4 deletions(-)
Osstest.pm +1 -1
@@ -224,7 +224,7 @@ sub readglobalconfig () { $c{TftpTmpDir} ||= "$c{TftpPlayDir}tmp/"; $c{TftpDiBase} ||= "$c{TftpPlayDir}debian-installer"; - $c{TftpDiVersion} ||= 'current'; + $c{TftpDiVersion} ||= $c{ "TftpDiVersion_$c{DebianSuite}" } // 'current'; $c{TftpGrubBase} ||= "$c{TftpPlayDir}grub"; $c{TftpGrubVersion} ||= 'current';
make-flight +9 -1
@@ -33,7 +33,15 @@ flight=`./cs-flight-create $blessing $branch` defsuite=`getconfig DebianSuite` defguestsuite=`getconfig GuestDebianSuite` -defdi_version=`getconfig TftpDiVersion` + +# Pick default Debian Installer version to correspond to the chosen +# suite. +if [ -z "$defdi_version" -a -n "$defsuite" ] ; then + defdi_version=`getconfig TftpDiVersion_$defsuite` +fi +if [ -z "$defdi_version" ] ; then + defdi_version=`getconfig TftpDiVersion` +fi guest_di_version=$defdi_version
production-config +2 -1
@@ -87,7 +87,8 @@ TftpPxeTemplatesReal pxelinux.cfg/%ipaddrhex% TftpPxeGroup osstest # Update with ./mg-debian-installer-update(-all) -TftpDiVersion 2015-09-18 +TftpDiVersion_wheezy 2015-09-07 +TftpDiVersion_jessie 2015-09-18 # These should normally be the same. # Update with ./mg-cpu-microcode-update
production-config-cambridge +2 -1
@@ -69,7 +69,8 @@ TftpPxeTemplates %name%/pxelinux.cfg TftpPxeTemplatesReal pxelinux.cfg/%ipaddrhex% TftpPxeGroup osstest -TftpDiVersion 2015-09-18 +TftpDiVersion_wheezy 2015-09-07 +TftpDiVersion_jessie 2015-09-18 # These should normally be the same. MicrocodeUpdateAmd64 microcode.x86.2015-06-12.cpio
Signature · 1 line
2.6.1
PATCH v2 11/12 mfi-common: usual_debianhvm_image: derive version from $guestsuite
In reply to Ian CampbellThis more likely matches the callers intention.
Move the setting into production-config* alongside the Suite and TftpDiVersion settings. Continue to support $DEBIAN_IMAGE_VERSION as an override. The value for Wheezy is from what was replaced
in 610ea1628363 "Switch to Debian 8.0 (jessie) as OS for test hosts".
--- mfi-common | 6 +++++- production-config | 4 ++++ production-config-cambridge | 4 ++++ 3 files changed, 13 insertions(+), 1 deletion(-)
mfi-common +5 -1
@@ -340,7 +340,11 @@ job_create_test () { usual_debianhvm_image () { local arch=$1; shift - echo debian-${DEBIAN_IMAGE_VERSION-8.2.0}-$arch-CD-1.iso + local ver=$DEBIAN_IMAGE_VERSION + if [ -z "$ver" ] ; then + ver=`getconfig DebianImageVersion_$guestsuite` + fi + echo debian-$ver-$arch-CD-1.iso } # Iterate over xenarch, dom0arch and kernel calling test_matrix_do_one
production-config +4 -0
@@ -90,6 +90,10 @@ TftpPxeGroup osstest TftpDiVersion_wheezy 2015-09-07 TftpDiVersion_jessie 2015-09-18 +# For ISO installs +DebianImageVersion_wheezy 7.2.0 +DebianImageVersion_jessie 8.2.0 + # These should normally be the same. # Update with ./mg-cpu-microcode-update MicrocodeUpdateAmd64 microcode.x86.2015-06-12.cpio
production-config-cambridge +4 -0
@@ -72,6 +72,10 @@ TftpPxeGroup osstest TftpDiVersion_wheezy 2015-09-07 TftpDiVersion_jessie 2015-09-18 +# For ISO installs +DebianImageVersion_wheezy 7.2.0 +DebianImageVersion_jessie 8.2.0 + # These should normally be the same. MicrocodeUpdateAmd64 microcode.x86.2015-06-12.cpio MicrocodeUpdateI386 microcode.x86.2015-06-12.cpio
Signature · 1 line
2.6.1
PATCH v2 12/12 make-flight: Use older Debian for host and guest OS with older Xen
In reply to Ian CampbellSometimes when updating osstest to use a newer version of Debian as a baseline we find that the new compiler or other tools pickup latent errors in older code bases for which the fixes are invasive or otherwise inappropriate for a stable branch.
This is the case with Debian Jessie and Xen 4.3 and earlier, so restrict those branches to keep using Wheezy.
This only applies to xen-X.Y-testing branches and qemu-upstream-X.Y-testing branches since other branch all use xen-unstable as their Xen.
---
v2: Cope with un-abolishing $defsuite and $defguestsuite.
Dropped Ack.
Runvar differences are of the form:
-xen-4.3-testing build-amd64 all_host_di_version 2015-09-18 -xen-4.3-testing build-amd64 all_host_suite jessie +xen-4.3-testing build-amd64 all_host_di_version 2015-09-07 +xen-4.3-testing build-amd64 all_host_suite wheezy xen-4.3-testing build-amd64 arch amd64 -xen-4.3-testing build-amd64 host_hostflags share-build-jessie-amd64,arch-amd64,suite-jessie,purpose-build +xen-4.3-testing build-amd64 host_hostflags share-build-wheezy-amd64,arch-amd64,suite-wheezy,purpose-build
Or for a test which uses d-i:
-xen-4.3-testing test-amd64-amd64-amd64-pvgrub all_host_di_version 2015-09-18 -xen-4.3-testing test-amd64-amd64-amd64-pvgrub all_hostflags arch-amd64,arch-xen-amd64,suite-jessie,purpose-test -xen-4.3-testing test-amd64-amd64-amd64-pvgrub all_host_suite jessie +xen-4.3-testing test-amd64-amd64-amd64-pvgrub all_host_di_version 2015-09-07 +xen-4.3-testing test-amd64-amd64-amd64-pvgrub all_hostflags arch-amd64,arch-xen-amd64,suite-wheezy,purpose-test +xen-4.3-testing test-amd64-amd64-amd64-pvgrub all_host_suite wheezy xen-4.3-testing test-amd64-amd64-amd64-pvgrub arch amd64 xen-4.3-testing test-amd64-amd64-amd64-pvgrub buildjob build-amd64 xen-4.3-testing test-amd64-amd64-amd64-pvgrub debian_arch amd64 xen-4.3-testing test-amd64-amd64-amd64-pvgrub debian_bootloader pvgrub -xen-4.3-testing test-amd64-amd64-amd64-pvgrub debian_di_version 2015-09-18 +xen-4.3-testing test-amd64-amd64-amd64-pvgrub debian_di_version 2015-09-07 xen-4.3-testing test-amd64-amd64-amd64-pvgrub debian_method netboot -xen-4.3-testing test-amd64-amd64-amd64-pvgrub debian_suite jessie +xen-4.3-testing test-amd64-amd64-amd64-pvgrub debian_suite wheezy xen-4.3-testing test-amd64-amd64-amd64-pvgrub kernbuildjob build-amd64-pvops xen-4.3-testing test-amd64-amd64-amd64-pvgrub kernkind pvops xen-4.3-testing test-amd64-amd64-amd64-pvgrub toolstack xl xen-4.3-testing test-amd64-amd64-amd64-pvgrub xenbuildjob build-amd64 --- make-flight | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-)
make-flight +15 -2
@@ -31,8 +31,21 @@ flight=`./cs-flight-create $blessing $branch` . ./ap-common . ./mfi-common -defsuite=`getconfig DebianSuite` -defguestsuite=`getconfig GuestDebianSuite` +# Older versions of Xen may not build with the current default. Note +# that branches older than 4.3 might need something even older than +# Wheezy, but we have not done the archaeology to figure out what they +# require. +case "$xenbranch" in + xen-3.*-testing) defsuite="wheezy"; defguestsuite="wheezy";; + xen-4.0-testing) defsuite="wheezy"; defguestsuite="wheezy";; + xen-4.1-testing) defsuite="wheezy"; defguestsuite="wheezy";; + xen-4.2-testing) defsuite="wheezy"; defguestsuite="wheezy";; + xen-4.3-testing) defsuite="wheezy"; defguestsuite="wheezy";; + *) + defsuite=`getconfig DebianSuite` + defguestsuite=`getconfig GuestDebianSuite` + ;; +esac # Pick default Debian Installer version to correspond to the chosen # suite.
Signature · 1 line
2.6.1
Re: [PATCH OSSTEST v2 05/12] mfi-common: Always add debian_suite to debian_runvars
In reply to Ian CampbellIan Campbell writes ("[PATCH OSSTEST v2 05/12] mfi-common: Always add debian_suite to debian_runvars"):
Quoted 6 lines
This adds an explicit
debian_suiteto some jobs which didn't already have one, meaning that those jobs will remain the same when cloned for a bisect and run in a tree where $c{DebianGuestSuite} has changed since the original construction.No expected semantic change.
Re: [PATCH OSSTEST v2 07/12] ts-debian-di-install: Allow Di Version to come from runvars
In reply to Ian CampbellIan Campbell writes ("[PATCH OSSTEST v2 07/12] ts-debian-di-install: Allow Di Version to come from runvars"):
Quoted 2 lines
and following the lead of the suite arrange for a version selected from the defaults to be written back to the runvars.
Re: [PATCH OSSTEST v2 09/12] mfi-common: Set di_version for build & test host install
In reply to Ian CampbellIan Campbell writes ("[PATCH OSSTEST v2 09/12] mfi-common: Set di_version for build & test host install"):
Quoted 2 lines
This means that bisections will use the same version, even if production-config changed in the mean time.
Re: [PATCH OSSTEST v2 12/12] make-flight: Use older Debian for host and guest OS with older Xen
In reply to Ian CampbellIan Campbell writes ("[PATCH OSSTEST v2 12/12] make-flight: Use older Debian for host and guest OS with older Xen"):
Quoted 5 lines
Sometimes when updating osstest to use a newer version of Debian as a baseline we find that the new compiler or other tools pickup latent errors in older code bases for which the fixes are invasive or otherwise inappropriate for a stable branch.
Quoted 8 lines
This is the case with Debian Jessie and Xen 4.3 and earlier, so restrict those branches to keep using Wheezy.
This only applies to xen-X.Y-testing branches and qemu-upstream-X.Y-testing branches since other branch all use xen-unstable as their Xen.
Signed-off-by Ian Campbell <[email protected]>