]> xenbits.xensource.com Git - people/liuw/osstest.git/log
people/liuw/osstest.git
9 years agomake-flight, mfi-common: create live migration test for libvirt wip.libvirt-v3
Wei Liu [Sun, 8 Feb 2015 16:35:22 +0000 (16:35 +0000)]
make-flight, mfi-common: create live migration test for libvirt

Note that we start testing libvirt migration for 4.4 and above.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agomake-flight, mfi-common: rename onetoolstack to pairtoolstack
Wei Liu [Sun, 8 Feb 2015 16:29:17 +0000 (16:29 +0000)]
make-flight, mfi-common: rename onetoolstack to pairtoolstack

The name "onetoolstack" in confusing. Currently it's in fact referring
to the toolstack used to test pair migration, so rename it to
"pairtoolstack".

No functional changes introduced.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agomake-flight: debian hvm tests with libvirt
Wei Liu [Sun, 8 Feb 2015 16:26:57 +0000 (16:26 +0000)]
make-flight: debian hvm tests with libvirt

Since upstream QEMU is the default, that's what libvirt is using. We
generate test case to test libvirt with upstream QEMU.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoTestSupport: don't put kernel= in HVM config when using xl and libvirt
Wei Liu [Sun, 12 Jul 2015 11:29:02 +0000 (12:29 +0100)]
TestSupport: don't put kernel= in HVM config when using xl and libvirt

Setting kernel to hvmloader is ignored in xl but not in libvirt. Libvirt
config converter will translate that then pass it to QEMU. QEMU
complains there is no kernel called hvmloader and exits.

Remove this option for xl and libvirt.  Xl is not affected and libvirt
will be able to create HVM guest. Xend might still need it.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agots-debian-hvm-install: stub out libvirt + ovmf / rombios
Wei Liu [Sun, 8 Feb 2015 16:05:16 +0000 (16:05 +0000)]
ts-debian-hvm-install: stub out libvirt + ovmf / rombios

Libvirt's configuration converter doesn't know how to deal with BIOS
selection. The end result is it always use the default one (seabios).
Stub out ovmf and rombios to avoid false positive results.

This restriction will be removed once libvirt's converter knows how to
deal with BIOS selection.

Note that we don't expect to see such configurations any time soon.
These configurations will be filtered in make-flight. The changes here
are more of an extra level of safety check.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agots-libvirt-build: run libvirt test suite
Wei Liu [Sun, 8 Feb 2015 16:01:57 +0000 (16:01 +0000)]
ts-libvirt-build: run libvirt test suite

We're interested in xlconfigtest.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agots-xen-build-prep: install ebtables
Wei Liu [Sun, 8 Feb 2015 15:59:15 +0000 (15:59 +0000)]
ts-xen-build-prep: install ebtables

Libvirt's test suite needs it.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agosg-run-job: remove save/restore dependency on local migration support
Wei Liu [Sun, 8 Feb 2015 15:44:31 +0000 (15:44 +0000)]
sg-run-job: remove save/restore dependency on local migration support

Since we've introduced different checks for save / restore and local
migration, it's possible to run save / restore tests without running
local migration tests.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agotoolstack: distinguish local and remote migration support
Wei Liu [Tue, 21 Jul 2015 14:38:17 +0000 (15:38 +0100)]
toolstack: distinguish local and remote migration support

Libvirt supports migrating a guest to remote host but not local host.
Distinguish the concept of local migration support and remote migration
support.

Toolstack's migrate_check now takes an extra argument to indicate which
mode we're interested in.

In sg-run-job we still check for local migration support because that's
the implicit target in test-guest-migr. Libvirt will still be blocked.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agotoolstack/libvirt: guest migrate, save and restore support
Wei Liu [Sun, 8 Feb 2015 15:57:01 +0000 (15:57 +0000)]
toolstack/libvirt: guest migrate, save and restore support

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoosstest migrate support check catch -> variables
Ian Jackson [Tue, 16 Dec 2014 12:12:44 +0000 (12:12 +0000)]
osstest migrate support check catch -> variables

The goal here is to skip the following test steps if the check fails.

Instead of using catch to turn an exception into value, we can just
use spawn-ts and reap-ts to do that. This pattern is useful when we add
in extra check for save / restore check later.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
[ wei: write commit message ]
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoIntroduce ts-saverestore-support-check
Wei Liu [Sun, 8 Feb 2015 15:21:52 +0000 (15:21 +0000)]
Introduce ts-saverestore-support-check

We need this script because we're going to separate the concept of save
/ restore and migration later.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agotoolstack: save / restore check
Wei Liu [Sun, 8 Feb 2015 15:20:17 +0000 (15:20 +0000)]
toolstack: save / restore check

Introduce check_for_command function and use it to check save / restore
functionality.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agotarget_run_apt: Correctly escape line wrapping wip.libvirt-v3-base
Ian Campbell [Thu, 23 Jul 2015 16:04:01 +0000 (17:04 +0100)]
target_run_apt: Correctly escape line wrapping

Otherwise the envvars are on the preceding line and therefore not set
in the apt-get process.

I broke this in 6fea4be08306 "apt: lock osstest's usages of apt-get
against each other", committed in January.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agoNo longer export $OSSTEST_CONFIG
Ian Campbell [Mon, 13 Jul 2015 08:11:15 +0000 (09:11 +0100)]
No longer export $OSSTEST_CONFIG

All sites now have a suitable $HOME/.xen-osstest/settings in place
which does this.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agoxl: Use _VerboseCommand for save/restore/migrate
Ian Campbell [Fri, 17 Jul 2015 13:17:34 +0000 (14:17 +0100)]
xl: Use _VerboseCommand for save/restore/migrate

Additional logging is as useful here as for create.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agoMatch $branch against xen-* instead of xen*
Ian Campbell [Fri, 24 Jul 2015 16:20:47 +0000 (17:20 +0100)]
Match $branch against xen-* instead of xen*

