Skip to contentSkip to conversation

xen.git#staging smoke tests

PATCH In review Ian Jackson 2 participants 74 messages Sep 16, 2015

lore
Share & tools
lore
#8 lore raw

PATCH 4/27 standalone: Do not blunder on after errors

In reply to Ian Jackson

./standalone's with_logging function would _log_ errors, but it wouldn't exit immediately. As a result, the script would blunder on.

Normally it wouldn't do very much more since most of the with_logging calls are the last thing it does - but the exit status would be wrong (0, from echo).

As a result, for example, standalone-generate-dump-flight-runvars would never properly report make-flight failures.

---
 standalone |    1 +
 1 file changed, 1 insertion(+)
standalone +1 -0
index 873616a..60b6666 100755
@@ -194,6 +194,7 @@ with_logging() {
     rc=${PIPESTATUS[0]}
     if [ $rc -ne 0 ] ; then
 	echo "FAILED rc=${rc}" >&2
+	exit $rc
     fi
 }
 
Signature · 1 line
1.7.10.4
#25 lore raw

PATCH 10/27 ap-fetch-version*: Unwrap xen-unstable lines

In reply to Ian Jackson

Whitespace and \ change only. Makes the next patch a bit clearer.

---
 ap-fetch-version     |    3 +--
 ap-fetch-version-old |    3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)
ap-fetch-version +1 -2
index 8b41acf..488ea55 100755
@@ -40,8 +40,7 @@ xen-3.*)
 	' x
 	;;
 xen-unstable)
-	repo_tree_rev_fetch_git xen \
-		$TREE_XEN staging $LOCALREV_XEN
+	repo_tree_rev_fetch_git xen $TREE_XEN staging $LOCALREV_XEN
 	;;
 xen-4.*-testing)
 	branchcore=${branch#xen-}
ap-fetch-version-old +1 -2
index 0b4739b..7b918e3 100755
@@ -48,8 +48,7 @@ xen-3.*)
 	'
 	;;
 xen-unstable)
-	repo_tree_rev_fetch_git xen \
-		$TREE_XEN master $LOCALREV_XEN
+	repo_tree_rev_fetch_git xen $TREE_XEN master $LOCALREV_XEN
 	;;
 xen-4.*-testing)
 	branchcore=${branch#xen-}
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/27 docs: Document OSSTEST_RESOURCE_PRIORITY values in README.planner

In reply to Ian Jackson
---
 README.planner |    7 +++++++
 1 file changed, 7 insertions(+)
README.planner +7 -0
index 21b3415..dfa623e 100644
@@ -84,6 +84,13 @@ no resources actually get allocated), so that there is a report for
 the administrator showing an idea of what the system thinks may happen
 in the more distant future.
 
+Values for OSSTEST_RESOURCE_PRIORITY:
+  mg-allocate                                    -1000000
+  mg-blockage                                    -2000000
+  default Executive.pm with controlling terminal      -10
+  mg-execute-flight                                    -8
+  default                                               0
+
 
 ms-ownerdaemon and `ownd' tasks
 -------------------------------
Signature · 1 line
1.7.10.4
#27 lore raw

PATCH 11/27 ap-push: Use refs/heads/ for destinations

In reply to Ian Jackson

When the destination is a branch, specify refs/heads/ explicitly. This makes ap-push work even if the ref does not yet exist on the destination.

There is no functional change for an existing installation pushing to an existing branch. But for a hypothetical new installation, this would be necessary.

And, more relevantly, when new "branches" are invented, the use of an existing ap-push case as a template will generate a new case which creates the branch as is necessary.

I leave the more complex osstest case alone. It's not clear to me whether the destination ref not existing is an installation problem of such severity that indeed ap-push should fail.

---
 ap-push |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
ap-push +6 -6
index 5967b42..1dd5b05 100755
@@ -52,14 +52,14 @@ xen-3.*)
 	;;
 xen-unstable)
 	cd $repos/xen
-	git push $TREE_XEN $revision:master
+	git push $TREE_XEN $revision:refs/heads/master
 	;;
 xen-*-testing)
 	cd $repos/xen
 	xenversion=$branch
 	xenversion=${branch%-testing}
 	xenversion=${xenversion#xen-}
-	git push $TREE_XEN $revision:stable-$xenversion
+	git push $TREE_XEN $revision:refs/heads/stable-$xenversion
 	;;
 qemu-mainline)
 	cd $repos/qemu-mainline
@@ -67,11 +67,11 @@ qemu-mainline)
 	;;
 qemu-upstream-*)
 	cd $repos/$branch
-        git push $TREE_QEMU_UPSTREAM $revision:master
+        git push $TREE_QEMU_UPSTREAM $revision:refs/heads/master
         ;;
 linux-3.*)
 	cd $repos/linux
-	git push $TREE_LINUX $revision:tested/$branch
+	git push $TREE_LINUX $revision:refs/heads/tested/$branch
 	;;
 linux-2.6.39)
 	cd $repos/linux
@@ -83,11 +83,11 @@ linux-xen-*)
         ;;
 libvirt)
 	cd $repos/libvirt
-	git push $TREE_LIBVIRT $revision:xen-tested-master
+	git push $TREE_LIBVIRT $revision:refs/heads/xen-tested-master
 	;;
 rumpuserxen)
 	cd $repos/rumpuserxen
-	git push $TREE_RUMPUSERXEN $revision:xen-tested-master
+	git push $TREE_RUMPUSERXEN $revision:refs/heads/xen-tested-master
 	;;
 seabios)
 	cd $repos/seabios
Signature · 1 line
1.7.10.4
#6 lore raw

PATCH 3/27 mg-list-all-branches: Suppress `maintjobs'

In reply to Ian Jackson

This is not a real branch; it's a cron working directory, only.

---
 mg-list-all-branches |    2 ++
 1 file changed, 2 insertions(+)
mg-list-all-branches +2 -0
index 1549f81..87703c7 100755
@@ -16,4 +16,6 @@ foreach my $f (qw(cr-for-branches crontab)) {
     close C or die $!;
 }
 
+delete $branches{maintjobs};
+
 print $_,"\n" or die $! foreach sort { versioncmp($a, $b) } keys %branches;
Signature · 1 line
1.7.10.4
#33 lore raw

PATCH 14/27 cr-ensure-disk-space: Make main loop body into a subroutine

In reply to Ian Jackson

No functional change.

---
 cr-ensure-disk-space |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
cr-ensure-disk-space +9 -2
index 0314e7a..8c5a708 100755
@@ -67,7 +67,7 @@ END
 our @flights;
 our %latestref;
 
