xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [OSSTEST PATCH 0/6] Fix TftpDiVersion plumbing
@ 2016-03-18 17:09 Ian Jackson
  2016-03-18 17:09 ` [OSSTEST PATCH 1/6] Debian: Provide cfg_tftp_di_version Ian Jackson
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Ian Jackson @ 2016-03-18 17:09 UTC (permalink / raw)
  To: xen-devel

Recent updates to TftpDiVersion_* which were intended to affect only
jessie in fact affect jobs using other suites, because much of the
code still looked simply at TftpDiVersion rather than
TftpDiVersion_<suite>.

This is responsible for the persistent ARM regressions in the
xen-4.3-testing tests.


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [OSSTEST PATCH 1/6] Debian: Provide cfg_tftp_di_version
  2016-03-18 17:09 [OSSTEST PATCH 0/6] Fix TftpDiVersion plumbing Ian Jackson
@ 2016-03-18 17:09 ` Ian Jackson
  2016-03-18 17:09 ` [OSSTEST PATCH 2/6] make-flight: Use getconfig_TftpDiVersion_suite Ian Jackson
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Ian Jackson @ 2016-03-18 17:09 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

And a shell function to do the same thing.

No callers yet.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 Osstest/Debian.pm |    7 +++++++
 cri-getconfig     |    9 +++++++++
 2 files changed, 16 insertions(+)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index d3eff1e..f3c2f63 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -46,6 +46,7 @@ BEGIN {
                       preseed_hook_cmds
                       di_installcmdline_core
                       di_vg_name
+                      cfg_tftp_di_version
                       );
     %EXPORT_TAGS = ( );
 
@@ -1358,6 +1359,12 @@ sub preseed_hook_cmds () {
     return $preseed;
 }
 
+sub cfg_tftp_di_version ($) {
+    my ($suite) = @_;
+    $suite //= 'x def suite'; # will not find $c{...}
+    return $c{"TftpDiVersion_$suite"} // $c{TftpDiVersion};
+}
+
 sub debian_guest_suite ($) {
     my ($gho) = @_;
 
diff --git a/cri-getconfig b/cri-getconfig
index 7b75700..8b76f32 100644
--- a/cri-getconfig
+++ b/cri-getconfig
@@ -25,6 +25,15 @@ getconfig () {
         '
 }
 
+getconfig_TftpDiVersion_suite () {
+	perl -e '
+		use Osstest;
+		use Osstest::Debian;
+		readglobalconfig();
+		print cfg_tftp_di_version($ARGV[0]) or die $!;
+	' "$1"
+}
+
 getrepos() {
 	local repos=`getconfig Repos`
 	if [ -z "$repos" ] ; then
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [OSSTEST PATCH 2/6] make-flight: Use getconfig_TftpDiVersion_suite
  2016-03-18 17:09 [OSSTEST PATCH 0/6] Fix TftpDiVersion plumbing Ian Jackson
  2016-03-18 17:09 ` [OSSTEST PATCH 1/6] Debian: Provide cfg_tftp_di_version Ian Jackson
@ 2016-03-18 17:09 ` Ian Jackson
  2016-03-18 17:09 ` [OSSTEST PATCH 3/6] mg-debian-installer-update: " Ian Jackson
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Ian Jackson @ 2016-03-18 17:09 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 make-flight |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/make-flight b/make-flight
index 8acfcb9..19b42d0 100755
--- a/make-flight
+++ b/make-flight
@@ -49,11 +49,8 @@ esac
 
 # 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`
+    defdi_version=`getconfig_TftpDiVersion_suite $defsuite`
 fi
 
 guest_di_version=$defdi_version
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [OSSTEST PATCH 3/6] mg-debian-installer-update: Use getconfig_TftpDiVersion_suite
  2016-03-18 17:09 [OSSTEST PATCH 0/6] Fix TftpDiVersion plumbing Ian Jackson
  2016-03-18 17:09 ` [OSSTEST PATCH 1/6] Debian: Provide cfg_tftp_di_version Ian Jackson
  2016-03-18 17:09 ` [OSSTEST PATCH 2/6] make-flight: Use getconfig_TftpDiVersion_suite Ian Jackson
@ 2016-03-18 17:09 ` Ian Jackson
  2016-03-18 17:09 ` [OSSTEST PATCH 4/6] mg-debian-installer-update: Print a TftpDiVersion_$suite setting too Ian Jackson
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Ian Jackson @ 2016-03-18 17:09 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

The computed value of the `tftpdiversion' shell variable is used only
to see if it is equal to `current'; if so, we update it.