In case someone invents a tree `xenblargle'.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agoTestSupport: Avoid use of uninitialised $dtbs warning
Ian Campbell [Fri, 24 Jul 2015 12:55:26 +0000 (13:55 +0100)]
TestSupport: Avoid use of uninitialised $dtbs warning

If $xopts{dtbs} wasn't set then neither was $dtbs.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agosg-report-job-history: Colour host column according to whether it changes
Ian Jackson [Thu, 23 Jul 2015 18:15:06 +0000 (19:15 +0100)]
sg-report-job-history: Colour host column according to whether it changes

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agosg-report-job-history: Introduce report_altchangecolour
Ian Jackson [Thu, 23 Jul 2015 18:10:43 +0000 (19:10 +0100)]
sg-report-job-history: Introduce report_altchangecolour

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agocs-bisection-step: Fix memoisation of search_compute_length_at
Ian Jackson [Thu, 23 Jul 2015 16:31:52 +0000 (17:31 +0100)]
cs-bisection-step: Fix memoisation of search_compute_length_at

There was a half-implemented memoisation.  Memoisation is necessary
because otherwise the algorithm is exponential in the commit history
depth (with base equal to the commit parent fanout).

Sort this out:
 * Break out the actual computation into a new
   search_compute_length_at_intern
 * Deleting the individual memo assignments, which incidentally
   means we no longer miss an (unimportant) one.
 * Actually having the new memoising function search_compute_length_at
   check $n->{LengthAt} (this is the bugfix).

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoFlight restriction: Honour --exclude-flights=F1,F2,...
Ian Jackson [Thu, 23 Jul 2015 17:40:37 +0000 (18:40 +0100)]
Flight restriction: Honour --exclude-flights=F1,F2,...

To reproduce a recent bisection problem I needed to exclude not just
all flights after a certain number, but also one earlier flight.  So I
invented this option (and associated yaks).

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoFlight restriction: Change implementation of --max-flight
Ian Jackson [Thu, 23 Jul 2015 17:32:16 +0000 (18:32 +0100)]
Flight restriction: Change implementation of --max-flight

Abolish $maxflight.  All the users outside Osstest::Executive have
been eliminated, so this is fine.  Replace it with
$restrictflight_cond, which can accumulate multiple conditions.

There is a minor functional change: when multiple --max-flight options
are specified, _all_ of them take effect (effectively using the lowest
value).  That option is not used in production, and I don't expect
people elsewhere to be passing multiple different such options.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoFlight restriction: Make report_blessingscond use implicit $maxflight
Ian Jackson [Thu, 23 Jul 2015 16:54:53 +0000 (17:54 +0100)]
Flight restriction: Make report_blessingscond use implicit $maxflight

We have $maxflight in Osstest::Executive now, set appropriately.

Use that in report_blessingscond and all its callers including
report_find_push_age_info and hence in mg-all-branch-statuses and
sg-report-flight and sg-report-job-history.

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoFlight restriction: Update sg-report-flight and sg-report-job-history
Ian Jackson [Thu, 23 Jul 2015 16:57:07 +0000 (17:57 +0100)]
Flight restriction: Update sg-report-flight and sg-report-job-history

Use restrictflight_arg in both these functions.  They still use
$maxflight directly, passing it to report_blessingscond; that will
change in a moment.

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoFlight restriction: Update cs-bisection-step
Ian Jackson [Thu, 23 Jul 2015 17:01:22 +0000 (18:01 +0100)]
Flight restriction: Update cs-bisection-step

Use restrictflight_arg and restrictflight_cond.

This entails replacing $maxflight_cond (which is empty or contains a
series of texts each starting with AND) with $restrictflight_cond
(which is actually an expression, and might be just "TRUE").

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoFlight restriction: Introduce restrictflight_arg and restrictflight_cond
Ian Jackson [Thu, 23 Jul 2015 16:38:27 +0000 (17:38 +0100)]
Flight restriction: Introduce restrictflight_arg and restrictflight_cond

Provide the new functions which we will eventually use everywhere.

* Introduce restrictflight_arg which can be used in an argument loop.
* Introduce restrictflight_cond which generates a SQL condition.
* Have restrictflight_cond's value include surrounding ( ) for safety.
* Use the above in sg-report-host-history, renaming $maxflightcond.

No overall functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoFlight restriction: Move $maxflight to Osstest::Executive
Ian Jackson [Thu, 23 Jul 2015 17:20:33 +0000 (18:20 +0100)]
Flight restriction: Move $maxflight to Osstest::Executive

We are going to move the interpretation of --max-flight into
Osstest::Executive.  Start this by making $maxflight shared between
Executive and the main program.  Later, we will make it no longer
exported.

There are a number of places in Executive where a `my' variable
$maxflight shadows the newly moved global.  These will be got rid of
later, too.

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agomake-distros-flight: Use ftp.debian.org directly
Ian Campbell [Wed, 8 Jul 2015 12:31:02 +0000 (13:31 +0100)]
make-distros-flight: Use ftp.debian.org directly

The local proxy seems to serve stale packages for Jessie etc, I blame
the intercepting cache on the way out of our network, similar to
b5f15136900d "mg-debian-installer-update: workaround caching proxies",
except it is between the apt-cache and the world not the osstest vm
and the world.

Since the netboot kernel+initrd are reasonably small, these flights
are infrequent and they are intended to test the current upstream
version I think this is tollerable.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agoAdd testing of file backed disk formats
Ian Campbell [Wed, 8 Jul 2015 12:31:01 +0000 (13:31 +0100)]
Add testing of file backed disk formats

xen-create-image makes this tricky to do since it is rather LVM
centric. Now that we have the ability to install from d-i it's
possible to arrange fairly easily that they use something other than
a phy backend over a bare LVM device.

Here we add support to the test script and infra and create a bunch of
new jobs testing the cross product of {xl,libvirt} x {raw,qcow2,vhd}.

A disk format of "raw" means a raw backing file, where as "none" (the
default) means to continue to use the base LVM device.

The test scripts are modified such that when constructing a domain
with a diskfmt runvar specifeies a file backed disk format (i.e. not
"none"):

 - the LVM device is slightly enlarged to account for file format
   headers (1M should be plenty).
 - the LVM device will have an ext3 filesystem created on it instead
   of being used as a phy device for the guest. Reusing the LVM volume
   in this way means we don't need to do more storage management in
   dom0 (i.e. arranging for / to be large enough, or managing a
   special "images" LV)
 - the relevant type of container is created within the filesystem
   using the appropriate tool.
 - New properties Disk{fmt,spec} are added to all $gho, containing
   the format used for the root disk and the xl diskspec to load it.
     - lvm backed guests use a xend/xm compatible spec, everything
       else uses the improved xl syntax which libvirt also supports.
       We won't test non-LVM on xend.
 - New properties Disk{mnt,img} are added to $gho which are not using
   LVM. These contain the mount point to use (configurable via
   OSSTEST_CONFIG and runvars) and the full path (including mount
   point) to the image itself.
 - When starting or stopping a guest we arrange for the filesystem to
   be (u)mounted.
     - The prepearation when starting a guest copes gracefully with
       the disk already being prepared.
     - Hooks are called from guest_create() and guest_destroy() to
       manipulate the disk as needed.