-for (;;) {
+sub iteration_continue () {
     open P, "-|", onloghost "df --block-size=1M -P $logdir" or die $!;
     $_= <P>;
     m/^filesystem/i or die "$_ ?";
@@ -76,7 +76,7 @@ for (;;) {
     $!=0; $?=0; close P or die "$! $?";
     my $space= $1;
     printf "space: %8d, wanted: %8d ", $space, logcfg('MinSpaceMby');
-    last if $space >= logcfg('MinSpaceMby');
+    return 0 if $space >= logcfg('MinSpaceMby');
 
     if (!@flights) {
 	%latestref = ();
@@ -141,6 +141,13 @@ for (;;) {
 END
 
     printf "done.\n";
+
+    return 1;
+}
+
+for (;;) {
+    iteration_continue()
+	or last;
 }
 
 printf "ok.\n";
Signature · 1 line
1.7.10.4
#48 lore raw

PATCH 20/27 make-flight: Allow separate specification of pre-built Xen vs others

In reply to Ian Jackson

Make it possible to separately specify
- reuse previous flight's builds of xen.git
- reuse previous flight's builds of all other stuff

Specifically:

* Match the 4th argument to make-flight with case rather than if. If it contains a slash, the first part is for Xen and the second part for everything else.

* Split the variable bfi' into bfi' and `xenbfi'

* Introduce job_create_build_filter_callback, whose initial contents check the recipe (to see what we're building) and then the relevant bfi variable. (NB that this is wrong for historical kernel builds using the xen.git build system, which have recipe=build, but we do not care about that.)

No functional change for existing call patterns.

---
 make-flight |   30 +++++++++++++++++++++++-------
 mfi-common  |    4 ++--
 2 files changed, 25 insertions(+), 9 deletions(-)
make-flight +23 -7
index 00f797e..6db3550 100755
@@ -22,7 +22,7 @@ set -e
 branch=$1
 xenbranch=$2
 blessing=$3
-buildflight=$4
+buildflight=$4 # can be [<xen.git-build-flight>/<general-build-flight>]
 
 flight=`./cs-flight-create $blessing $branch`
 
@@ -35,18 +35,34 @@ defsuite=`getconfig DebianSuite`
 defguestsuite=`getconfig GuestDebianSuite`
 
 job_create_build_filter_callback () {
-    :
-}
+  local job=$1; shift
+  local recipe=$1; shift
 
-if [ x$buildflight = x ]; then
+  local relevant_bfi
 
-  create_build_jobs
+  case "$recipe" in
+    build) relevant_bfi=$xenbfi ;;
+    *)     relevant_bfi=$bfi    ;;
+  esac
+  if [ "x$relevant_bfi" != x ]; then return 1; fi # reusing
 
-else
+  return 0
+}
 
+case "$buildflight" in
+'')
+  ;;
+*/*)
+  bfi=${buildflight#*/}; bfi=$bfi${bfi:+.}
+  xenbfi=${buildflight%%/*}; xenbfi=$xenbfi${xenbfi:+.}
+  ;;
+*)
   bfi=$buildflight.
+  xenbfi=$buildflight. # applies to `buildjob' and `xenbuildjob'
+  ;;
+esac
 
-fi
+create_build_jobs
 
 job_create_test_filter_callback () {
   local job=$1; shift
mfi-common +2 -2
index aaaeac9..af98f2d 100644
@@ -325,8 +325,8 @@ job_create_test () {
   esac
 
   job="$job$xsm_suffix"
-  xenbuildjob="${bfi}build-$xenarch$xsm_suffix"
-  buildjob="${bfi}build-$dom0arch$xsm_suffix"
+  xenbuildjob="${xenbfi}build-$xenarch$xsm_suffix"
+  buildjob="${xenbfi}build-$dom0arch$xsm_suffix"
   tsbuildjob=
 
   case "$xenbranch:$toolstack" in
Signature · 1 line
1.7.10.4
#52 lore raw

PATCH 22/27 make-flight: Run job_create_test_filter_callback on true job name

In reply to Ian Jackson

job_create_test would pass $job to job_create_test_filter_callback but then later maybe append -xsm to it. Fix this.

No functional change for existing in-tree code because all existing tests of the $job end in *.

---
 mfi-common |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
mfi-common +4 -3
index af98f2d..6ffa9e6 100644
@@ -311,8 +311,6 @@ create_build_jobs () {
 }
 
 job_create_test () {
-  job_create_test_filter_callback "$@" || return 0
-
   local job=$1; shift
   local recipe=$1; shift
   local toolstack=$1; shift
@@ -323,8 +321,11 @@ job_create_test () {
   case " $* " in
     *" enable_xsm=true "*) xsm_suffix="-xsm";
   esac
-
   job="$job$xsm_suffix"
+
+  job_create_test_filter_callback \
+    "$job" "$recipe" "$toolstack" "$xenarch" "$dom0arch" "$@" || return 0
+
   xenbuildjob="${xenbfi}build-$xenarch$xsm_suffix"
   buildjob="${xenbfi}build-$dom0arch$xsm_suffix"
   tsbuildjob=
Signature · 1 line
1.7.10.4
#67 lore raw

PATCH 26/27 cri-common: Support xen-unstable-smoke

In reply to Ian Jackson

Add this branch to select_xenbranch. This works like xen-unstable in most respects. We are going to sort out the push gate ref plumbing in xen.git in the next osstest patch.

Also, use a branch-settings file to set its resource priority to -20 to make it run ahead of anything else automatic.

---
 README.planner                     |    1 +
 branch-settings.xen-unstable-smoke |    1 +
 cri-common                         |    1 +
 3 files changed, 3 insertions(+)
 create mode 100644 branch-settings.xen-unstable-smoke
README.planner +1 -0
index dfa623e..3a491a4 100644
@@ -87,6 +87,7 @@ in the more distant future.
 Values for OSSTEST_RESOURCE_PRIORITY:
   mg-allocate                                    -1000000
   mg-blockage                                    -2000000
+  xen-unstable-smoke cr-daily-branch                  -20
   default Executive.pm with controlling terminal      -10
   mg-execute-flight                                    -8
   default                                               0
branch-settings.xen-unstable-smoke new file +1 -0
new file mode 100644
index 0000000..b73bc6a
@@ -0,0 +1 @@
+export OSSTEST_RESOURCE_PRIORITY=-20
cri-common +1 -0
index 94696ab..a31004a 100644
@@ -80,6 +80,7 @@ select_prevxenbranch () {
 
 select_xenbranch () {
 	case "$branch" in
+	xen-unstable-smoke)	tree=xen;	xenbranch=xen-unstable ;;
 	xen-*)			tree=xen;	xenbranch=$branch ;;
 	qemu-mainline)		tree=qemuu;	xenbranch=xen-unstable	qemuubranch=qemu-mainline;;
         qemu-upstream-*)    tree=qemuu; xenbranch=xen-${branch#qemu-upstream-};;
Signature · 1 line
1.7.10.4
#0 lore raw

cover xen.git#staging smoke tests

This is (finally!) my series to provide fast smoke tests of xen-unstable.

The first two thirds of the series shaves a number of yaks I encountered on the way. Many of these (particularly the ones up to patch 11 or so) are generally useful and could perhaps go in before the rest.

One outstanding bikeshed question about naming: I have called the job xen-unstable-smoke' and the output ref xen.git#smoked. I tripped over the presence or absence of the d' a few times. Should one of these two be renamed, and if so which ?

I have verified that this series from
"standalone-generate-dump-flight-runvars: memoise ap-fetch"
onwards generates no unexpected changes to any runvars. The diff -bu (from there to tip) in the output from
OSSTEST_CONFIG=standalone-config-example \
./standalone-generate-dump-flight-runvars
is included below. At the time of running this, xen.git had
340ade2f0ef692efce01a708ad98629af985f978 refs/heads/smoked 26646f34c31f663fa23076ed0433195edec50d9f refs/heads/staging
and the only change to the existing flights' runvars is that xen-unstable's non-prev revision_xen values referring to staging now refer to smoked instead.

after renamed from play-testing.git/before +82 -8
@@ -23100,16 +23100,16 @@
 xen-unstable               build-armhf-xsm                                       revision_seabios                                                                          
 xen-unstable               build-i386                                            revision_seabios                                                                          
 xen-unstable               build-i386-xsm                                        revision_seabios                                                                          
-xen-unstable               build-amd64                                           revision_xen                26646f34c31f663fa23076ed0433195edec50d9f                      
+xen-unstable               build-amd64                                           revision_xen                 340ade2f0ef692efce01a708ad98629af985f978                      
 xen-unstable               build-amd64-prev                                      revision_xen                a7b39c8bd6cba3fe1c8012987b9e28bdbac7e92d                      
-xen-unstable               build-amd64-rumpuserxen                               revision_xen                26646f34c31f663fa23076ed0433195edec50d9f                      
-xen-unstable               build-amd64-xsm                                       revision_xen                26646f34c31f663fa23076ed0433195edec50d9f                      
-xen-unstable               build-armhf                                           revision_xen                26646f34c31f663fa23076ed0433195edec50d9f                      
-xen-unstable               build-armhf-xsm                                       revision_xen                26646f34c31f663fa23076ed0433195edec50d9f                      
-xen-unstable               build-i386                                            revision_xen                26646f34c31f663fa23076ed0433195edec50d9f                      
+xen-unstable               build-amd64-rumpuserxen                               revision_xen                 340ade2f0ef692efce01a708ad98629af985f978                      
+xen-unstable               build-amd64-xsm                                       revision_xen                 340ade2f0ef692efce01a708ad98629af985f978                      
+xen-unstable               build-armhf                                           revision_xen                 340ade2f0ef692efce01a708ad98629af985f978                      
+xen-unstable               build-armhf-xsm                                       revision_xen                 340ade2f0ef692efce01a708ad98629af985f978                      
+xen-unstable               build-i386                                            revision_xen                 340ade2f0ef692efce01a708ad98629af985f978                      
 xen-unstable               build-i386-prev                                       revision_xen                a7b39c8bd6cba3fe1c8012987b9e28bdbac7e92d                      
-xen-unstable               build-i386-rumpuserxen                                revision_xen                26646f34c31f663fa23076ed0433195edec50d9f                      
-xen-unstable               build-i386-xsm                                        revision_xen                26646f34c31f663fa23076ed0433195edec50d9f                      
+xen-unstable               build-i386-rumpuserxen                                revision_xen                 340ade2f0ef692efce01a708ad98629af985f978                      
+xen-unstable               build-i386-xsm                                        revision_xen                 340ade2f0ef692efce01a708ad98629af985f978                      
 xen-unstable               test-amd64-amd64-rumpuserxen-amd64                    rump_builtimage             rumpuserxen:/usr/local/lib/xen/rump-kernel/rump-kernel        
 xen-unstable               test-amd64-i386-rumpuserxen-i386                      rump_builtimage             rumpuserxen:/usr/local/lib/xen/rump-kernel/rump-kernel        
 xen-unstable               test-amd64-amd64-rumpuserxen-amd64                    rump_cmdline                3                                                             
@@ -23365,3 +23365,77 @@
 xen-unstable               test-amd64-i386-rumpuserxen-i386                      xenstorels_builtimage       :/usr/local/bin/xenstore                                      
 xen-unstable               test-amd64-amd64-rumpuserxen-amd64                    xenstorels_cmdline          ls -fp device                                                 
 xen-unstable               test-amd64-i386-rumpuserxen-i386                      xenstorels_cmdline          ls -fp device                                                 
+xen-unstable-smoke         test-amd64-amd64-libvirt                 all_hostflags                 arch-amd64,arch-xen-amd64,suite-wheezy,purpose-test           
+xen-unstable-smoke         test-amd64-amd64-xl-qemuu-debianhvm-i386 all_hostflags                 arch-amd64,arch-xen-amd64,suite-wheezy,purpose-test,hvm       
+xen-unstable-smoke         test-armhf-armhf-xl                      all_hostflags                 arch-armhf,arch-xen-armhf,suite-wheezy,purpose-test           
+xen-unstable-smoke         build-amd64                              arch                          amd64                                                         
+xen-unstable-smoke         build-armhf                              arch                          armhf                                                         
+xen-unstable-smoke         test-amd64-amd64-libvirt                 arch                          amd64                                                         
+xen-unstable-smoke         test-amd64-amd64-xl-qemuu-debianhvm-i386 arch                          amd64                                                         
+xen-unstable-smoke         test-armhf-armhf-xl                      arch                          armhf                                                         
+xen-unstable-smoke         test-amd64-amd64-xl-qemuu-debianhvm-i386 bios                          seabios                                                       
+xen-unstable-smoke         build-amd64                              build_lvextend_max            50                                                            
+xen-unstable-smoke         build-armhf                              build_lvextend_max            50                                                            
+xen-unstable-smoke         test-amd64-amd64-libvirt                 buildjob                      build-amd64                                                   
+xen-unstable-smoke         test-amd64-amd64-xl-qemuu-debianhvm-i386 buildjob                      build-amd64                                                   
+xen-unstable-smoke         test-armhf-armhf-xl                      buildjob                      build-armhf                                                   
+xen-unstable-smoke         test-amd64-amd64-libvirt                 debian_arch                   amd64                                                         
+xen-unstable-smoke         test-armhf-armhf-xl                      debian_arch                   armhf                                                         
+xen-unstable-smoke         test-amd64-amd64-libvirt                 debian_kernkind               pvops                                                         
+xen-unstable-smoke         test-armhf-armhf-xl                      debian_kernkind               pvops                                                         
+xen-unstable-smoke         test-amd64-amd64-xl-qemuu-debianhvm-i386 debianhvm_image               debian-7.2.0-i386-CD-1.iso                                    
+xen-unstable-smoke         test-amd64-amd64-xl-qemuu-debianhvm-i386 device_model_version          qemu-xen                                                      
+xen-unstable-smoke         build-amd64                              enable_ovmf                   true                                                          
+xen-unstable-smoke         build-armhf                              enable_ovmf                   true                                                          
+xen-unstable-smoke         build-amd64                              enable_xend                   false                                                         
+xen-unstable-smoke         build-armhf                              enable_xend                   false                                                         
+xen-unstable-smoke         build-amd64                              enable_xsm                    false                                                         
+xen-unstable-smoke         build-armhf                              enable_xsm                    false                                                         
+xen-unstable-smoke         test-amd64-amd64-libvirt                 enable_xsm                    false                                                         
+xen-unstable-smoke         test-amd64-amd64-xl-qemuu-debianhvm-i386 enable_xsm                    false                                                         
+xen-unstable-smoke         test-armhf-armhf-xl                      enable_xsm                    false                                                         
+xen-unstable-smoke         build-amd64                              host_hostflags                share-build-wheezy-amd64,arch-amd64,suite-wheezy,purpose-build
+xen-unstable-smoke         build-armhf                              host_hostflags                share-build-wheezy-armhf,arch-armhf,suite-wheezy,purpose-build
+xen-unstable-smoke         test-amd64-amd64-libvirt                 kernbuildjob                  build-amd64-pvops                                             
+xen-unstable-smoke         test-amd64-amd64-xl-qemuu-debianhvm-i386 kernbuildjob                  build-amd64-pvops                                             
+xen-unstable-smoke         test-armhf-armhf-xl                      kernbuildjob                  build-armhf-pvops                                             
+xen-unstable-smoke         test-amd64-amd64-libvirt                 kernkind                      pvops                                                         
+xen-unstable-smoke         test-amd64-amd64-xl-qemuu-debianhvm-i386 kernkind                      pvops                                                         
+xen-unstable-smoke         test-armhf-armhf-xl                      kernkind                      pvops                                                         
+xen-unstable-smoke         test-amd64-amd64-libvirt                 libvirtbuildjob               build-amd64-libvirt                                           
+xen-unstable-smoke         build-amd64                              revision_ovmf                                                                               
+xen-unstable-smoke         build-armhf                              revision_ovmf                                                                               
+xen-unstable-smoke         build-amd64                              revision_qemu                                                                               
+xen-unstable-smoke         build-armhf                              revision_qemu                                                                               
+xen-unstable-smoke         build-amd64                              revision_qemuu                b05befcbea71a979509ce04f02929969a790c923                      
+xen-unstable-smoke         build-armhf                              revision_qemuu                b05befcbea71a979509ce04f02929969a790c923                      
+xen-unstable-smoke         build-amd64                              revision_seabios                                                                            
+xen-unstable-smoke         build-armhf                              revision_seabios                                                                            
+xen-unstable-smoke         build-amd64                              revision_xen                  a7b39c8bd6cba3fe1c8012987b9e28bdbac7e92d                      
+xen-unstable-smoke         build-armhf                              revision_xen                  a7b39c8bd6cba3fe1c8012987b9e28bdbac7e92d                      
+xen-unstable-smoke         test-amd64-amd64-libvirt                 toolstack                     libvirt                                                       
+xen-unstable-smoke         test-amd64-amd64-xl-qemuu-debianhvm-i386 toolstack                     xl                                                            
+xen-unstable-smoke         test-armhf-armhf-xl                      toolstack                     xl                                                            
+xen-unstable-smoke         build-amd64                              tree_ovmf                                                                                   
+xen-unstable-smoke         build-armhf                              tree_ovmf                                                                                   
+xen-unstable-smoke         build-amd64                              tree_qemu                     git://xenbits.xen.org/staging/qemu-xen-unstable.git           
+xen-unstable-smoke         build-armhf                              tree_qemu                     git://xenbits.xen.org/staging/qemu-xen-unstable.git           
+xen-unstable-smoke         build-amd64                              tree_qemuu                    git://xenbits.xen.org/staging/qemu-upstream-unstable.git      
+xen-unstable-smoke         build-armhf                              tree_qemuu                    git://xenbits.xen.org/staging/qemu-upstream-unstable.git      
+xen-unstable-smoke         build-amd64                              tree_seabios                                                                                
+xen-unstable-smoke         build-armhf                              tree_seabios                                                                                
+xen-unstable-smoke         build-amd64                              tree_xen                      git://xenbits.xen.org/xen.git                                 
+xen-unstable-smoke         build-armhf                              tree_xen                      git://xenbits.xen.org/xen.git                                 
+xen-unstable-smoke         test-amd64-amd64-libvirt                 xenbuildjob                   build-amd64                                                   
+xen-unstable-smoke         test-amd64-amd64-xl-qemuu-debianhvm-i386 xenbuildjob                   build-amd64                                                   
+xen-unstable-smoke         test-armhf-armhf-xl                      xenbuildjob                   build-armhf                                                   
+xen-unstable-smoke         build-amd64                              hostalloc_bonus_previousfail~ 0                                                             
+xen-unstable-smoke         build-armhf                              hostalloc_bonus_previousfail~ 0                                                             
+xen-unstable-smoke         test-amd64-amd64-libvirt                 hostalloc_bonus_previousfail~ 0                                                             
+xen-unstable-smoke         test-amd64-amd64-xl-qemuu-debianhvm-i386 hostalloc_bonus_previousfail~ 0                                                             
+xen-unstable-smoke         test-armhf-armhf-xl                      hostalloc_bonus_previousfail~ 0                                                             
+xen-unstable-smoke         build-amd64                              hostalloc_maxbonus_variation~ 0                                                             
+xen-unstable-smoke         build-armhf                              hostalloc_maxbonus_variation~ 0                                                             
+xen-unstable-smoke         test-amd64-amd64-libvirt                 hostalloc_maxbonus_variation~ 0                                                             
+xen-unstable-smoke         test-amd64-amd64-xl-qemuu-debianhvm-i386 hostalloc_maxbonus_variation~ 0                                                             
+xen-unstable-smoke         test-armhf-armhf-xl                      hostalloc_maxbonus_variation~ 0                                                             
#3 lore raw

PATCH 2/27 Executive: cs-job-create: Check that OSSTEST_FLIGHT is not set

If OSSTEST_FLIGHT is set on entry to JobDB::Executive::flight_create, fail. This obviously represents some kind of mistake.

One effect is that standalone-generate-dump-flight-runvars won't fill an Executive database with test flights.

---
 Osstest/JobDB/Executive.pm |    2 ++
 1 file changed, 2 insertions(+)
Osstest/JobDB/Executive.pm +2 -0
index cc52f57..6ba3d37 100644
@@ -89,6 +89,8 @@ END
 
 sub flight_create ($$$) { #method
     my ($jd,$intended,$branch) = @_;
+    die "OSSTEST_FLIGHT set on entry to JobDB::Executive::flight_create\n"
+	if $ENV{'OSSTEST_FLIGHT'};
     $dbh_tests->do(<<END, {}, $branch, $intended);
              INSERT INTO flights
                          (flight,  started, blessing,       branch, intended)
Signature · 1 line
1.7.10.4
#14 lore raw

PATCH 7/27 memoise: New utility

In reply to Ian Jackson

Give this a GPLv2+ licence so that we can move it into some other FLOSS package later.

---
 memoise |   56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100755 memoise
memoise new file +56 -0
new file mode 100755
index 0000000..ff999d5
@@ -0,0 +1,56 @@
+#!/bin/sh
+#
+# memoise - a command line output memoisation tool
+#
+# usage:
+#    memoise datadir cmd arg arg ...
+#
+# will create datadir if necessary; delete datadir when you're done
+#
+#    Copyright 2015 Citrix Inc.
+#
+#    This file is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License along
+#    with this program; if not, write to the Free Software Foundation, Inc.,
+#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+#    NB that the rest of osstest is AGPLv3+, so when this file is
+#    distributed together with osstest, the AGPLv3 applies.
+
+set -e
+
+case "$#.$1" in
+[01].)	echo >&2 "memoise: too few args"; exit 127 ;;
+*.-)	echo >&2 "memoise: unknown option $1"; exit 127 ;;
+esac
+
+datadir=$1; shift
+
+mkdir -p -- "$datadir"
+
+id=`for arg in "$@"; do printf '%s\0' "$arg"; done | sha256sum`
+id=${id%  -}
+
+f="$datadir/$id"
+
+if ! [ -f "$f.o" ]; then
+	with-lock-ex -w "$f.l" sh -ec '
+		f=$1; shift
+		if [ -f "$f.o" ]; then exit 0; fi
+		exec </dev/null >"$f.t"
+		"$@"
+		mv -- "$f.t" "$f.o"
+		rm "$f.l"
+	' x "$f" "$@"
+fi
+
+cat -- "$f.o"
Signature · 1 line
1.7.10.4
#20 lore raw

PATCH 8/27 standalone-generate-dump-flight-runvars: memoise ap-fetch

In reply to Ian Jackson

This makes it _much_ faster.

Also you can say AP_FETCH_MEMO_KEEP=1 to make it reuse old information, which is useful for making comparisons.

For a further speed improvement, use eatmydata'. This is not the default because it risks corruption of standalone.db' which is used for other purposes too. Add a comment about possibly improving this.

---
 standalone-generate-dump-flight-runvars |   11 +++++++++++
 1 file changed, 11 insertions(+)
standalone-generate-dump-flight-runvars +11 -0
index 4405720..ed94792 100755
@@ -36,6 +36,17 @@ if [ $# = 0 ]; then
    set `./mg-list-all-branches`
 fi
 
+if [ "x$AP_FETCH_MEMO_KEEP" = x ]; then
+	rm -rf tmp/apmemo
+	mkdir tmp/apmemo
+fi
+export AP_FETCH_PFX='./memoise tmp/apmemo'
+
+# In the future it might be nice for this script to arrange to use a
+# separate standalone.db, in tmp/ probably, for each different branch.
+# That would avoid a lot of needless write contention over the single
+# db, and make it possible to use `eatmydata' if it is installed.
+
 perbranch () {
     log=tmp/make-flight.$branch.log
     flight=check_${branch//[-._]/_}
Signature · 1 line
1.7.10.4
#29 lore raw

PATCH 12/27 cr-ensure-disk-space: Honour -D

In reply to Ian Jackson

Provide DEBUG and use db_prepare. For now that is the only debugging output.

---
 cr-ensure-disk-space |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
cr-ensure-disk-space +5 -1
index 304f262..ced9777 100755
@@ -27,11 +27,15 @@ use Fcntl qw(:flock);
 
 our $dryrun= 0;
 
+open DEBUG, ">/dev/null" or die $!;
+
 while (@ARGV && $ARGV[0] =~ m/^\-/) {
     $_= shift @ARGV;
     last if $_ eq '--';
     if (m/^-n$/) {
         $dryrun= 1;
+    } elsif (m/^-D$/) {
+        open DEBUG, ">&2" or die $!;
     } else {
 	die "$_ ?";
     }
@@ -50,7 +54,7 @@ flock LOCK, LOCK_EX or die $!;
 
 $|=1;
 
-my $chkq= $dbh_tests->prepare("SELECT * FROM flights WHERE flight=?");
+my $chkq= db_prepare("SELECT * FROM flights WHERE flight=?");
 our @flights;
 
 for (;;) {
Signature · 1 line
1.7.10.4
#41 lore raw

PATCH 17/27 mg-show-flight-runvars: Decorate synth runvar names with ~

In reply to Ian Jackson

Make mg-show-flight-runvars -a append ~ to the names of synth runvars. (This is consistent with the new syntax in cs-job-create.)

We do this by editing $row->[1] (and $colws[1]) so we can avoid disturbing the general column format calcuation and printing; this means we have to copy $row (because the value in the DB $row is readonly).

We have to check for $synth eq 'f' as well as $synth being boolean false, because SQLite's typeless nature (or, to put it another way, DBD::SQLite's failure to look at the schema) means that a boolean field's value of 'f' or 't' is simply returned as a string to Perl. But of course "f" is trueish in Perl.

---
 mg-show-flight-runvars |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
mg-show-flight-runvars +8 -2
index 62d5cba..aa4cc25 100755
@@ -26,6 +26,7 @@ use Osstest;
 csreadconfig();
 
 my $synthcond = '(NOT synth)';
+my $synthsufx = '';
 
 for (;;) {
     last unless @ARGV;
@@ -33,7 +34,7 @@ for (;;) {
     $_ = shift @ARGV;
     last if m/^\-\-?$/;
     if (m/^-a$/) {
-	$synthcond = 'TRUE';
+	$synthsufx = '~';
     } else {
 	die "$_ ?";
     }
@@ -52,10 +53,15 @@ my @colws = $dbh_tests->selectrow_array
     ("SELECT ".(join ',', map { "max(length($_))" } @cols)." $qfrom");
 
 my $q = $dbh_tests->prepare
-    ("SELECT ".(join ',', @cols)." $qfrom ORDER BY name, job");
+    ("SELECT synth, ".(join ',', @cols)." $qfrom ORDER BY synth, name, job");
 $q->execute();
 
+$colws[1] += length $synthsufx;
+
 while (my $row = $q->fetchrow_arrayref()) {
+    $row = [ @$row ];
+    my $synth = shift @$row;
+    $row->[1] .= $synthsufx if $synth && $synth ne 'f'; # sqlite3 is typeless
     printf "%-*s %-*s %-*s\n", map { $colws[$_], $row->[$_] } qw(0 1 2)
         or die $!;
 }
Signature · 1 line
1.7.10.4
#31 lore raw

PATCH 13/27 cr-ensure-disk-space: Look at referring flights

In reply to Ian Jackson

Previously the flight to delete was simply the one with the lowest flight number. Now we sort flights not by their own flight number, but by the highest flight number of any referencing flight.

This means that flights whose builds are being reused are kept as long as the reusing flights.

This almost-entirely fixes a largely-theoretical race in the way cs-bisection-step works (where the flight's logs and build outputs might be deleted between the setup and execution of the referring flight).

A smaller race still exists because the stash check in cs-bisection-step occurs before the being-created flight is visible to other db clients. We will have to fix this by taking the flights lock.

---
 cr-ensure-disk-space |   43 ++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 38 insertions(+), 5 deletions(-)
cr-ensure-disk-space +38 -5
index ced9777..0314e7a 100755
@@ -55,7 +55,17 @@ flock LOCK, LOCK_EX or die $!;
 $|=1;
 
 my $chkq= db_prepare("SELECT * FROM flights WHERE flight=?");
+
+my $refq= db_prepare(<<END);
+    SELECT flight, val
+      FROM runvars
+     WHERE name like '%job'
+       AND val like '%.%'
+       AND flight >= ?
+END
+
 our @flights;
+our %latestref;
 
 for (;;) {
     open P, "-|", onloghost "df --block-size=1M -P $logdir" or die $!;
@@ -69,23 +79,46 @@ for (;;) {
     last if $space >= logcfg('MinSpaceMby');
 
     if (!@flights) {
+	%latestref = ();
 	open P, "-|", onloghost "ls -1 $logdir" or die $!;
+
+	my $minflight = undef;
 	while (<P>) {
 	    next unless m/^(\d+)\n$/;
-	    push @flights, $1;
+	    $latestref{$1} = $1;
+	    $minflight //= $1;
+	    $minflight = $1 if $1 < $minflight;
 	}
 	$!=$?=0; close P or die "ls: $? $!";
-	@flights = sort { $b <=> $a } @flights;
+
+	print DEBUG "MINFLIGHT $minflight\n";
+
+	$refq->execute($minflight);
+	while (my $rr= $refq->fetchrow_hashref) {
+	    my $testflight = $rr->{flight};
+	    next unless $rr->{val} =~ m/^(\d+)\./;
+	    my $buildflight = $1;
+	    next unless exists $latestref{$buildflight};
+	    if ($testflight > $latestref{$buildflight}) {
+		print DEBUG "REF $buildflight <- $testflight\n";
+		$latestref{$buildflight} = $testflight;
+	    }
+	}
+
+	@flights =
+	    sort { $latestref{$b} <=> $latestref{$a} }
+	    keys %latestref;
         printf "(%d flights) ", scalar @flights;
         die unless @flights;
     }
     my $flight = pop @flights;
-    printf "selected %s ", $flight;
+    my $latestref = $latestref{$flight};
+    printf "selected %s (latest ref %s) ", $flight, $latestref;
 
-    $chkq->execute($flight);
+    $chkq->execute($latestref);
     my $row= $chkq->fetchrow_hashref();
     $chkq->finish();
-    die $flight unless defined $row;
+    die "$flight $latestref" unless defined $row;
     my $age= time - $row->{started};
 
     printf "(age %dd) ", $age / 86400;
Signature · 1 line
1.7.10.4
#35 lore raw

PATCH 15/27 cr-ensure-disk-space: Take the flights db lock

In reply to Ian Jackson

This eliminates the race with cs-bisection-step (and other flight-construction tools which might reuse previous flights, provided that they also do not pass previous flight numbers from hand to hand with the db unlocked).

---
 cr-ensure-disk-space |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
cr-ensure-disk-space +7 -4
index 8c5a708..138f3f4 100755
@@ -145,10 +145,13 @@ END
     return 1;
 }
 
-for (;;) {
-    iteration_continue()
-	or last;
-}
+db_retry($dbh_tests,[qw(flights)], sub {
+    @flights = ();
+    for (;;) {
+	iteration_continue()
+	    or last;
+    }
+});
 
 printf "ok.\n";
 exit 0;
Signature · 1 line
1.7.10.4
#44 lore raw

PATCH 18/27 standalone-generate-dump-flight-runvars: Show synth runvars

In reply to Ian Jackson

Pass -a to mg-show-flight-runvars. That way when we use the new cs-job-create feature to set synth runvars during creation, we will see them in the dump.

---
 standalone-generate-dump-flight-runvars |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
standalone-generate-dump-flight-runvars +1 -1
index ed94792..da3c0f8 100755
@@ -76,5 +76,5 @@ done
 
 for proc in $procs; do
     perproc
-    ./mg-show-flight-runvars $flight | sed "s/^/`printf '%-26s ' $branch`/"
+    ./mg-show-flight-runvars -a $flight | sed "s/^/`printf '%-26s ' $branch`/"
 done
Signature · 1 line
1.7.10.4
#10 lore raw

PATCH 5/27 standalone: Set very long SQLite3 busy timeout in Perl

In reply to Ian Jackson

Without this, big standalone-generate-dump-flight-runvars jobs may trying to serialise so much work that SQLite3 times out. And we are about to introduce an optimisation which makes this much more likely.

In standalone mode we probably don't care much about this timeout at all. (It might even be that the user is using sqlite(3) and has effectively locked the database interactively for an extended period.)

We would prefer to rely on the user to stop anything that seems to have become stuck. So set the timeout to 10ks.

---
 Osstest/JobDB/Standalone.pm |    3 +++
 1 file changed, 3 insertions(+)
Osstest/JobDB/Standalone.pm +3 -0
index 45ec9ca..431ba5a 100644
@@ -52,6 +52,9 @@ sub open ($) {
         ShowErrorStatement => 1,
         })
         or die "could not open standalone db $dbi";
+
+    $dbh->sqlite_busy_timeout(10E6); # 10ks
+
     return $dbh;
 }
 
Signature · 1 line
1.7.10.4
#46 lore raw

PATCH 19/27 ts-host-alloc-Executive: Honour various hostalloc_* runvars

In reply to Ian Jackson

We honour
hostalloc_maxbonus_variation
hostalloc_bonus_previousfail
hostalloc_bonus_sharereuse
and make them default to their previous values.

---
 ts-hosts-allocate-Executive |   13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
ts-hosts-allocate-Executive +9 -4
index 781ddaf..eafcce2 100755
@@ -541,14 +541,19 @@ sub hid_recurse ($$) {
 
     my $log_variation_age = log(1+$variation_age/86400);
     my $variation_bonus = $log_variation_age * 3600*2;
-    my $max_variation_bonus = 12*3600;
+    my $max_variation_bonus = $r{hostalloc_maxbonus_variation} // 12*3600;
     $variation_bonus=$max_variation_bonus
 	if $variation_bonus>$max_variation_bonus;
 
+    my $prevfail_bonus = $r{hostalloc_bonus_previousfail} // 7.0*86400;
+    my $prevfail_equiv_bonus = $prevfail_bonus * (6.5 / 7.0);
+
+    my $share_reuse_bonus = $r{hostalloc_bonus_sharereuse} // 10000;
+
     my $cost= $start_time
 	+ $duration_for_cost
-        - ($previously_failed      ==@hids ?   7*86400 :
-	   $previously_failed_equiv==@hids ? 6.5*86400 :
+        - ($previously_failed      ==@hids ? $prevfail_bonus       :
+	   $previously_failed_equiv==@hids ? $prevfail_equiv_bonus :
 	   # We wait 7d extra to try a failing test on the same
 	   # hardware, or 6.5d on `equivalent' hardware (as defined by
 	   # equiv-* flags).  Compared to `equivalent' hardware, we
@@ -556,7 +561,7 @@ sub hid_recurse ($$) {
 	   0)
         + ($previously_failed || $previously_failed_equiv
 	   ? (-$max_variation_bonus+$variation_bonus) : -$variation_bonus)
-	- $share_reuse * 10000;
+	- $share_reuse * $share_reuse_bonus;
     
     print DEBUG "$dbg FINAL start=$start_time va=$variation_age".
 	" variation_bonus=$variation_bonus".
Signature · 1 line
1.7.10.4
#50 lore raw

PATCH 21/27 make-flight: Contemplate varying architecture for Debian HVM

In reply to Ian Jackson

In the Debian hvm tests, ask branch_debianhvm_arch for the architecture to use. This currently prints only amd64.

While we are here, provide some comments about the (somewhat confusing) argument conventions of do_hvm_debian_test_one.

No functional change yet.

---
 make-flight |   16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)
make-flight +12 -4
index 6db3550..2246411 100755
@@ -236,12 +236,20 @@ do_hvm_win7_x64_tests () {
             all_hostflags=$most_hostflags,hvm
 }
 
+branch_debianhvm_arch () {
+  case $branch in
+    *) echo amd64;;
+  esac
+}
+
 do_hvm_debian_test_one () {
   testname=$1
   toolstack=$2
   bios=$3
-  xsm=$4
-  stubdom=$5
+  xsm=$4 # 'false' or 'true'
+  stubdom=$5 # '' (or unset) or 'true'
+
+  local arch=$(branch_debianhvm_arch)
 
   stubdom_suffix=""
   stubdom_runvar=""
@@ -250,11 +258,11 @@ do_hvm_debian_test_one () {
       stubdom_runvar="debianhvm_stubdom=$stubdom"
   fi
 
-  job_create_test test-$xenarch$kern-$dom0arch-$toolstack$qemuu_suffix$stubdom_suffix-$testname-amd64\
+  job_create_test test-$xenarch$kern-$dom0arch-$toolstack$qemuu_suffix$stubdom_suffix-$testname-$arch\
     test-debianhvm $toolstack $xenarch $dom0arch $qemuu_runvar \
     enable_xsm=$xsm                             \
     $stubdom_runvar                             \
-    debianhvm_image=debian-7.2.0-amd64-CD-1.iso \
+    debianhvm_image=debian-7.2.0-$arch-CD-1.iso \
     bios=$bios \
     all_hostflags=$most_hostflags,hvm
 }
Signature · 1 line
1.7.10.4
#23 lore raw

PATCH 9/27 mfi-common: Use job_create_build for build-*-prev

In reply to Ian Jackson

This causes it to call job_create_build_filter_callback but has no ultimate functional change.

---
 mfi-common |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mfi-common +1 -1
index 991baf5..aaaeac9 100644
@@ -216,7 +216,7 @@ create_build_jobs () {
         # only pass tree_xen and revision_xen here and therefore
         # pickup the versions implicitly selected by the
         # $REVISION_PREVXEN.
-        ./cs-job-create $flight build-$arch-prev build                       \
+        job_create_build build-$arch-prev build                       \
                     arch=$arch enable_xend=false enable_ovmf=$enable_ovmf    \
                     enable_xsm=false                                         \
             tree_xen=$TREE_XEN                                               \
Signature · 1 line
1.7.10.4
#54 lore raw

PATCH 23/27 make-flight: Provide xen-unstable-smoke branch

In reply to Ian Jackson

This contains a very limited set of jobs:

    build-amd64
    build-armhf
    test-amd64-amd64-libvirt
    test-amd64-amd64-xl-qemuu-debianhvm-i386
    test-armhf-armhf-xl

The debianhvm job exists only in this flight, and is generated by having branch_debianhvm_arch return i386 instead of amd64.

We override host allocator parameters to make this flight not care about host stickiness: it just takes whatever comes to hand.

Deployment note: This requires images/debian-7.2.0-i386-CD-1.iso which I have already downloaded to the Cambridge instance using jigdo.

---
 make-flight |   26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
make-flight +26 -0
index 2246411..09f3304 100755
@@ -46,6 +46,16 @@ job_create_build_filter_callback () {
   esac
   if [ "x$relevant_bfi" != x ]; then return 1; fi # reusing
 
+  case "$branch" in
+    xen-unstable-smoke)
+      case "$job" in
+        build-amd64) ;;
+        build-armhf) ;;
+        *)           return 1;;
+      esac
+    ;;
+  esac
+
   return 0
 }
 
@@ -62,6 +72,13 @@ case "$buildflight" in
   ;;
 esac
 
+case "$branch" in
+xen-unstable-smoke)
+	global_runvars+=" hostalloc_maxbonus_variation~=0 "
+	global_runvars+=" hostalloc_bonus_previousfail~=0 "
+        ;;
+esac
+
 create_build_jobs
 
 job_create_test_filter_callback () {
@@ -72,6 +89,14 @@ job_create_test_filter_callback () {
   local dom0arch=$1; shift
 
   case "$branch" in
+    xen-unstable-smoke)
+      case "$job" in
+        test-amd64-amd64-libvirt)                  return 0 ;;
+        test-armhf-armhf-xl)                       return 0 ;;
+        test-amd64-amd64-xl-qemuu-debianhvm-i386)  return 0 ;;
+        *)                                         return 1 ;;
+      esac
+      ;;
     qemu-upstream-4.2-testing)
       case " $* " in
         *" device_model_version=qemu-xen "*)
@@ -238,6 +263,7 @@ do_hvm_win7_x64_tests () {
 
 branch_debianhvm_arch () {
   case $branch in
+    xen-unstable-smoke) echo i386;;
     *) echo amd64;;
   esac
 }
Signature · 1 line
1.7.10.4
#62 lore raw

PATCH 24/27 make-flight: mfi-common: Honour $global_runvars

In reply to Ian Jackson

Provide a way for the main script to set some runvars on all jobs. We expect this to be mostly set with +=.

---
 mfi-common |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
mfi-common +2 -2
index 6ffa9e6..1ef4f26 100644
@@ -69,7 +69,7 @@ job_create_build () {
   local job=$1; shift
   local recipe=$1; shift
 
-  ./cs-job-create $flight $job $recipe "$@"
+  ./cs-job-create $flight $job $recipe $global_runvars "$@"
 }
 
 create_build_jobs () {
@@ -344,7 +344,7 @@ job_create_test () {
   esac
 
   ./cs-job-create $flight $job $recipe toolstack=$toolstack       \
-    $RUNVARS $TEST_RUNVARS $most_runvars                          \
+    $RUNVARS $TEST_RUNVARS $global_runvars $most_runvars          \
     xenbuildjob=$xenbuildjob buildjob=$buildjob $tsbuildjob "$@"
 }
 
Signature · 1 line
1.7.10.4
#65 lore raw

PATCH 25/27 ap-*: Be able to fetch and push xen.git#smoked

In reply to Ian Jackson

The branches and push gates are now:
xen.git#staging -[xen-unstable-smoke]-> #smoked -[xen-unstable]-> #master

Deployment note: When this passes the osstest self-push-gate, the main xen-unstable flight will start using smoked as an input. Therefore, until the new cronjob is installed to run the xen-unstable-smoke tests, an automatic process should keep xen.git#smoked up to date with xen.git#staging. Eg, running in screen in xen@xenbits:~/git/xen.git:
while sleep 1800; do git fetch . staging:smoked; done

---
 ap-fetch-version     |    3 +++
 ap-fetch-version-old |    3 +++
 ap-push              |    4 ++++
 3 files changed, 10 insertions(+)
ap-fetch-version +3 -0
index 488ea55..a239968 100755
@@ -40,6 +40,9 @@ xen-3.*)
 	' x
 	;;
 xen-unstable)
+	repo_tree_rev_fetch_git xen $TREE_XEN smoked $LOCALREV_XEN
+	;;
+xen-unstable-smoke)
 	repo_tree_rev_fetch_git xen $TREE_XEN staging $LOCALREV_XEN
 	;;
 xen-4.*-testing)