Whether this is done should depend on the effective TftpDiVersion for
the specific suite, not on the default global.  So use
getconfig_TftpDiVersion_suite.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 mg-debian-installer-update |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mg-debian-installer-update b/mg-debian-installer-update
index 7e3fb20..c969f1e 100755
--- a/mg-debian-installer-update
+++ b/mg-debian-installer-update
@@ -59,7 +59,7 @@ case ${suite}_${arch} in
         ;;
 esac
 
-tftpdiversion=`getconfig TftpDiVersion`
+tftpdiversion=`getconfig_TftpDiVersion_suite $suite`
 dstroot=`getconfig TftpPath`/`getconfig TftpDiBase`/
 date=`date +%Y-%m-%d`
 dst=$arch/$date-$suite
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [OSSTEST PATCH 4/6] mg-debian-installer-update: Print a TftpDiVersion_$suite setting too
  2016-03-18 17:09 [OSSTEST PATCH 0/6] Fix TftpDiVersion plumbing Ian Jackson
                   ` (2 preceding siblings ...)
  2016-03-18 17:09 ` [OSSTEST PATCH 3/6] mg-debian-installer-update: " Ian Jackson
@ 2016-03-18 17:09 ` Ian Jackson
  2016-03-18 17:09 ` [OSSTEST PATCH 5/6] standalone-reset: Use suite-specific TftpDiVersion Ian Jackson
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Ian Jackson @ 2016-03-18 17:09 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

The human running this script might want to update a suite-specific
value, or the global value.  Print an example of the suite-specific
value too.

No functional change other than to example config output.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 mg-debian-installer-update |    1 +
 1 file changed, 1 insertion(+)

diff --git a/mg-debian-installer-update b/mg-debian-installer-update
index c969f1e..0d4f772 100755
--- a/mg-debian-installer-update
+++ b/mg-debian-installer-update
@@ -178,4 +178,5 @@ if [ x$tftpdiversion = xcurrent ]; then
 fi
 
 echo "TftpDiVersion $date"
+echo "TftpDiVersion_$suite $date"
 echo >&2 "downloaded $dstroot/$dst"
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [OSSTEST PATCH 5/6] standalone-reset: Use suite-specific TftpDiVersion
  2016-03-18 17:09 [OSSTEST PATCH 0/6] Fix TftpDiVersion plumbing Ian Jackson
                   ` (3 preceding siblings ...)
  2016-03-18 17:09 ` [OSSTEST PATCH 4/6] mg-debian-installer-update: Print a TftpDiVersion_$suite setting too Ian Jackson