Using standalong-generate-dump-flight-runvars a representative set of
runvars is:
+test-amd64-amd64-xl-qcow2                     all_hostflags               arch-amd64,arch-xen-amd64,suite-wheezy,purpose-test
+test-amd64-amd64-xl-qcow2                     arch                        amd64
+test-amd64-amd64-xl-qcow2                     buildjob                    build-amd64
+test-amd64-amd64-xl-qcow2                     debian_arch                 amd64
+test-amd64-amd64-xl-qcow2                     debian_bootloader           pygrub
+test-amd64-amd64-xl-qcow2                     debian_diskfmt              qcow2
+test-amd64-amd64-xl-qcow2                     debian_kernkind             pvops
+test-amd64-amd64-xl-qcow2                     debian_method               netboot
+test-amd64-amd64-xl-qcow2                     debian_suite                wheezy
+test-amd64-amd64-xl-qcow2                     kernbuildjob                build-amd64-pvops
+test-amd64-amd64-xl-qcow2                     kernkind                    pvops
+test-amd64-amd64-xl-qcow2                     toolstack                   xl
+test-amd64-amd64-xl-qcow2                     xenbuildjob                 build-amd64

Compared to test-amd64-amd64-pygrub (which is the most similar job) and
normalising the test name the difference is:
 test-amd64-amd64-SUFFIX                       all_hostflags               arch-amd64,arch-xen-amd64,suite-wheezy,purpose-test
 test-amd64-amd64-SUFFIX                       arch                        amd64
 test-amd64-amd64-SUFFIX                       buildjob                    build-amd64
 test-amd64-amd64-SUFFIX                       debian_arch                 amd64
 test-amd64-amd64-SUFFIX                       debian_bootloader           pygrub
+test-amd64-amd64-SUFFIX                       debian_diskfmt              qcow2
+test-amd64-amd64-SUFFIX                       debian_kernkind             pvops
 test-amd64-amd64-SUFFIX                       debian_method               netboot
 test-amd64-amd64-SUFFIX                       debian_suite                wheezy
 test-amd64-amd64-SUFFIX                       kernbuildjob                build-amd64-pvops
 test-amd64-amd64-SUFFIX                       kernkind                    pvops
 test-amd64-amd64-SUFFIX                       toolstack                   xl
 test-amd64-amd64-SUFFIX                       xenbuildjob                 build-amd64

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agomake-flight: refactor PV debian tests
Ian Campbell [Wed, 8 Jul 2015 12:31:00 +0000 (13:31 +0100)]
make-flight: refactor PV debian tests

No functional change, standalone-generate-dump-flight-runvars confirms
no change to the runvars.

Includes a hook which is not used yet, $recipe_sfx.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agots-debian-di-install: Refactor root_disk specification
Ian Campbell [Wed, 8 Jul 2015 12:30:59 +0000 (13:30 +0100)]
ts-debian-di-install: Refactor root_disk specification

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agoDebian: Handle lack of bootloader support in d-i on ARM.
Ian Campbell [Wed, 8 Jul 2015 12:30:58 +0000 (13:30 +0100)]
Debian: Handle lack of bootloader support in d-i on ARM.

Debian doesn't currently know what bootloader to install in a Xen
guest on ARM. We install pv-grub-menu above which actually does what
we need, but the installer doesn't treat that as a "bootloader".

Most ARM platforms end up installing a u-boot boot.scr, based on a
platform whitelist. This doesn't seem appropriate for us. Grub is not
available for arm32. For arm64 we will eventually end up with in-guest
UEFI and therefore grub-efi and things will work normally. I'm not
sure what the answer is going to be for arm32.