ap-fetch-version-old +3 -0
index 7b918e3..b1e2cd9 100755
@@ -50,6 +50,9 @@ xen-3.*)
 xen-unstable)
 	repo_tree_rev_fetch_git xen $TREE_XEN master $LOCALREV_XEN
 	;;
+xen-unstable-smoke)
+	repo_tree_rev_fetch_git xen $TREE_XEN smoked $LOCALREV_XEN
+	;;
 xen-4.*-testing)
 	branchcore=${branch#xen-}
 	branchcore=${branchcore%-testing}
ap-push +4 -0
index 1dd5b05..bcb2f51 100755
@@ -54,6 +54,10 @@ xen-unstable)
 	cd $repos/xen
 	git push $TREE_XEN $revision:refs/heads/master
 	;;
+xen-unstable-smoke)
+	cd $repos/xen
+	git push $TREE_XEN $revision:refs/heads/smoked
+	;;
 xen-*-testing)
 	cd $repos/xen
 	xenversion=$branch
Signature · 1 line
1.7.10.4
#37 lore raw

PATCH 16/27 cs-job-create: Permit creation of `synth' runvars

In reply to Ian Jackson

This will be useful if we want to set hostalloc_* runvars. Normally we would want to set those only on flights generated by make-flight.

Flights generated by cs-bisection-step or cs-adjust-flight ought not to copy them, because cs-bisection-step makes its own arrangements for host specification, as should the caller of cs-adjust-flight (perhaps via the blessing system).

Using `synth' for this is arguably slightly wrong but it does the right thing in all existing cases. The alternative would be a schema change.