@ 2016-03-18 17:09 ` Ian Jackson
  2016-03-18 17:09 ` [OSSTEST PATCH 6/6] Various: Honour " Ian Jackson
  2016-03-18 18:23 ` [OSSTEST PATCH 7/6] make-flight: Set debianhvm_suite for Debian HVM tests Ian Jackson
  6 siblings, 0 replies; 8+ messages in thread
From: Ian Jackson @ 2016-03-18 17:09 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

If the config specifies a specific d-i version for the suite in use,
it should be honoured.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 standalone-reset |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/standalone-reset b/standalone-reset
index e58ba68..bd34782 100755
--- a/standalone-reset
+++ b/standalone-reset
@@ -97,8 +97,8 @@ else
 	ensure_dir "$tftp$tftptmp"
 
 	dibase=`getconfig TftpDiBase`
-	diver=`getconfig TftpDiVersion`
 	suite=`getconfig DebianSuite`
+	diver=`getconfig_TftpDiVersion_suite $suite`
 	firmware=`getconfig DebianNonfreeFirmware`
 
 	if [ "x$diver" = xcurrent ]; then
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [OSSTEST PATCH 6/6] Various: Honour suite-specific TftpDiVersion
  2016-03-18 17:09 [OSSTEST PATCH 0/6] Fix TftpDiVersion plumbing Ian Jackson
                   ` (4 preceding siblings ...)
  2016-03-18 17:09 ` [OSSTEST PATCH 5/6] standalone-reset: Use suite-specific TftpDiVersion Ian Jackson
@ 2016-03-18 17:09 ` Ian Jackson
  2016-03-18 18:23 ` [OSSTEST PATCH 7/6] make-flight: Set debianhvm_suite for Debian HVM tests Ian Jackson
  6 siblings, 0 replies; 8+ messages in thread
From: Ian Jackson @ 2016-03-18 17:09 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

Replace references to $c{TftpDiVersion} in the general osstest code
with calls to cfg_tftp_di_version.  This means that the suite-specific
d-i version will, in general, be honoured (as is correct).

In preseed_create, we also honour $ho->{DiVersion}.  Often this won't
be set, but it might be (for example, by selecthost finding di_version
runvars).

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 Osstest/Debian.pm      |    5 +++--
 Osstest/TestSupport.pm |    3 ++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index f3c2f63..1e4900b 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -1010,7 +1010,8 @@ sub preseed_create ($$;@) {
     my $suite= $ho->{Suite};
 
     my $d_i= $ho->{Tftp}{Path}.'/'.$ho->{Tftp}{DiBase}.'/'.$r{arch}.'/'.
-	$c{TftpDiVersion}.'-'.$ho->{Suite};
+	($ho->{DiVersion} // cfg_tftp_di_version($ho->{Suite}))
+	.'-'.$ho->{Suite};
 
     preseed_hook_installscript($ho, $sfx,
           '/lib/partman/init.d', '000override-parted-devices', <<END);
@@ -1384,7 +1385,7 @@ sub debian_guest_di_version ($) {
     $gho->{DiVersion} //= guest_var($gho,'di_version',undef);
 
     if (!$gho->{DiVersion}) {
-	$gho->{DiVersion} = $c{TftpDiVersion};
+	$gho->{DiVersion} = cfg_tftp_di_version(debian_guest_suite($gho));
 	store_runvar("$gho->{Guest}_di_version", $gho->{DiVersion});
     }
 
diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 0b3e18a..572d657 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -862,7 +862,8 @@ sub selecthost ($) {
     };
     if (defined $job) {
 	$ho->{Suite} = target_var($ho, "suite") // $c{DebianSuite};
-	$ho->{DiVersion} = target_var($ho, "di_version") // $c{TftpDiVersion};
+	$ho->{DiVersion} = target_var($ho, "di_version")
+	    // cfg_tftp_di_version($ho->{Suite});
     }
 
     #----- handle hosts which are themselves guests (nested) -----
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [OSSTEST PATCH 7/6] make-flight: Set debianhvm_suite for Debian HVM tests
  2016-03-18 17:09 [OSSTEST PATCH 0/6] Fix TftpDiVersion plumbing Ian Jackson
                   ` (5 preceding siblings ...)
  2016-03-18 17:09 ` [OSSTEST PATCH 6/6] Various: Honour " Ian Jackson
@ 2016-03-18 18:23 ` Ian Jackson
  6 siblings, 0 replies; 8+ messages in thread
From: Ian Jackson @ 2016-03-18 18:23 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

do_hvm_debian_test_one uses usual_debianhvm_image which honours the
prevailing value of $guestsuite.  However, it does not provide an
explicit suite setting in the runvars.

As a consequence, the test code will expect the image to install
whatever the default suite is.  If guestsuite is not the default
suite, there is a mismatch.  At the very least, the wrong
suite-specific workarounds will be applied.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 make-flight |    1 +
 1 file changed, 1 insertion(+)

diff --git a/make-flight b/make-flight
index 19b42d0..f324f6a 100755
--- a/make-flight
+++ b/make-flight
@@ -341,6 +341,7 @@ do_hvm_debian_test_one () {
     test-debianhvm $toolstack $xenarch $dom0arch $qemuu_runvar \
     enable_xsm=$xsm                             \
     $stubdom_runvar $testvars                   \
+    debianhvm_suite=$guestsuite			\
     debianhvm_image=$(usual_debianhvm_image $arch) \
     debianhvm_iso_kernel=/$iso_dir/vmlinuz \
     debianhvm_iso_ramdisk=/$iso_dir/initrd.gz \
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-03-18 18:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-18 17:09 [OSSTEST PATCH 0/6] Fix TftpDiVersion plumbing Ian Jackson
2016-03-18 17:09 ` [OSSTEST PATCH 1/6] Debian: Provide cfg_tftp_di_version Ian Jackson
2016-03-18 17:09 ` [OSSTEST PATCH 2/6] make-flight: Use getconfig_TftpDiVersion_suite Ian Jackson
2016-03-18 17:09 ` [OSSTEST PATCH 3/6] mg-debian-installer-update: " Ian Jackson
2016-03-18 17:09 ` [OSSTEST PATCH 4/6] mg-debian-installer-update: Print a TftpDiVersion_$suite setting too Ian Jackson
2016-03-18 17:09 ` [OSSTEST PATCH 5/6] standalone-reset: Use suite-specific TftpDiVersion Ian Jackson
2016-03-18 17:09 ` [OSSTEST PATCH 6/6] Various: Honour " Ian Jackson
2016-03-18 18:23 ` [OSSTEST PATCH 7/6] make-flight: Set debianhvm_suite for Debian HVM tests Ian Jackson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).