This patch enables the workaround for Wheezy, Jessie and Sid,
post-Jessie should be enabled as we add them. (Pre-wheezy does not
support running as a Xen guest on ARM so we don't test them at all).

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agodistros: Run one suite per day on a weekly basis
Ian Campbell [Wed, 8 Jul 2015 12:30:57 +0000 (13:30 +0100)]
distros: Run one suite per day on a weekly basis

Once a week should be sufficient for these tests. Perhaps in the
future we will want to increase the frequency for the suites under
active development (testing, unstable)

For now run this on the Citrix Cambridge instance until the XenProject
instance has sufficient capacity.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agocrontab-cambridge: Use hard tabs for alignment.
Ian Campbell [Wed, 8 Jul 2015 12:30:56 +0000 (13:30 +0100)]
crontab-cambridge: Use hard tabs for alignment.

Also quote the value of BRANCHES=.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agodistros: add branch infrastructure
Ian Campbell [Wed, 8 Jul 2015 12:30:55 +0000 (13:30 +0100)]
distros: add branch infrastructure

Since the distro nightlies are not version controlled we cannot use
the usual mechanisms for detecting regressions. Special case things
appropriately. We use an OLD_REVISION of "flight-NNN" to signify that
the old revision is another flight and not a tree revision.

A grep over $NEW_REVISION needed adjusting since NEW_REVISION is empty
in this mode, leading to "grep <filename>" which hangs waiting for
stdin.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agoTest pygrub and pvgrub on the regular flights
Ian Campbell [Wed, 8 Jul 2015 12:30:54 +0000 (13:30 +0100)]
Test pygrub and pvgrub on the regular flights

Since we now have the ability to test these drop one of each of
pygrub, pvgrub-32 and pvgrub-64 into the standard flights. Omitting
the {Guest}_diver runvar causes ts-debian-di-install to use the d-i
images in the location configured via TftpDiVersion, so they are
Version Controlled along with the d-i version used for the host.

This adds three new jobs:

+test-amd64-amd64-amd64-pvgrub                 all_hostflags               arch-amd64,arch-xen-amd64,suite-wheezy,purpose-test
+test-amd64-amd64-amd64-pvgrub                 arch                        amd64
+test-amd64-amd64-amd64-pvgrub                 buildjob                    build-amd64
+test-amd64-amd64-amd64-pvgrub                 debian_arch                 amd64
+test-amd64-amd64-amd64-pvgrub                 debian_bootloader           pvgrub
+test-amd64-amd64-amd64-pvgrub                 debian_method               netboot
+test-amd64-amd64-amd64-pvgrub                 debian_suite                wheezy
+test-amd64-amd64-amd64-pvgrub                 kernbuildjob                build-amd64-pvops
+test-amd64-amd64-amd64-pvgrub                 kernkind                    pvops
+test-amd64-amd64-amd64-pvgrub                 toolstack                   xl
+test-amd64-amd64-amd64-pvgrub                 xenbuildjob                 build-amd64

+test-amd64-amd64-i386-pvgrub                  all_hostflags               arch-amd64,arch-xen-amd64,suite-wheezy,purpose-test
+test-amd64-amd64-i386-pvgrub                  arch                        amd64
+test-amd64-amd64-i386-pvgrub                  buildjob                    build-amd64
+test-amd64-amd64-i386-pvgrub                  debian_arch                 i386
+test-amd64-amd64-i386-pvgrub                  debian_bootloader           pvgrub
+test-amd64-amd64-i386-pvgrub                  debian_method               netboot
+test-amd64-amd64-i386-pvgrub                  debian_suite                wheezy
+test-amd64-amd64-i386-pvgrub                  kernbuildjob                build-amd64-pvops
+test-amd64-amd64-i386-pvgrub                  kernkind                    pvops
+test-amd64-amd64-i386-pvgrub                  toolstack                   xl
+test-amd64-amd64-i386-pvgrub                  xenbuildjob                 build-amd64

+test-amd64-amd64-pygrub                       all_hostflags               arch-amd64,arch-xen-amd64,suite-wheezy,purpose-test
+test-amd64-amd64-pygrub                       arch                        amd64
+test-amd64-amd64-pygrub                       buildjob                    build-amd64
+test-amd64-amd64-pygrub                       debian_arch                 amd64
+test-amd64-amd64-pygrub                       debian_bootloader           pygrub
+test-amd64-amd64-pygrub                       debian_method               netboot
+test-amd64-amd64-pygrub                       debian_suite                wheezy
+test-amd64-amd64-pygrub                       kernbuildjob                build-amd64-pvops
+test-amd64-amd64-pygrub                       kernkind                    pvops
+test-amd64-amd64-pygrub                       toolstack                   xl
+test-amd64-amd64-pygrub                       xenbuildjob                 build-amd64

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agodistros: Support pvgrub for Wheezy too.
Ian Campbell [Wed, 8 Jul 2015 12:30:53 +0000 (13:30 +0100)]
distros: Support pvgrub for Wheezy too.

This requires us to install pv-grub-menu from backports, which we do
using a late_command.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
[ ijc -- dropped unnecessary quoting of comment in heredoc ]

9 years agodistros: support booting Debian PV (d-i installed) guests with pvgrub.
Ian Campbell [Wed, 8 Jul 2015 12:30:52 +0000 (13:30 +0100)]
distros: support booting Debian PV (d-i installed) guests with pvgrub.

This requires the use of the pv-grub-menu package which is in Jessie
onwards.  (it is in wheezy-backports which is the subject of a
subsequent patch).

The bootloader to use is specified via a runvar {Guest}_bootloader.

Adjust make-distros-flight to use pvgrub for some subset of i386 and
amd64 guests to get coverage.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agodistros: add support for installing Debian PV guests via d-i, flight and jobs
Ian Campbell [Wed, 8 Jul 2015 12:30:51 +0000 (13:30 +0100)]
distros: add support for installing Debian PV guests via d-i, flight and jobs

This patch introduces ts-debian-di-install which can install Debian
from a netboot (PXE) debian installer image. By default it installs
from the d-i image used by osstest (using the special Xen PV guest
enabled flavour where necessary) but it can also fetch the kernel and
ramdisk from URLs specified in runvars. The resulting guests boot the
distro kernel using pygrub (pvgrub will follow).

The distros flights differ substantially from the existing flights.
Introduce make-distros-flight using the functionality previously
refactored into mfi-common. The new flight tests all versions of
Debian from Squeeze onward as an amd64, i386 and armhf guests (armhf
from Jessie onwards only) using the usual smoke tests.

Test names are suffixed -pygrub pending the addition of pvgrub
variants in a future commit.

Add the new cases to sg-run-job

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agoTestSupport: Add helper to fetch a URL on a host
Ian Campbell [Wed, 8 Jul 2015 12:30:50 +0000 (13:30 +0100)]
TestSupport: Add helper to fetch a URL on a host

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agomfi-common: Allow make-*flight to filter the set of build jobs to include
Ian Campbell [Wed, 8 Jul 2015 12:30:49 +0000 (13:30 +0100)]
mfi-common: Allow make-*flight to filter the set of build jobs to include

By using the same job_create_build(_filter_callback) scheme used for
the test jobs.

Will be used in make-distros-flight.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agocri-bisect: Provide --html-dir= option introducer
Ian Jackson [Thu, 16 Jul 2015 14:53:43 +0000 (15:53 +0100)]
cri-bisect: Provide --html-dir= option introducer

Since 0caf39e6 "Reporting: Make HTML reports for bisection flights too"
we have been running
  ./sg-report-flight /home/logs/logs/59620/ 59620
which is no good.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agomg-list-all-branches: Sort branches according to any embedded version
Ian Campbell [Mon, 13 Jul 2015 08:13:06 +0000 (09:13 +0100)]
mg-list-all-branches: Sort branches according to any embedded version

Many of our branches include a version number, this change results in
e.g. linux-3.0 < linux-3.4 < linux-3.10 rather than linux-3.0 <
linux-3.10 < linux-3.4, which is more natural for uses such as
./mg-all-branch-statuses.

Requires Sort::Versions (Debian package libsort-versions-perl).

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agoINSTALL.production: Start writing some stuff down
Ian Campbell [Mon, 13 Jul 2015 08:12:29 +0000 (09:12 +0100)]
INSTALL.production: Start writing some stuff down

I wrote this ages ago while migrating the Cambridge instance to a new
VM and then forgot about it. It's incomplete and I'm not sure where I
was planning to go next, but better than nothing maybe?

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agots-windows-install: Bump RAM from 512M to 1536M
Ian Jackson [Thu, 16 Jul 2015 10:29:00 +0000 (11:29 +0100)]
ts-windows-install: Bump RAM from 512M to 1536M

Sadly we lack a proper infrastructure for handing guest memory size
and fitting it into the host.  We don't currently even have in our
database the amount of RAM the host has.

The recommended minimum for Windows is 2Gby.  But we have (in the
Cambridge instance) some hosts which only have 4Gby.  We allow 512 for
dom0.  We need to leave some spare for Xen and other overheads.  So
set this to 1536 (1.5Gby) which should fit even during localhost
migration.

Later we may want to do something more sophisticated, like adjusting
this to 2048 if the host has enough, or only running the test on
bigger hosts, or something.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
CC: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v2: 1536 not 1700.
    Mention migration in the commit message.

9 years agoMerge branch 'from-cambridge/2015-07-13' into master
Ian Jackson [Mon, 13 Jul 2015 17:02:05 +0000 (18:02 +0100)]
Merge branch 'from-cambridge/2015-07-13' into master

9 years agoAutomerge of git://xenbits.xen.org/osstest.git master into production
xen.org [Sat, 11 Jul 2015 07:35:43 +0000 (08:35 +0100)]
Automerge of git://xenbits.xen.org/osstest.git master into production

9 years agomake-flight: Only test ovmf guests on ovmf flight
Ian Campbell [Tue, 7 Jul 2015 16:26:45 +0000 (17:26 +0100)]
make-flight: Only test ovmf guests on ovmf flight

Specifically drop all of the following test jobs from the ovmf flight:

-test-amd64-amd64-xl-qemuu-debianhvm-amd64
-test-amd64-amd64-xl-qemuu-debianhvm-amd64-xsm
-test-amd64-amd64-xl-qemuu-win7-amd64
-test-amd64-amd64-xl-qemuu-winxpsp3
-test-amd64-i386-qemuu-rhel6hvm-amd
-test-amd64-i386-qemuu-rhel6hvm-intel
-test-amd64-i386-xl-qemuu-debianhvm-amd64
-test-amd64-i386-xl-qemuu-debianhvm-amd64-xsm
-test-amd64-i386-xl-qemuu-win7-amd64
-test-amd64-i386-xl-qemuu-winxpsp3
-test-amd64-i386-xl-qemuu-winxpsp3-vcpus1

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agomg-all-branch-statuses: Show how up to date each branch is
Ian Campbell [Thu, 9 Jul 2015 14:30:36 +0000 (15:30 +0100)]
mg-all-branch-statuses: Show how up to date each branch is

Using report_find_push_age_info allows us to provide counts of
attempts since the last baseline on current tip as well as the first
attempt of each of those.

Since everything serialises on the repo lock I didn't bother trying to
parallelise anything.

It's a little terse to keep it in 80 chars.

cron infrastructure is added to run this in a new
$HOME/for-maintjobs.git on a daily basis and push the output to the
location given in the Publish config variable, if it is set (it is set
in production but not for cambridge).

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agocr-publish-flight-logs: allow publishing only the Results
Ian Campbell [Thu, 9 Jul 2015 14:30:35 +0000 (15:30 +0100)]
cr-publish-flight-logs: allow publishing only the Results

Removing the requirement that a flight be provided allows this to be
used to publish the results directory even in contexts which have no
flight.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agoAllow rumpkernel xenstorels.test failures for all but rumpuserxen branch
Ian Campbell [Thu, 9 Jul 2015 08:45:29 +0000 (09:45 +0100)]
Allow rumpkernel xenstorels.test failures for all but rumpuserxen branch

This test has a long standing heisenbug which even doing 150
iterations is not reliable at detecting. It is unlikely to be fixed
until the long-standing rumpkernel build rework is completed.

So lets mark it as an allowable failure for now, except in the
rumpuserxen branch tests themselves.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agoAutomerge of git://xenbits.xen.org/osstest.git master into production
xen.org [Thu, 9 Jul 2015 17:34:59 +0000 (18:34 +0100)]
Automerge of git://xenbits.xen.org/osstest.git master into production

9 years agoJobDB/Executive: Improve an internal `die' error
Ian Jackson [Mon, 6 Jul 2015 10:20:28 +0000 (11:20 +0100)]
JobDB/Executive: Improve an internal `die' error

When this assertion fails, dump the troublesome harness revision and
requested host flags, too.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agomg-branch-setup: Get the direction of the tree-bisect link right
Ian Jackson [Mon, 6 Jul 2015 10:08:10 +0000 (11:08 +0100)]
mg-branch-setup: Get the direction of the tree-bisect link right

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoReporting: Make HTML reports for bisection flights too
Ian Jackson [Fri, 3 Jul 2015 18:30:45 +0000 (19:30 +0100)]
Reporting: Make HTML reports for bisection flights too

Provide an appropriate --html-dir option to sg-report-flight.
(Bisection flights still do not run sg-report-host-history and
sg-report-job-history, which are fairly expensive.)

Make references to jobs from sg-report-job-history and
sg-report-host-history go to the /info.html page, not the webserver
directory listing.  (sg-report-flight's references already do.)

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoEmail reports: Sort out recipients and Reply-to
Ian Jackson [Wed, 1 Jul 2015 14:49:35 +0000 (15:49 +0100)]
Email reports: Sort out recipients and Reply-to

No longer send reports, or copies, to named individuals.  Instead,
send all output to 1. appropriate development mailing lists 2. the new
osstest-admin@xenproject administrator alias, and 3. Bcc the new
osstest-output list.

Bisection progress emails go only to osstest-output.  In this case we
provide a Reply-To.

After this patch goes live, people interested in bisection progress
emails will find them in osstest-output.  (There are a lot of these.)
Such people can also subscribe to osstest-output and get copies of
only the main test reports and then use recipient-side filtering to
see the ones they find interesting.

(Configurations for `adhoc' and `play' runs remain unchanged and still
have a tendency to refer to my personal address @citrix.)

Deployment notes:

Keir and Stefano will no longer receive automatic CCs of certain
reports, and should subscribe to the osstest-output list, with
appropriate filtering, if they care.

The new osstest-output list has (I think) been configured to accept
the BCCs.

My personal chiark mail-to-news gateway has already been subscribed to
osstest-output.

One substantial change is that the osstest admin now gets copies of
each final bisection failure.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
CC: keir@xen.org
CC: stefano.stabellini@eu.citrix.com
CC: Lars Kurth <lars.kurth@citrix.com>
9 years agoap-fetch-version: Arrange for osstest merges from upstream to be stable
Ian Campbell [Thu, 2 Jul 2015 12:44:32 +0000 (13:44 +0100)]
ap-fetch-version: Arrange for osstest merges from upstream to be stable

If a downstream osstest instance has nothing to test it its local
pretest then it will attempt to merge from the upstream instance. If
this fails then it will try again and again generating a new merge
commit each time, even if upstream has not moved.

It is desirable that these merges instead be stable i.e. the same if
the inputs have not changed. This is good for potential bisection
attempts, history reporting/mining as well as just being sensible.

Here we arrange for this by recording the last merge "epoch" (being
the first merge of the current input branches) in a new branch
"merge-epoch" in the local testing.git and comparing our fresh merge
against it.

If the tree and parents are the same then the merge is effectively
identical (it may/will differ in the date) and we reuse the epoch
merge.

If they new merge does not match then something has changed (i.e.
upstream has moved on) and so we take the new merge and establish a
new epoch.

Add a couple of ">&2" to some fetches to prevent anything other than
the desired SHA1 leaking onto stdout.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
9 years agots-debian-hvm-install: Arrange for installed guest to use a serial console
Ian Campbell [Mon, 6 Jul 2015 13:45:12 +0000 (14:45 +0100)]
ts-debian-hvm-install: Arrange for installed guest to use a serial console

So that the guest boot will be logged somewhere useful (the qemu-dm
log).

It still seems to pickup a "quiet" from somewhere, so it's not as
useful as it might be, but it is an improvement.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agoWhen invoking xl create do so verbosely
Ian Campbell [Mon, 6 Jul 2015 13:45:11 +0000 (14:45 +0100)]
When invoking xl create do so verbosely

xend.pm inherits from xl.pm, but I don't know what (if any) support
for verbosity it has, so the xm invocation is unchanged.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agomg-update-live: New script
Ian Jackson [Fri, 3 Jul 2015 11:00:24 +0000 (12:00 +0100)]
mg-update-live: New script

This is for deploying an emergency update under the feet of all
running tests.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
9 years agots-logs-capture: Explicitly set xenctx capture filename
Ian Jackson [Fri, 3 Jul 2015 11:22:52 +0000 (12:22 +0100)]
ts-logs-capture: Explicitly set xenctx capture filename

Now that the command contains PATH, the autogenerated filename is very
ugly.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v2: New patch in this version of the series.

9 years agots-logs-capture: Run xenctx twice for each guest vcpu
Ian Jackson [Fri, 3 Jul 2015 11:15:18 +0000 (12:15 +0100)]
ts-logs-capture: Run xenctx twice for each guest vcpu

Two (or more) back-to-back ctxt's can often be useful, by giving a
snapshot of a loop the guest is stuck in.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v2: New patch in this series.

9 years agots-logs-capture: Run xenctx earlier
Ian Jackson [Thu, 2 Jul 2015 17:05:25 +0000 (18:05 +0100)]
ts-logs-capture: Run xenctx earlier

Break fetch_xenctx_guest out into its own function, and run it before
serial_fetch_logs.

This is relevant because serial_fetch_logs sends the Xen debug keys,
which might dislodge a stuck guest - and, if it does, we would like to
have captured the stuck state with xenctx, rather than the unstuck
one.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agots-logs-capture: Break out guest listing and do it earlier
Ian Jackson [Thu, 2 Jul 2015 17:01:52 +0000 (18:01 +0100)]
ts-logs-capture: Break out guest listing and do it earlier

Break out the function find_guests from what was
fetch_logs_host_guests, and have it save its results in the @guests
global.

We do this soon because in the next patch we are going to want to
do something to each guest before we call serial_fetch_logs.

The loop containing fetch_logs_guest is now in the main program.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agots-logs-capture: Find xenctx in /usr/local as well
Ian Jackson [Thu, 2 Jul 2015 16:55:31 +0000 (17:55 +0100)]
ts-logs-capture: Find xenctx in /usr/local as well

xenctx is now in /usr/local/lib/xen/bin/xenctx.
                     ^^^^^^
Find it by setting PATH in the shell command.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoguest_find_domid: Set Vcpus correctly.
Ian Jackson [Thu, 2 Jul 2015 16:54:38 +0000 (17:54 +0100)]
guest_find_domid: Set Vcpus correctly.

The regexp was wrong, resulting in the last digit of the memory being
mistaken for the number of vcpus (!)

The only consumer of this is ts-logs-capture.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agosg-report-flight: Fix --include (broken by 3d56a191)
Ian Jackson [Fri, 3 Jul 2015 10:06:40 +0000 (11:06 +0100)]
sg-report-flight: Fix --include (broken by 3d56a191)

In 3d56a191 "sg-report-flight: Make bodyprint[f] defer the output" it
became wrong for anything in the main printout part of
sg-report-flight to write directly to STDOUT.  However, the two (very
similar) bits of code for handling the two kinds of --include still
used cat.

The result is emails looking like this:

  From: osstest service owner <osstest-admin@xenproject.org>
  To: <xen-devel@lists.xensource.com>, <rumpkernel-builds@freelists.org>
CC: <ian.jackson@eu.citrix.com>
  Subject: [rumpuserxen test] People who touched revisions under test:
    Alice Bob <alice@example.com>
    Ian Jackson <Ian.Jackson@eu.citrix.com>
    Carol David <carol@example.com>
  Date: Fri, 3 Jul 2015 06:50:53 +0000

  flight 59037 rumpuserxen real [real]

Fix this by replacing those two near-identical bits of code with calls
to a single function which slurps the required include file into the
body text accumulation variable.

(There is no need to provide a facility for header includes, since
there is no need for a caller to pass headers through
sg-report-flight: they can simply be written into the output file
before running sg-report-flight, as indeed the string `Subject: ' is.

Despite the fact that --include-begin is used only by cr-daily-branch
which passes it a file `heading', the text is intended for the start
of the body, not the email headers.)

I have run

  ./sg-report-flight --include-begin=header --include=bodyinc --this-xen=e13013dbf1d5997915548a3b5f1c39594d8c1d7b --that-xen=84066dd4ef4bb5983e246c629a26ef4f3394e5d5 --html-dir=$HOME/public_html/d --max-flight=37590 37590

with some suitable lorem ipsum in bodyinc and header and observed:

(a) The bug introduced in 3d56a191 is visible in 3c464fbf.

(b) The output after this patch differs from the output produced by
1f0c168d (the previous osstest production commit) only in addition of
the `Last test of basis' and `Testing same since' information, in the
appropriate place.

Deployment note: Because this patch changes only sg-report-flight, it
is safe to deploy under the feet of a running flight.  I intend to do
this for all the production branches in the colo.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
9 years agosg-report-flight: Link from runvars to other jobs
Ian Jackson [Wed, 1 Jul 2015 11:53:50 +0000 (12:53 +0100)]
sg-report-flight: Link from runvars to other jobs

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v2: Fix grammar in subject line

9 years agosg-report-flight: Link from runvars to host histories
Ian Jackson [Wed, 1 Jul 2015 11:22:36 +0000 (12:22 +0100)]
sg-report-flight: Link from runvars to host histories

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agosg-report-flight: Convenience aliases for runvar row
Ian Jackson [Wed, 1 Jul 2015 11:21:49 +0000 (12:21 +0100)]
sg-report-flight: Convenience aliases for runvar row

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agosg-report-job-history: Show osstest version too
Ian Jackson [Wed, 1 Jul 2015 10:36:06 +0000 (11:36 +0100)]
sg-report-job-history: Show osstest version too

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agosg-report-job-history: No longer use TestSupport
Ian Jackson [Wed, 1 Jul 2015 11:33:25 +0000 (12:33 +0100)]
sg-report-job-history: No longer use TestSupport

This is for test jobs and not appropriate for a reporting script.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoMove flight_otherjob to Osstest.pm
Ian Jackson [Wed, 1 Jul 2015 11:32:43 +0000 (12:32 +0100)]
Move flight_otherjob to Osstest.pm

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agomake-flight etc.: stop testing SEDF at all
Dario Faggioli [Tue, 30 Jun 2015 17:36:59 +0000 (19:36 +0200)]
make-flight etc.: stop testing SEDF at all

SEDF has been broken and unmaintained at least until Xen 4.2, and most
likely even before! Tests are failing without anyonce caring, and yet
we're keeping using test resources for them.

Let's stop doing this!

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agoEmails: Provide X-Osstest-Failures
Ian Jackson [Tue, 30 Jun 2015 13:31:28 +0000 (14:31 +0100)]
Emails: Provide X-Osstest-Failures

Specifically:
 * $cat now contains SORTLETTER BLOCKSTATUS DESCRIPTION...
 * Rewrap the lines setting $cat
 * Add $notsucceeds{$cat}[][2] containing one line for the new header
 * Generate the new header
 * Document the new header

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoEmails: Provide X-Osstest-Versions-This and That headers
Ian Jackson [Tue, 30 Jun 2015 13:29:21 +0000 (14:29 +0100)]
Emails: Provide X-Osstest-Versions-This and That headers

Specifically:
 * Provide headerprint() in sg-report-flight
 * Use it to add X-Osstest-Versions headers based on %specver
 * Cause cr-daily-branch to always enable the feature
 * Document this in README.email

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v2: Document This and That

9 years agoEmails: Provide README.email and link to it
Ian Jackson [Tue, 30 Jun 2015 13:17:05 +0000 (14:17 +0100)]
Emails: Provide README.email and link to it

Also link to README, from the email footer.

I have tested that the link to README works right now.  The link to
README.email does not yet, of course, but it will start to work when
osstest pushes this change to production.

CC: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agosg-report-flight: Make bodyprint[f] defer the output
Ian Jackson [Tue, 30 Jun 2015 10:11:00 +0000 (11:11 +0100)]
sg-report-flight: Make bodyprint[f] defer the output

Provide and use variables $header_text and $body_text.

Still no functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agosg-report-flight: Use `bodyprint' and `bodyprintf'
Ian Jackson [Tue, 30 Jun 2015 10:08:37 +0000 (11:08 +0100)]
sg-report-flight: Use `bodyprint' and `bodyprintf'

This will allows us to divert the output so that we can (optionally)
produce email headers too.  We move the error checking into the
function, obviously.

For now, this is a simple replacement with no functional change,
except that some call sites now have error checking which previously
did not.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoReporting: sg-report-flight: Put overall pushgate stats in email
Ian Jackson [Mon, 29 Jun 2015 17:06:11 +0000 (18:06 +0100)]
Reporting: sg-report-flight: Put overall pushgate stats in email

This adds something like this (would have appeared in 37638):

  Last test of basis    37629  2015-06-24 21:36:10 Z    4 days
  Failing since         37630  2015-06-26 10:35:44 Z    3 days    9 attempts
  Testing same since    37635  2015-06-28 03:05:56 Z    1 days    4 attempts

or this (would have appeared in 37629):

  Last test of basis    37617  2015-06-20 04:06:01 Z    9 days
  Testing same since    37628  2015-06-24 13:35:23 Z    5 days    2 attempts

(Both examples from the Cambridge instance.)

This is added just after the versions are reported.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v2: Swap order of `Failing since' and `Testing same since' output lines
v3: Actually return when no pushgate summary wanted.

9 years agoReporting: Provide report_find_push_age_info
Ian Jackson [Mon, 29 Jun 2015 16:40:38 +0000 (17:40 +0100)]
Reporting: Provide report_find_push_age_info

This utility function provides information about how far behind the
push gate is right now.

I have tested it with this rune in the Cambridge instance:

  perl -we 'use Osstest::Executive; use Osstest; use Data::Dumper; open DEBUG, ">&STDERR" or die $!; csreadconfig(); print Dumper report_find_push_age_info([qw(real)], undef, [qw(osstest linux-next)], "osstest", "280a18b2b2612174e473a1c1a137ddd47c49aab9", "cc8b79ce9586d2b0fbddbd4260e876eab1d408d4")'

Currently it produces this output:

$VAR1 = {
          'CountTip' => '4',
          'FirstTip' => {
                          'flight' => 37635,
                          'intended' => 'real',
                          'blessing' => 'real',
                          'started' => 1435460756,
                          'branch' => 'osstest'
                        },
          'LastTip' => {
                         'flight' => 37638,
                         'intended' => 'real',
                         'blessing' => 'real',
                         'started' => 1435538150,
                         'branch' => 'osstest'
                       },
          'Basis' => {
                       'flight' => 37629,
                       'intended' => 'real',
                       'blessing' => 'real',
                       'started' => 1435181770,
                       'branch' => 'osstest'
                     },
          'FirstAfterBasis' => {
                                 'flight' => 37630,
                                 'intended' => 'real',
                                 'blessing' => 'real',
                                 'started' => 1435314944,
                                 'branch' => 'osstest'
                               },
          'CountAfterBasis' => '9'
        };

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v3: Fix bug resulting in  ERROR:  missing FROM-clause entry for table "r"

9 years agoReporting: In history tables, show multiple failure steps
Ian Jackson [Mon, 29 Jun 2015 15:46:36 +0000 (16:46 +0100)]
Reporting: In history tables, show multiple failure steps

In report_run_getinfo, used by sg-report-job-history and
sg-report-host-history, make provision for reporting multiple failed
steps.

The failed steps are put side by side (in a single table cell).  The
cell background is set by the job status, but the individual steps may
vary their colour, as seen in this example:
  http://xenbits.xen.org/people/iwj/2015/linux-next.html

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v2: Remove unnecessary space in ColourAttr

9 years agoReporting: Break out report_blessingscond
Ian Jackson [Mon, 29 Jun 2015 15:23:08 +0000 (16:23 +0100)]
Reporting: Break out report_blessingscond

The returned SQL is a self-contained expression, and does not require
additional bind parameters.  To spot SQL quoting problems, we die if
a blessing is not reasonable.

The use sites of the $blessingcond in sg-report-flight are adjusted to
no longer pass @blessings to execute.

No overall functional change with reasonable blessings.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoReporting: report_run_getinfo produces Content
Ian Jackson [Mon, 29 Jun 2015 14:55:13 +0000 (15:55 +0100)]
Reporting: report_run_getinfo produces Content

Previously we produced Summary, and the call sites were confused about
whether it had already been html-escaped.  Now we produce something
which is explicitly already html.

No functional change except that some sg-report-host-history output is
escaped as it ought to have been (but this is only relevant if the
database contains strange things which none of ours do).

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoReporting: report_run_getinfo produces ColourAttr
Ian Jackson [Mon, 29 Jun 2015 14:51:22 +0000 (15:51 +0100)]
Reporting: report_run_getinfo produces ColourAttr

This includes the bgcolour attribute name and the quotes.  This will
make it possible for this function to sometimes not set a background
for the whole table cell in the future (which will be part of putting
multiple step results in each cell).

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v2: Remove an unneeded space in ColourAttr

9 years agoReporting: In report_run_getinfo, abstract code for returning
Ian Jackson [Mon, 29 Jun 2015 14:39:09 +0000 (15:39 +0100)]
Reporting: In report_run_getinfo, abstract code for returning

This will allow us to change the function's API in one place (plus all
the call sites).

No functional change in this patch.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoReporting: sg-report-host-history: Support --max-flight
Ian Jackson [Mon, 29 Jun 2015 15:37:14 +0000 (16:37 +0100)]
Reporting: sg-report-host-history: Support --max-flight

We can't use report_blessingscond because we handle blessings
differently in sg-report-host-history (since we want the history of
even adhoc etc. flights).

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoReporting: sg-report-job-history: support --max-flight
Ian Jackson [Mon, 29 Jun 2015 15:24:31 +0000 (16:24 +0100)]
Reporting: sg-report-job-history: support --max-flight

Using report_blessingscond instead of the open-coded map.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoReporting: sg-report-job-history: Honour --limit
Ian Jackson [Mon, 29 Jun 2015 14:52:51 +0000 (15:52 +0100)]
Reporting: sg-report-job-history: Honour --limit

The global $limit was erroneously shadowed by a local in
processjobbranch.  Fix this, and move the erroneously hardcoded value
to the global default.

No functional change if --limit was not specified, which it is not for
any of our runs with the in-tree configs.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoReporting: sg-report-flight: Fix undefined value in $worstrow[]
Ian Jackson [Fri, 26 Jun 2015 18:21:34 +0000 (19:21 +0100)]
Reporting: sg-report-flight: Fix undefined value in $worstrow[]

The fallback entry in the worstrow search, used when a job has not
been run at all, was wrong.  Also, fix the doc comment which induced
the mistake, and add a comment about the contents of @worst.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v2: Added the comment about @worst.

9 years agoap-common: Abolish linux-3.0 special case
Ian Jackson [Tue, 30 Jun 2015 09:22:25 +0000 (10:22 +0100)]
ap-common: Abolish linux-3.0 special case

This is identical to the effect of the linux-[3-9] etc. glob.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v2: New patch in this version of the series.

9 years agoTest Linux 4.1
Ian Jackson [Mon, 29 Jun 2015 10:00:48 +0000 (11:00 +0100)]
Test Linux 4.1

The kernel.org stable git branch layout is the same for 4.1 as for
3.x, so simply extend the pattern, and add the branch to BRANCHES.

We move the linux-stable.git pattern to the end, and extend it to
linux-[3-9].[0-9]*, to provide a bit more future-proofing.  (There is
no particular reason other than shell glob convenience to stop at
linux-9.x.)

DEPLOYMENT NOTE: After this patch is acked, but just before it is
pushed to pretest, run (this version of)
  ./mg-branch-setup linux-4.1 bisect b953c0d234bc72e8489d3bf51a276c5c4ec85345
to create the working trees on the osstest VM and push the base of
v4.1 to the tested output branch.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v2: Extend glob pattern in ap-common and move to the end.

9 years agots-leak-check: Report leaked loop block devices
Ian Jackson [Fri, 26 Jun 2015 16:41:22 +0000 (17:41 +0100)]
ts-leak-check: Report leaked loop block devices

These show up as leaked processes `[loop1]' etc. too, but that is an
implementation detail, and it is clearer to show them separately.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agoDebian: Arrange to be able to chainload a xen.efi from grub2
Ian Campbell [Mon, 15 Jun 2015 11:37:44 +0000 (12:37 +0100)]
Debian: Arrange to be able to chainload a xen.efi from grub2

Xen cannot (currently) be booted directly via the usual multiboot
path on EFI systems of any arch. Instead it is necessary to either
launch xen.efi direct from the UEFI shell or to chainload it from
grub. In both cases the Xen command line as well as what would
normally be the multiboot modules (kernel+command line, XSM policy,
initrd) must be configured in a Xen configuration file.

Here we add a new overlay/etc/grub.d/15_osstest_uefi grub script which
arranges that if a xen.efi is found in the EFI System Partition (as
arrange by a previous patch) a suitable entry is created in grub.cfg
as well.

When parsing the grub.cfg look for such an entry into addition to the
regular/multiboot one and when necessary write the configuration file
based on the regular entry and return the chainload one such that it
gets booted.

This is currently enabled only for Jessie ARM64 systems.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
v4: Use a separate grub script snippet, there's nothing we need in
    20_linux_xen
v3: Rewrap and reindent to avoid long lines

Split out boot script

9 years agoDebian: Collect kernel command line from grub.cfg
Ian Campbell [Mon, 15 Jun 2015 11:32:53 +0000 (12:32 +0100)]
Debian: Collect kernel command line from grub.cfg

I'm going to want it in a subsequent patch

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agoDebian: Ignore xen-syms entries in grub.cfg.
Ian Campbell [Mon, 15 Jun 2015 10:53:45 +0000 (11:53 +0100)]
Debian: Ignore xen-syms entries in grub.cfg.

These can't (in general?) actually be booted.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agoCollect xen.efi into xendist and install in appropriate place
Ian Campbell [Mon, 15 Jun 2015 10:42:18 +0000 (11:42 +0100)]
Collect xen.efi into xendist and install in appropriate place

Previously these binaries would have been included in the regular
("tools") dist file, whereas they really belong in the xen one.

Install into /boot/efi/EFI/osstest ready for use when chainloading.

Note that /boot/efi is (or should be) a VFAT filesystem. So a bit of
care is needed WRT symlinks etc. This is also what prevents us from
just including /boot/efi/EFI/osstest/xen.efi in the dist tarball since
untarring over a VFAT needs a little care WRT the case of directories
etc.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agoDebian: grub2: Use GRUB_CMDLINE_LINUX_XEN_REPLACE(_DEFAULT)
Ian Campbell [Thu, 28 May 2015 11:44:34 +0000 (12:44 +0100)]
Debian: grub2: Use GRUB_CMDLINE_LINUX_XEN_REPLACE(_DEFAULT)

This overrides GRUB_CMDLINE_LINUX(_DEFAULT) which we were previously
editing but only for the Xen entries, meaning that we don't switch to
console=hvc0 for the native cases (i.e. don't break them).

We do however want to edit GRUB_CMDLINE_LINUX(_DEFAULT) to remove
"quiet" if present, since it is useful to people, especially those
using standalone mode as a provisioning tool, wanting to e.g.  compare
a boot under Xen with the native case.

This has been supported since Wheezy but in any case we supply our own
20_linux_xen grub generator based on Wheezy which supports this.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
9 years agoDebian: grub2: Log full line range of menuentry and submenu entries
Ian Campbell [Thu, 28 May 2015 08:25:19 +0000 (09:25 +0100)]
Debian: grub2: Log full line range of menuentry and submenu entries

Is useful when debugging.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>