---
 cs-job-create |   16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)
cs-job-create +11 -5
index df2738c..9812bf2 100755
@@ -2,6 +2,11 @@
 #
 # args:
 #   <flight> <job> <recipe> <runvar>=<value> ...
+#
+# If <runvar> ends in ~, the ~ is stripped and the runvar is marked
+# `synth'.  (Normally runvars marked `synth' are defined during test
+# execution.  They are not taken as part of the runvar set copied
+# when cloning flights, eg for bisection.)
 
 # This is part of "osstest", an automated testing framework for Xen.
 # Copyright (C) 2009-2013 Citrix Inc.
@@ -47,9 +52,9 @@ foreach my $rv (@runvars) {
         $suppress{$1}= 1;
         next;
     }
-    $rv =~ m/^([a-z][0-9a-z_]*)\=(.*)$/ or die "$rv ?";
-    my ($name,$val) = ($1,$2);
-    $runvars{$name}= $val;
+    $rv =~ m/^([a-z][0-9a-z_]*)(\~?)\=(.*)$/ or die "$rv ?";
+    my ($name,$synth,$val) = ($1,$2,$3);
+    $runvars{$name}= [$val,$synth];
 }
 
 foreach my $name (keys %suppress) {
@@ -61,9 +66,10 @@ db_retry($flight,'constructing', $dbh_tests,[qw(flights)], sub {
         INSERT INTO jobs VALUES (?,'$job','$recipe','queued')
 END
     my $q= $dbh_tests->
-        prepare("INSERT INTO runvars VALUES (?,'$job',?,?,'f')");
+        prepare("INSERT INTO runvars VALUES (?,'$job',?,?,?)");
     foreach my $name (keys %runvars) {
-        $q->execute($flight, $name, $runvars{$name});
+        $q->execute($flight, $name, $runvars{$name}[0],
+	            $runvars{$name}[1] ? 't' : 'f');
         $q->finish();
     }
 });
Signature · 1 line
1.7.10.4
#69 lore raw

PATCH 27/27 crontab: Enable xen-unstable-smoke branch every 3h at <1mod3>:51 UTC

In reply to Ian Jackson
---
 crontab |    1 +
 1 file changed, 1 insertion(+)
crontab +1 -0
index 436645b..b9d4ad1 100644
@@ -2,6 +2,7 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 [email protected],[email protected]
 # m		h	dom mon dow	command
 49		1	* * *		cd testing.git && BRANCHES_ALWAYS=xen-unstable	./cr-for-branches branches -w "./cr-daily-branch --real"
+51		1-23/3	* * *		cd testing.git && BRANCHES=xen-unstable-smoke	./cr-for-branches branches -w "./cr-daily-branch --real"
 4-59/30		*	* * *		cd testing.git &&				./cr-for-branches branches -q "./cr-daily-branch --real"
 18		9	* * 1,3,5	cd testing.git && BRANCHES=linux-next		./cr-for-branches branches -w "./cr-daily-branch --real"
 18		4	* * *		cd testing.git && BRANCHES='linux-linus linux-mingo-tip-master linux-3.0 libvirt rumpuserxen' ./cr-for-branches branches -w "./cr-daily-branch --real"
Signature · 1 line
1.7.10.4
#12 lore raw

PATCH 6/27 cr-daily-branch: Honour AP_FETCH_PFX

In reply to Ian Jackson

This environment variable is prefixed to all cr-daily-branch's command lines involving ap-fetch. We are going to use this for memoisation.

---
 cr-daily-branch |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
cr-daily-branch +7 -5
index ade515d..9500bdc 100755
@@ -51,12 +51,12 @@ determine_version () {
                 if [ "x$FORCE_REVISION" != x ]; then
                         tversion="$FORCE_REVISION"
                 else
-        		tversion=`./ap-fetch-version "$tbranch"`
+			tversion=`$AP_FETCH_PFX ./ap-fetch-version "$tbranch"`
                 fi
 		determine_tree "$treevarwhich" "" _${treevarwhich}
 		determine_tree "$treevarwhich" "" _${treevarwhich}_THIS
 	else
-		tversion=`./ap-fetch-version-baseline "$tbranch"`
+		tversion=`$AP_FETCH_PFX ./ap-fetch-version-baseline "$tbranch"`
 		determine_tree "$treevarwhich" BASE_ _${treevarwhich}
 		determine_tree "$treevarwhich" BASE_ _${treevarwhich}_THIS
 	fi
@@ -98,7 +98,7 @@ if [ "x$OLD_REVISION" = x ]; then
 		# last test will have tested the previous upstream baseline
 		OLD_REVISION=`check_tested --print-revision=$tree`
 	    else
-		OLD_REVISION="`./ap-fetch-version-old $branch`"
+		OLD_REVISION="`$AP_FETCH_PFX ./ap-fetch-version-old $branch`"
 	    fi
 	    ;;
     esac
@@ -131,7 +131,8 @@ if [ "x$REVISION_XEN" = x ]; then
         export REVISION_XEN
 fi
 if [ "x$REVISION_PREVXEN" = x -a "x$prevxenbranch" != "x" ]; then
-	REVISION_PREVXEN="`./ap-fetch-version-baseline $prevxenbranch`"
+	REVISION_PREVXEN="`\
+		$AP_FETCH_PFX ./ap-fetch-version-baseline $prevxenbranch`"
 	export REVISION_PREVXEN
 fi
 if [ "x$REVISION_QEMU_UPSTREAM" = x ]; then
@@ -252,7 +253,8 @@ ovmf)
 esac
 
 if [ "x$OLD_REVISION" = xdetermine-late ]; then
-	OLD_REVISION="`./ap-fetch-version-baseline-late $branch $NEW_REVISION`"
+	OLD_REVISION="`\
+ $AP_FETCH_PFX ./ap-fetch-version-baseline-late $branch $NEW_REVISION`"
 fi
 
 case $branch in
Signature · 1 line
1.7.10.4
Acked-by on v1 2/27
#4 lore raw

Re: [OSSTEST PATCH 02/27] Executive: cs-job-create: Check that OSSTEST_FLIGHT is not set

In reply to Ian Jackson
Quoted 5 lines · Ian Jackson

If OSSTEST_FLIGHT is set on entry to JobDB::Executive::flight_create, fail. This obviously represents some kind of mistake.

One effect is that standalone-generate-dump-flight-runvars won't fill an Executive database with test flights.

Speaking from experience there?

Quoted 1 line
Quoted 19 lines
---
 Osstest/JobDB/Executive.pm |    2 ++
 1 file changed, 2 insertions(+)
Osstest/JobDB/Executive.pm +1 -0
index cc52f57..6ba3d37 100644
@@ -89,6 +89,8 @@ END
 
 sub flight_create ($$$) { #method
     my ($jd,$intended,$branch) = @_;
+    die "OSSTEST_FLIGHT set on entry to

JobDB::Executive::flight_create\n"

Osstest/JobDB/Executive.pm +1 -0
+	if $ENV{'OSSTEST_FLIGHT'};
     $dbh_tests->do(<<END, {}, $branch, $intended);
              INSERT INTO flights
                          (flight,  started, blessing,       branch,

intended)

Acked-by on v1 4/27
#9 lore raw

Re: [OSSTEST PATCH 04/27] standalone: Do not blunder on after errors

In reply to Ian Jackson
Quoted 11 lines · Ian Jackson

./standalone's with_logging function would _log_ errors, but it wouldn't exit immediately. As a result, the script would blunder on.

Normally it wouldn't do very much more since most of the with_logging calls are the last thing it does - but the exit status would be wrong (0, from echo).

As a result, for example, standalone-generate-dump-flight-runvars would never properly report make-flight failures.

Quoted 16 lines
---
 standalone |    1 +
 1 file changed, 1 insertion(+)
standalone +1 -0
index 873616a..60b6666 100755
@@ -194,6 +194,7 @@ with_logging() {
     rc=${PIPESTATUS[0]}
     if [ $rc -ne 0 ] ; then
 	echo "FAILED rc=${rc}" >&2
+	exit $rc
     fi
 }
 
Acked-by on v1 5/27
#11 lore raw

Re: [OSSTEST PATCH 05/27] standalone: Set very long SQLite3 busy timeout in Perl

In reply to Ian Jackson
Quoted 4 lines · Ian Jackson

Without this, big standalone-generate-dump-flight-runvars jobs may trying to serialise so much work that SQLite3 times out. And we are about to introduce an optimisation which makes this much more likely.

Quoted 8 lines

In standalone mode we probably don't care much about this timeout at all. (It might even be that the user is using sqlite(3) and has effectively locked the database interactively for an extended period.)

We would prefer to rely on the user to stop anything that seems to have become stuck. So set the timeout to 10ks.

#5 lore raw

Re: [OSSTEST PATCH 02/27] Executive: cs-job-create: Check that OSSTEST_FLIGHT is not set

In reply to Ian Campbell

Ian Campbell writes ("Re: [OSSTEST PATCH 02/27] Executive: cs-job-create: Check that OSSTEST_FLIGHT is not set"):

Quoted 8 lines · Ian Jackson
Quoted 5 lines

If OSSTEST_FLIGHT is set on entry to JobDB::Executive::flight_create, fail. This obviously represents some kind of mistake.

One effect is that standalone-generate-dump-flight-runvars won't fill an Executive database with test flights.

Speaking from experience there?

I managed to /mostly/ catch it because it seemed to be taking rather long ...

Ian.

Acked-by on v1 7/27
#15 lore raw

Re: [OSSTEST PATCH 07/27] memoise: New utility

In reply to Ian Jackson
Quoted 4 lines · Ian Jackson

Give this a GPLv2+ licence so that we can move it into some other FLOSS package later.

memoise line 24

Quoted 3 lines
memoise new file +3 -0
+#    You should have received a copy of the GNU General Public License along
+#    with this program; if not, write to the Free Software Foundation, Inc.,
+#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

These days http://www.gnu.org/licenses/gpl-howto.en.html recommends:

You should have received a copy of the GNU General Public License along with Foobar. If not, see <http://www.gnu.org/licenses/>.

FWIW.

Ian.

Acked-by on v1 8/27
#21 lore raw

Re: [OSSTEST PATCH 08/27] standalone-generate-dump-flight-runvars: memoise ap-fetch

In reply to Ian Jackson
Quoted 6 lines · Ian Jackson

This makes it _much_ faster.

Also you can say AP_FETCH_MEMO_KEEP=1 to make it reuse old information, which is useful for making comparisons.

For a further speed improvement, use `eatmydata'. This is not the

^one could/should ?

Because this patch doesn't do so (even as a non-default option) afaict.

Quoted 4 lines

default because it risks corruption of `standalone.db' which is used for other purposes too. Add a comment about possibly improving this.

Other than that:

Acked-by on v1 11/27
#28 lore raw

Re: [OSSTEST PATCH 11/27] ap-push: Use refs/heads/ for destinations

In reply to Ian Jackson
Quoted 12 lines · Ian Jackson

When the destination is a branch, specify refs/heads/ explicitly. This makes ap-push work even if the ref does not yet exist on the destination.

There is no functional change for an existing installation pushing to an existing branch. But for a hypothetical new installation, this would be necessary.

And, more relevantly, when new "branches" are invented, the use of an existing ap-push case as a template will generate a new case which creates the branch as is necessary.

Quoted 5 lines

I leave the more complex osstest case alone. It's not clear to me whether the destination ref not existing is an installation problem of such severity that indeed ap-push should fail.

#16 lore raw

Re: [OSSTEST PATCH 07/27] memoise: New utility

In reply to Ian Campbell

Ian Campbell writes ("Re: [OSSTEST PATCH 07/27] memoise: New utility"):

Quoted 4 lines

These days http://www.gnu.org/licenses/gpl-howto.en.html recommends:

You should have received a copy of the GNU General Public License along with Foobar. If not, see <http://www.gnu.org/licenses/>.

I will fix this.

Also of course this statement was, with my original patch, wrong, because osstest.git didn't contain a copy of any version of the vanilla GPL. I have added a copy of GPL-3 to this patch.

Ian.

#22 lore raw

Re: [OSSTEST PATCH 08/27] standalone-generate-dump-flight-runvars: memoise ap-fetch

In reply to Ian Campbell

Ian Campbell writes ("Re: [OSSTEST PATCH 08/27] standalone-generate-dump-flight-runvars: memoise ap-fetch"):

Quoted 11 lines · Ian Jackson
Quoted 6 lines

This makes it _much_ faster.

Also you can say AP_FETCH_MEMO_KEEP=1 to make it reuse old information, which is useful for making comparisons.

For a further speed improvement, use `eatmydata'. This is not the

^one could/should ?

Because this patch doesn't do so (even as a non-default option) afaict.

Indeed. Wrong grammar. Fixed.

Thanks,
Ian.

#17 lore raw

Re: [OSSTEST PATCH 07/27] memoise: New utility

In reply to Ian Jackson
Quoted 11 lines · Ian Jackson

Ian Campbell writes ("Re: [OSSTEST PATCH 07/27] memoise: New utility"):

Quoted 4 lines

These days http://www.gnu.org/licenses/gpl-howto.en.html recommends:

You should have received a copy of the GNU General Public License along with Foobar. If not, see <http://www.gnu.org/licenses/>.

I will fix this.

Also of course this statement was, with my original patch, wrong, because osstest.git didn't contain a copy of any version of the vanilla GPL. I have added a copy of GPL-3 to this patch.

NB all the text in the patch talks about v2, FWIW...

Quoted 2 lines

Ian.

Acked-by on v1 13/27
#32 lore raw

Re: [OSSTEST PATCH 13/27] cr-ensure-disk-space: Look at referring flights

In reply to Ian Jackson
Quoted 12 lines · Ian Jackson

Previously the flight to delete was simply the one with the lowest flight number. Now we sort flights not by their own flight number, but by the highest flight number of any referencing flight.

This means that flights whose builds are being reused are kept as long as the reusing flights.

This almost-entirely fixes a largely-theoretical race in the way cs-bisection-step works (where the flight's logs and build outputs might be deleted between the setup and execution of the referring flight).

Quoted 6 lines

A smaller race still exists because the stash check in cs-bisection-step occurs before the being-created flight is visible to other db clients. We will have to fix this by taking the flights lock.

Acked-by on v1 15/27
#36 lore raw

Re: [OSSTEST PATCH 15/27] cr-ensure-disk-space: Take the flights db lock

In reply to Ian Jackson
Quoted 6 lines · Ian Jackson

This eliminates the race with cs-bisection-step (and other flight-construction tools which might reuse previous flights, provided that they also do not pass previous flight numbers from hand to hand with the db unlocked).

Quoted 26 lines
---
 cr-ensure-disk-space |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
cr-ensure-disk-space +7 -4
index 8c5a708..138f3f4 100755
@@ -145,10 +145,13 @@ END
     return 1;
 }
 
-for (;;) {
-    iteration_continue()
-	or last;
-}
+db_retry($dbh_tests,[qw(flights)], sub {
+    @flights = ();
+    for (;;) {
+	iteration_continue()
+	    or last;
+    }
+});
 
 printf "ok.\n";
 exit 0;
Acked-by on v1 16/27
#38 lore raw

Re: [OSSTEST PATCH 16/27] cs-job-create: Permit creation of `synth' runvars

In reply to Ian Jackson
Quoted 8 lines · Ian Jackson

This will be useful if we want to set hostalloc_* runvars. Normally we would want to set those only on flights generated by make-flight.

Flights generated by cs-bisection-step or cs-adjust-flight ought not to copy them, because cs-bisection-step makes its own arrangements for host specification, as should the caller of cs-adjust-flight (perhaps via the blessing system).

Quoted 5 lines

Using `synth' for this is arguably slightly wrong but it does the right thing in all existing cases. The alternative would be a schema change.

./standalone set-paths could usefully use this too I think.

Acked-by on v1 17/27
#42 lore raw

Re: [OSSTEST PATCH 17/27] mg-show-flight-runvars: Decorate synth runvar names with ~

In reply to Ian Jackson
Quoted 5 lines · Ian Jackson

Make mg-show-flight-runvars -a append ~ to the names of synth runvars. (This is consistent with the new syntax in cs-job-create.)

We do this by editing $row->[1] (and $colws[1]) so we can avoid disturbing the general column format calcuation and printing; this

"calculation"

Quoted 2 lines

means we have to copy $row (because the value in the DB $row is readonly).

fetchrow_array instead of fetchrow_arrayref would avoid the copy, at the expense of removing -> from the usages (or taking the ref yourself).

Quoted 7 lines

We have to check for $synth eq 'f' as well as $synth being boolean false, because SQLite's typeless nature (or, to put it another way, DBD::SQLite's failure to look at the schema) means that a boolean field's value of 'f' or 't' is simply returned as a string to Perl. But of course "f" is trueish in Perl.

Nonetheless:

Acked-by on v1 19/27
#47 lore raw

Re: [OSSTEST PATCH 19/27] ts-host-alloc-Executive: Honour various hostalloc_* runvars

In reply to Ian Jackson
Quoted 5 lines · Ian Jackson

We honour
hostalloc_maxbonus_variation
hostalloc_bonus_previousfail
hostalloc_bonus_sharereuse
and make them default to their previous values.

Took me a while to grok what was happening with $prevfail_equiv_bonus. still:

Quoted 1 line
Acked-by on v1 20/27
#49 lore raw

Re: [OSSTEST PATCH 20/27] make-flight: Allow separate specification of pre-built Xen vs others

In reply to Ian Jackson
Quoted 18 lines · Ian Jackson

Make it possible to separately specify
- reuse previous flight's builds of xen.git
- reuse previous flight's builds of all other stuff

Specifically:

* Match the 4th argument to make-flight with case rather than if. If it contains a slash, the first part is for Xen and the second part for everything else.

* Split the variable bfi' into bfi' and `xenbfi'

* Introduce job_create_build_filter_callback, whose initial contents check the recipe (to see what we're building) and then the relevant bfi variable. (NB that this is wrong for historical kernel builds using the xen.git build system, which have recipe=build, but we do not care about that.)

Quoted 3 lines

No functional change for existing call patterns.

Acked-by on v1 21/27
#51 lore raw

Re: [OSSTEST PATCH 21/27] make-flight: Contemplate varying architecture for Debian HVM

In reply to Ian Jackson
Quoted 9 lines · Ian Jackson

In the Debian hvm tests, ask branch_debianhvm_arch for the architecture to use. This currently prints only amd64.

While we are here, provide some comments about the (somewhat confusing) argument conventions of do_hvm_debian_test_one.

No functional change yet.

Acked-by on v1 22/27
#53 lore raw

Re: [OSSTEST PATCH 22/27] make-flight: Run job_create_test_filter_callback on true job name

In reply to Ian Jackson
Quoted 7 lines · Ian Jackson

job_create_test would pass $job to job_create_test_filter_callback but then later maybe append -xsm to it. Fix this.

No functional change for existing in-tree code because all existing tests of the $job end in *.

#55 lore raw

Re: [OSSTEST PATCH 23/27] make-flight: Provide xen-unstable-smoke branch

In reply to Ian Jackson
Quoted 9 lines · Ian Jackson

This contains a very limited set of jobs:

    build-amd64
    build-armhf
    test-amd64-amd64-libvirt
    test-amd64-amd64-xl-qemuu-debianhvm-i386
    test-armhf-armhf-xl

The debianhvm job exists only in this flight, and is generated by having branch_debianhvm_arch return i386 instead of amd64.

any particular reason for this?

Quoted 6 lines

We override host allocator parameters to make this flight not care about host stickiness: it just takes whatever comes to hand.

Deployment note: This requires images/debian-7.2.0-i386-CD-1.iso which I have already downloaded to the Cambridge instance using jigdo.

But not the main colo?

make-flight case "$buildflight" in · line 78

Quoted 4 lines
make-flight +4 -0
+case "$branch" in
+xen-unstable-smoke)
+	global_runvars+=" hostalloc_maxbonus_variation~=0 "
+	global_runvars+=" hostalloc_bonus_previousfail~=0 "

Why are these synthetic?

#58 lore raw

Re: [OSSTEST PATCH 23/27] make-flight: Provide xen-unstable-smoke branch

In reply to Ian Jackson
Quoted 4 lines · Ian Jackson

This contains a very limited set of jobs:

    build-amd64
    build-armhf
    test-amd64-amd64-libvirt

Contrary to the previous ack -- this will need build-amd64-libvirt, won't it?

#59 lore raw

Re: [OSSTEST PATCH 23/27] make-flight: Provide xen-unstable-smoke branch

Quoted 8 lines · Ian Campbell
Quoted 4 lines · Ian Jackson

This contains a very limited set of jobs:

    build-amd64
    build-armhf
    test-amd64-amd64-libvirt

Contrary to the previous ack -- this will need build-amd64-libvirt, won't it?

And what about kernels for both cases?

Acked-by on v1 25/27
#66 lore raw

Re: [OSSTEST PATCH 25/27] ap-*: Be able to fetch and push xen.git#smoked

In reply to Ian Jackson
Quoted 4 lines · Ian Jackson

The branches and push gates are now:
xen.git#staging -[xen-unstable-smoke]-> #smoked -[xen-unstable]->
#master

Quoted 8 lines

Deployment note: When this passes the osstest self-push-gate, the main xen-unstable flight will start using smoked as an input. Therefore, until the new cronjob is installed to run the xen-unstable-smoke tests, an automatic process should keep xen.git#smoked up to date with xen.git#staging. Eg, running in screen in xen@xenbits:~/git/xen.git:
while sleep 1800; do git fetch . staging:smoked; done

Acked-by on v1 26/27
#68 lore raw

Re: [OSSTEST PATCH 26/27] cri-common: Support xen-unstable-smoke

In reply to Ian Jackson
Quoted 8 lines · Ian Jackson

Add this branch to select_xenbranch. This works like xen-unstable in most respects. We are going to sort out the push gate ref plumbing in xen.git in the next osstest patch.

Also, use a branch-settings file to set its resource priority to -20 to make it run ahead of anything else automatic.

#18 lore raw

Re: [OSSTEST PATCH 07/27] memoise: New utility

In reply to Ian Campbell

Ian Campbell writes ("Re: [OSSTEST PATCH 07/27] memoise: New utility"):

Quoted 6 lines · Ian Jackson
Quoted 3 lines

Also of course this statement was, with my original patch, wrong, because osstest.git didn't contain a copy of any version of the vanilla GPL. I have added a copy of GPL-3 to this patch.

NB all the text in the patch talks about v2, FWIW...

You mean it talks about `version 2 or, at your option, any later version'. Clearly we don't want to be pushing GPL-2 at this stage, so GPL-3 is the right licence version text to include. But likewise we don't want to rule out distribution under GPL-2.

Ian.

#19 lore raw

Re: [OSSTEST PATCH 07/27] memoise: New utility

Quoted 6 lines · Ian Jackson

Ian Campbell writes ("Re: [OSSTEST PATCH 07/27] memoise: New utility"):

Quoted 5 lines · Ian Jackson
Quoted 3 lines

Also of course this statement was, with my original patch, wrong, because osstest.git didn't contain a copy of any version of the vanilla GPL. I have added a copy of GPL-3 to this patch.

Quoted 6 lines
Quoted 1 line

NB all the text in the patch talks about v2, FWIW...

You mean it talks about `version 2 or, at your option, any later version'. Clearly we don't want to be pushing GPL-2 at this stage, so GPL-3 is the right licence version text to include. But likewise we don't want to rule out distribution under GPL-2.

Yep, just wanted to check it was intentional.

#39 lore raw

Re: [OSSTEST PATCH 16/27] cs-job-create: Permit creation of `synth' runvars

In reply to Ian Campbell

Ian Campbell writes ("Re: [OSSTEST PATCH 16/27] cs-job-create: Permit creation of `synth' runvars"):

Quoted 5 lines · Ian Jackson
Quoted 2 lines

This will be useful if we want to set hostalloc_* runvars. Normally we would want to set those only on flights generated by make-flight.

Thanks.

Quoted 1 line

./standalone set-paths could usefully use this too I think.

Could it ? I don't think I would object. I never use set-paths...

Ian.

#43 lore raw

Re: [OSSTEST PATCH 17/27] mg-show-flight-runvars: Decorate synth runvar names with ~

In reply to Ian Campbell

Ian Campbell writes ("Re: [OSSTEST PATCH 17/27] mg-show-flight-runvars: Decorate synth runvar names with ~"):

Quoted 8 lines · Ian Jackson
Quoted 5 lines

Make mg-show-flight-runvars -a append ~ to the names of synth runvars. (This is consistent with the new syntax in cs-job-create.)

We do this by editing $row->[1] (and $colws[1]) so we can avoid disturbing the general column format calcuation and printing; this

"calculation"

Fixed.

Quoted 5 lines
Quoted 2 lines

means we have to copy $row (because the value in the DB $row is readonly).

fetchrow_array instead of fetchrow_arrayref would avoid the copy, at the expense of removing -> from the usages (or taking the ref yourself).

Yes. I have done that and it's nicer.

Ian.

#40 lore raw

Re: [OSSTEST PATCH 16/27] cs-job-create: Permit creation of `synth' runvars

In reply to Ian Jackson
Quoted 6 lines · Ian Jackson

Ian Campbell writes ("Re: [OSSTEST PATCH 16/27] cs-job-create: Permit creation of `synth' runvars"):

Quoted 4 lines · Ian Jackson
Quoted 2 lines

This will be useful if we want to set hostalloc_* runvars. Normally we would want to set those only on flights generated by make-flight.

Quoted 7 lines
Quoted 1 line

Thanks.

Quoted 1 line

./standalone set-paths could usefully use this too I think.

Could it ? I don't think I would object. I never use set-paths...

IIRC if you use set-paths and then subsequently have a need to actually re -run the job then it barfs trying to write the new runvars for path etc.

Ian.

#56 lore raw

Re: [OSSTEST PATCH 23/27] make-flight: Provide xen-unstable-smoke branch

In reply to Ian Campbell

Ian Campbell writes ("Re: [OSSTEST PATCH 23/27] make-flight: Provide xen-unstable-smoke branch"):

Quoted 8 lines · Ian Jackson
Quoted 7 lines

This contains a very limited set of jobs:

    build-amd64
    build-armhf
    test-amd64-amd64-libvirt
    test-amd64-amd64-xl-qemuu-debianhvm-i386
    test-armhf-armhf-xl
Quoted 4 lines
Quoted 2 lines

The debianhvm job exists only in this flight, and is generated by having branch_debianhvm_arch return i386 instead of amd64.

any particular reason for this?

I wanted to test at least one 32-bit guest. I have added a note about this to the commit message.

Quoted 5 lines
Quoted 3 lines

Deployment note: This requires images/debian-7.2.0-i386-CD-1.iso which I have already downloaded to the Cambridge instance using jigdo.

But not the main colo?

Not yet. I will do that before I start trying to run this there. I think I ought to do such a --real run, by hand, when the series seems about ready to go into pretest.

Quoted 6 lines

make-flight case "$buildflight" in · line 78

Quoted 4 lines
make-flight +4 -0
+case "$branch" in
+xen-unstable-smoke)
+	global_runvars+=" hostalloc_maxbonus_variation~=0 "
+	global_runvars+=" hostalloc_bonus_previousfail~=0 "

Why are these synthetic?

I wrote in the commit message that introduced the ~ notation in cs-job-create:

This will be useful if we want to set hostalloc_* runvars. Normally we would want to set those only on flights generated by make-flight.

Flights generated by cs-bisection-step or cs-adjust-flight ought not to copy them, because cs-bisection-step makes its own arrangements for host specification, as should the caller of cs-adjust-flight (perhaps via the blessing system).

Using `synth' for this is arguably slightly wrong but it does the right thing in all existing cases. The alternative would be a schema change.

Perhaps I should move some of this text to this commit message.

Ian.

#64 lore raw

Re: [OSSTEST PATCH 24/27] make-flight: mfi-common: Honour $global_runvars

In reply to Ian Campbell

Ian Campbell writes ("Re: [OSSTEST PATCH 24/27] make-flight: mfi-common: Honour $global_runvars"):

Quoted 5 lines · Ian Jackson
Quoted 2 lines

Provide a way for the main script to set some runvars on all jobs. We expect this to be mostly set with +=.

You've used this facility in #23, so maybe you want to reorder?

Oops, yes, I will swap this with #23.

Quoted 3 lines

In any case:

Thanks,
Ian.

#60 lore raw

Re: [OSSTEST PATCH 23/27] make-flight: Provide xen-unstable-smoke branch

In reply to Ian Campbell

Ian Campbell writes ("Re: [OSSTEST PATCH 23/27] make-flight: Provide xen-unstable-smoke branch"):

Quoted 8 lines · Ian Jackson
Quoted 4 lines

This contains a very limited set of jobs:

    build-amd64
    build-armhf
    test-amd64-amd64-libvirt

Contrary to the previous ack -- this will need build-amd64-libvirt, won't it?

The intent was to reuse previous build jobs for everything. That's what
make-flight: Allow separate specification of pre-built Xen vs others
was for. But I don't in fact seem to have produced any patch which actually does that!

Ian.

#57 lore raw

Re: [OSSTEST PATCH 23/27] make-flight: Provide xen-unstable-smoke branch

In reply to Ian Jackson
Quoted 10 lines · Ian Jackson

Ian Campbell writes ("Re: [OSSTEST PATCH 23/27] make-flight: Provide xen -unstable-smoke branch"):

Quoted 8 lines · Ian Jackson
Quoted 7 lines

This contains a very limited set of jobs:

    build-amd64
    build-armhf
    test-amd64-amd64-libvirt
    test-amd64-amd64-xl-qemuu-debianhvm-i386
    test-armhf-armhf-xl
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

The debianhvm job exists only in this flight, and is generated by having branch_debianhvm_arch return i386 instead of amd64.

any particular reason for this?

I wanted to test at least one 32-bit guest. I have added a note about this to the commit message.

OK.

I wonder if we should also add this to the regular flights? Seems odd to smoke test it for unstable but not for e.g. real 4.6 flights.

Quoted 29 lines
Quoted 5 lines
Quoted 3 lines

Deployment note: This requires images/debian-7.2.0-i386-CD-1.iso which I have already downloaded to the Cambridge instance using jigdo.

But not the main colo?

Not yet. I will do that before I start trying to run this there. I think I ought to do such a --real run, by hand, when the series seems about ready to go into pretest.

Quoted 6 lines

make-flight case "$buildflight" in · line 78

Quoted 4 lines
make-flight +4 -0
+case "$branch" in
+xen-unstable-smoke)
+	global_runvars+=" hostalloc_maxbonus_variation~=0 "
+	global_runvars+=" hostalloc_bonus_previousfail~=0 "

Why are these synthetic?

I wrote in the commit message that introduced the ~ notation in cs-job-create:

This will be useful if we want to set hostalloc_* runvars. Normally we would want to set those only on flights generated by make-flight.

Flights generated by cs-bisection-step or cs-adjust-flight ought not to copy them, because cs-bisection-step makes its own arrangements
for
host specification, as should the caller of cs-adjust-flight (perhaps via the blessing system).

Quoted 5 lines

Using `synth' for this is arguably slightly wrong but it does the right thing in all existing cases. The alternative would be a schema change.

Perhaps I should move some of this text to this commit message.

Yes, I'd forgotten all about it by now, which I think it is when it is relevant.

Quoted 2 lines

Ian.

#61 lore raw

Re: [OSSTEST PATCH 23/27] make-flight: Provide xen-unstable-smoke branch

In reply to Ian Jackson
Quoted 8 lines · Ian Jackson

Ian Campbell writes ("Re: [OSSTEST PATCH 23/27] make-flight: Provide xen -unstable-smoke branch"):

Quoted 6 lines · Ian Jackson
Quoted 4 lines

This contains a very limited set of jobs:

    build-amd64
    build-armhf
    test-amd64-amd64-libvirt
Quoted 8 lines
Quoted 3 lines

Contrary to the previous ack -- this will need build-amd64-libvirt, won't
it?

The intent was to reuse previous build jobs for everything. That's what
make-flight: Allow separate specification of pre-built Xen vs others
was for.

Right, makes sense.

Quoted 2 lines

But I don't in fact seem to have produced any patch which
actually does that!

Indeed!

You would also need to handle the case where the was no build remaining which you could use (it have might been gc'd between two smoke runs)

Quoted 2 lines

Ian.

#72 lore raw
In reply to Ian Jackson
Quoted 4 lines · Ian Jackson

One outstanding bikeshed question about naming: I have called the job xen-unstable-smoke' and the output ref xen.git#smoked. I tripped over the presence or absence of the d' a few times. Should one of these two be renamed, and if so which ?

Yes, having the "doing" name vs the "done" name does lead to this.

I'm not sure, the disconnect seems unfortunate, but either of the solutions are clumsy when reading one context or the other.

Leave it?

Quoted 322 lines

I have verified that this series from
"standalone-generate-dump-flight-runvars: memoise ap-fetch"
onwards generates no unexpected changes to any runvars. The diff -bu (from there to tip) in the output from
OSSTEST_CONFIG=standalone-config-example \
./standalone-generate-dump-flight-runvars
is included below. At the time of running this, xen.git had
340ade2f0ef692efce01a708ad98629af985f978 refs/heads/smoked 26646f34c31f663fa23076ed0433195edec50d9f refs/heads/staging
and the only change to the existing flights' runvars is that xen-unstable's non-prev revision_xen values referring to staging now refer to smoked instead.

after renamed from play-testing.git/before +1 -1
@@ -23100,16 +23100,16 @@
 xen-unstable               build-armhf-xsm                              
         revision_seabios                                                
 
 xen-unstable               build-i386                                   
         revision_seabios                                                
 
 xen-unstable               build-i386-xsm                               
         revision_seabios                                                
 
-xen-unstable               build-amd64                                  
         revision_xen               
 26646f34c31f663fa23076ed0433195edec50d9f                      
+xen-unstable               build-amd64                                  
         revision_xen                
 340ade2f0ef692efce01a708ad98629af985f978                      
 xen-unstable               build-amd64-prev                             
         revision_xen               

a7b39c8bd6cba3fe1c8012987b9e28bdbac7e92d

after renamed from play-testing.git/before +9 -10
-xen-unstable               build-amd64-rumpuserxen                      
         revision_xen               
 26646f34c31f663fa23076ed0433195edec50d9f                      
-xen-unstable               build-amd64-xsm                              
         revision_xen               
 26646f34c31f663fa23076ed0433195edec50d9f                      
-xen-unstable               build-armhf                                  
         revision_xen               
 26646f34c31f663fa23076ed0433195edec50d9f                      
-xen-unstable               build-armhf-xsm                              
         revision_xen               
 26646f34c31f663fa23076ed0433195edec50d9f                      
-xen-unstable               build-i386                                   
         revision_xen               
 26646f34c31f663fa23076ed0433195edec50d9f                      
+xen-unstable               build-amd64-rumpuserxen                      
         revision_xen                
 340ade2f0ef692efce01a708ad98629af985f978                      
+xen-unstable               build-amd64-xsm                              
         revision_xen                
 340ade2f0ef692efce01a708ad98629af985f978                      
+xen-unstable               build-armhf                                  
         revision_xen                
 340ade2f0ef692efce01a708ad98629af985f978                      
+xen-unstable               build-armhf-xsm                              
         revision_xen                
 340ade2f0ef692efce01a708ad98629af985f978                      
+xen-unstable               build-i386                                   
         revision_xen                
 340ade2f0ef692efce01a708ad98629af985f978                      
 xen-unstable               build-i386-prev                              
         revision_xen               
 a7b39c8bd6cba3fe1c8012987b9e28bdbac7e92d                      
-xen-unstable               build-i386-rumpuserxen                       
         revision_xen               
 26646f34c31f663fa23076ed0433195edec50d9f                      
-xen-unstable               build-i386-xsm                               
         revision_xen               
 26646f34c31f663fa23076ed0433195edec50d9f                      
+xen-unstable               build-i386-rumpuserxen                       
         revision_xen                
 340ade2f0ef692efce01a708ad98629af985f978                      
+xen-unstable               build-i386-xsm                               
         revision_xen                
 340ade2f0ef692efce01a708ad98629af985f978                      
 xen-unstable               test-amd64-amd64-rumpuserxen-amd64           
         rump_builtimage             rumpuserxen:/usr/local/lib/xen/rump
-kernel/rump-kernel        
 xen-unstable               test-amd64-i386-rumpuserxen-i386             
         rump_builtimage             rumpuserxen:/usr/local/lib/xen/rump
-kernel/rump-kernel        
 xen-unstable               test-amd64-amd64-rumpuserxen-amd64           
         rump_cmdline                3                                   
@@ -23365,3 +23365,77 @@
 xen-unstable               test-amd64-i386-rumpuserxen-i386             
         xenstorels_builtimage       :/usr/local/bin/xenstore            
 
 xen-unstable               test-amd64-amd64-rumpuserxen-amd64           
         xenstorels_cmdline          ls -fp device                       
 
 xen-unstable               test-amd64-i386-rumpuserxen-i386             
         xenstorels_cmdline          ls -fp device                       
 
+xen-unstable-smoke         test-amd64-amd64-libvirt                
 all_hostflags                 arch-amd64,arch-xen-amd64,suite
-wheezy,purpose-test           
+xen-unstable-smoke         test-amd64-amd64-xl-qemuu-debianhvm-i386

all_hostflags arch-amd64,arch-xen-amd64,suite

after renamed from play-testing.git/before +11 -2
-wheezy,purpose-test,hvm       
+xen-unstable-smoke         test-armhf-armhf-xl                     
 all_hostflags                 arch-armhf,arch-xen-armhf,suite
-wheezy,purpose-test           
+xen-unstable-smoke         build-amd64                              arch
                          amd64                                          
 
+xen-unstable-smoke         build-armhf                              arch
                          armhf                                          
 
+xen-unstable-smoke         test-amd64-amd64-libvirt                 arch
                          amd64                                          
 
+xen-unstable-smoke         test-amd64-amd64-xl-qemuu-debianhvm-i386 arch
                          amd64                                          
 
+xen-unstable-smoke         test-armhf-armhf-xl                      arch
                          armhf                                          
 
+xen-unstable-smoke         test-amd64-amd64-xl-qemuu-debianhvm-i386 bios
                          seabios                                        
 
+xen-unstable-smoke         build-amd64                             
 build_lvextend_max            50                                        
 
+xen-unstable-smoke         build-armhf                             
 build_lvextend_max            50                                        
 
+xen-unstable-smoke         test-amd64-amd64-libvirt                
 buildjob                      build-amd64                               
 
+xen-unstable-smoke         test-amd64-amd64-xl-qemuu-debianhvm-i386

buildjob build-amd64

after renamed from play-testing.git/before +6 -0
+xen-unstable-smoke         test-armhf-armhf-xl                     
 buildjob                      build-armhf                               
 
+xen-unstable-smoke         test-amd64-amd64-libvirt                
 debian_arch                   amd64                                     
 
+xen-unstable-smoke         test-armhf-armhf-xl                     
 debian_arch                   armhf                                     
 
+xen-unstable-smoke         test-amd64-amd64-libvirt                
 debian_kernkind               pvops                                     
 
+xen-unstable-smoke         test-armhf-armhf-xl                     
 debian_kernkind               pvops                                     
 
+xen-unstable-smoke         test-amd64-amd64-xl-qemuu-debianhvm-i386

debianhvm_image debian-7.2.0-i386-CD-1.iso

+xen-unstable-smoke test-amd64-amd64-xl-qemuu-debianhvm-i386
device_model_version qemu-xen

after renamed from play-testing.git/before +8 -0
+xen-unstable-smoke         build-amd64                             
 enable_ovmf                   true                                      
 
+xen-unstable-smoke         build-armhf                             
 enable_ovmf                   true                                      
 
+xen-unstable-smoke         build-amd64                             
 enable_xend                   false                                     
 
+xen-unstable-smoke         build-armhf                             
 enable_xend                   false                                     
 
+xen-unstable-smoke         build-amd64                             
 enable_xsm                    false                                     
 
+xen-unstable-smoke         build-armhf                             
 enable_xsm                    false                                     
 
+xen-unstable-smoke         test-amd64-amd64-libvirt                
 enable_xsm                    false                                     
 
+xen-unstable-smoke         test-amd64-amd64-xl-qemuu-debianhvm-i386

enable_xsm false

after renamed from play-testing.git/before +5 -2
+xen-unstable-smoke         test-armhf-armhf-xl                     
 enable_xsm                    false                                     
 
+xen-unstable-smoke         build-amd64                             
 host_hostflags                share-build-wheezy-amd64,arch-amd64,suite
-wheezy,purpose-build
+xen-unstable-smoke         build-armhf                             
 host_hostflags                share-build-wheezy-armhf,arch-armhf,suite
-wheezy,purpose-build
+xen-unstable-smoke         test-amd64-amd64-libvirt                
 kernbuildjob                  build-amd64-pvops                         
 
+xen-unstable-smoke         test-amd64-amd64-xl-qemuu-debianhvm-i386

kernbuildjob build-amd64-pvops

after renamed from play-testing.git/before +3 -0
+xen-unstable-smoke         test-armhf-armhf-xl                     
 kernbuildjob                  build-armhf-pvops                         
 
+xen-unstable-smoke         test-amd64-amd64-libvirt                
 kernkind                      pvops                                     
 
+xen-unstable-smoke         test-amd64-amd64-xl-qemuu-debianhvm-i386

kernkind pvops

after renamed from play-testing.git/before +14 -0
+xen-unstable-smoke         test-armhf-armhf-xl                     
 kernkind                      pvops                                     
 
+xen-unstable-smoke         test-amd64-amd64-libvirt                
 libvirtbuildjob               build-amd64-libvirt                       
 
+xen-unstable-smoke         build-amd64                             
 revision_ovmf                                                           
 
+xen-unstable-smoke         build-armhf                             
 revision_ovmf                                                           
 
+xen-unstable-smoke         build-amd64                             
 revision_qemu                                                           
 
+xen-unstable-smoke         build-armhf                             
 revision_qemu                                                           
 
+xen-unstable-smoke         build-amd64                             
 revision_qemuu                b05befcbea71a979509ce04f02929969a790c923  
 
+xen-unstable-smoke         build-armhf                             
 revision_qemuu                b05befcbea71a979509ce04f02929969a790c923  
 
+xen-unstable-smoke         build-amd64                             
 revision_seabios                                                        
 
+xen-unstable-smoke         build-armhf                             
 revision_seabios                                                        
 
+xen-unstable-smoke         build-amd64                             
 revision_xen                  a7b39c8bd6cba3fe1c8012987b9e28bdbac7e92d  
 
+xen-unstable-smoke         build-armhf                             
 revision_xen                  a7b39c8bd6cba3fe1c8012987b9e28bdbac7e92d  
 
+xen-unstable-smoke         test-amd64-amd64-libvirt                
 toolstack                     libvirt                                   
 
+xen-unstable-smoke         test-amd64-amd64-xl-qemuu-debianhvm-i386

toolstack xl

after renamed from play-testing.git/before +13 -4
+xen-unstable-smoke         test-armhf-armhf-xl                     
 toolstack                     xl                                        
 
+xen-unstable-smoke         build-amd64                             
 tree_ovmf                                                               
 
+xen-unstable-smoke         build-armhf                             
 tree_ovmf                                                               
 
+xen-unstable-smoke         build-amd64                             
 tree_qemu                     git://xenbits.xen.org/staging/qemu-xen
-unstable.git           
+xen-unstable-smoke         build-armhf                             
 tree_qemu                     git://xenbits.xen.org/staging/qemu-xen
-unstable.git           
+xen-unstable-smoke         build-amd64                             
 tree_qemuu                    git://xenbits.xen.org/staging/qemu
-upstream-unstable.git      
+xen-unstable-smoke         build-armhf                             
 tree_qemuu                    git://xenbits.xen.org/staging/qemu
-upstream-unstable.git      
+xen-unstable-smoke         build-amd64                             
 tree_seabios                                                            
 
+xen-unstable-smoke         build-armhf                             
 tree_seabios                                                            
 
+xen-unstable-smoke         build-amd64                             
 tree_xen                      git://xenbits.xen.org/xen.git             
 
+xen-unstable-smoke         build-armhf                             
 tree_xen                      git://xenbits.xen.org/xen.git             
 
+xen-unstable-smoke         test-amd64-amd64-libvirt                
 xenbuildjob                   build-amd64                               
 
+xen-unstable-smoke         test-amd64-amd64-xl-qemuu-debianhvm-i386

xenbuildjob build-amd64

after renamed from play-testing.git/before +5 -0
+xen-unstable-smoke         test-armhf-armhf-xl                     
 xenbuildjob                   build-armhf                               
 
+xen-unstable-smoke         build-amd64                             
 hostalloc_bonus_previousfail~ 0                                         
 
+xen-unstable-smoke         build-armhf                             
 hostalloc_bonus_previousfail~ 0                                         
 
+xen-unstable-smoke         test-amd64-amd64-libvirt                
 hostalloc_bonus_previousfail~ 0                                         
 
+xen-unstable-smoke         test-amd64-amd64-xl-qemuu-debianhvm-i386

hostalloc_bonus_previousfail~ 0

after renamed from play-testing.git/before +5 -0
+xen-unstable-smoke         test-armhf-armhf-xl                     
 hostalloc_bonus_previousfail~ 0                                         
 
+xen-unstable-smoke         build-amd64                             
 hostalloc_maxbonus_variation~ 0                                         
 
+xen-unstable-smoke         build-armhf                             
 hostalloc_maxbonus_variation~ 0                                         
 
+xen-unstable-smoke         test-amd64-amd64-libvirt                
 hostalloc_maxbonus_variation~ 0                                         
 
+xen-unstable-smoke         test-amd64-amd64-xl-qemuu-debianhvm-i386

hostalloc_maxbonus_variation~ 0

+xen-unstable-smoke test-armhf-armhf-xl
hostalloc_maxbonus_variation~ 0

#73 lore raw

Ian Campbell writes ("Re: [OSSTEST PATCH 00/27] xen.git#staging smoke tests"):

Quoted 10 lines · Ian Jackson
Quoted 4 lines

One outstanding bikeshed question about naming: I have called the job xen-unstable-smoke' and the output ref xen.git#smoked. I tripped over the presence or absence of the d' a few times. Should one of these two be renamed, and if so which ?

Yes, having the "doing" name vs the "done" name does lead to this.

I'm not sure, the disconnect seems unfortunate, but either of the solutions are clumsy when reading one context or the other.

Changing the osstest branch name (flight report title) to `xen-unstable-smoked' would clearly be wrong.

I'm tempted to change the xen.git ref name to smoke' to match. It also means you can say entertaining things like are you using the latest smoke' ?

Ian.