]> xenbits.xensource.com Git - people/royger/osstest.git/log
people/royger/osstest.git
6 years agoosstest: use -DWITHOUT_AUTO_OBJ with FreeBSD release targets freebsd_v18
Roger Pau Monne [Tue, 13 Feb 2018 12:40:30 +0000 (12:40 +0000)]
osstest: use -DWITHOUT_AUTO_OBJ with FreeBSD release targets

Due to a recent FreeBSD change the default output directory of the release
targets is changed to the object directory instead of the source
directory. Use WITHOUT_AUTO_OBJ to restore previous behavior. This is
harmless if used with previous versions, it will be ignored.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoosstest: expand the list of tested disk controllers
Roger Pau Monne [Tue, 13 Feb 2018 12:40:30 +0000 (12:40 +0000)]
osstest: expand the list of tested disk controllers

The Mass osstest instance has a more diverse list of hardware disk
controllers, so expand the list in order to include all the possible
disk drivers.

For the record, this list can be found at:

usr.sbin/bsdconfig/share/device.subr

In the FreeBSD source tree.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoosstest: remove the loader timeout from the install image
Roger Pau Monne [Tue, 13 Feb 2018 12:40:30 +0000 (12:40 +0000)]
osstest: remove the loader timeout from the install image

When the FreeBSD installer is booted on the godello{0/1} boxes it
receives spurious key strokes. This doesn't happen so far when booted
from disk, or with any other boxes.

In order to cope with this remove the loader timeout on the install
image. Note that failure to boot will still drop the loader into a
manual prompt.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoosstest: hook FreeBSD flight into cr-daily-branch
Roger Pau Monne [Wed, 13 Jun 2018 07:40:17 +0000 (09:40 +0200)]
osstest: hook FreeBSD flight into cr-daily-branch

Add the missing pieces so that cr-daily-branch knows how to create a
FreeBSD flight. This has been tested by calling `./cr-daily-branch
freebsd-master`.

Note that there are two missing pieces. The first one is correctly
setting the FREEBSD_<arch>_BUILDJOB environment variable when calling
make-freebsd-flight, without it the installer media will always be
picked from the configuration file. This requires keeping track of
previous FreeBSD successful build jobs, marking them as permanent and
fetching them from the database in order to pass them on the env
variable.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
v8.1:  fix ap-fetch-version-old for the freebsd-* branch
       (The remote branch has been changed to tested/master or
       tested/stable/<version> instead of plain master or stable/11.)

Changes since v6:
 - Set the path to the FreeBSD git trees in this patch.
 - Push to tested/master or tested/stable/<version> instead of using
   the same branches as the origin tree.

Changes since v5:
 - Add support for testing multiple FreeBSD branches, default to
   branch master.

Changes since v3:
 - Fix the daily-cron-email-* settings for FreeBSD branch flights.

6 years agoosstest: introduce a script to create a FreeBSD flight
Roger Pau Monne [Wed, 13 Jun 2018 07:40:16 +0000 (09:40 +0200)]
osstest: introduce a script to create a FreeBSD flight

The logic to create a FreeBSD build job is added to
make-freebsd-flight. This includes creating a FreeBSD build job, and
also testing the output of that build job (by creating another build
job that depends on the output of the first).

Note that the FreeBSD build job needs some input in order to setup a
FreeBSD host, and that can be fetched from different places:

1. Env variable FREEBSD_<arch>_BUILDJOB: use the output from a
previous build-<arch>-freebsd job.

2. Env variables FREEBSD_DIST and FREEBSD_VERSION: set before calling
into make-flight, provide the path to the installer image and sets
folder and the version being installed.

3. Config file FreeBSDDist and FreeBSDVersion: same as 2. except that
they are set on the config file.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v6:
 - Re-wrap lines.
 - Remove the freebsd hostflag.
 - Do not set the FreeBSD git trees in this patch.
 - Set all_host_os runvar to freebsd for the FreeBSD build jobs.

Changes since v5:
 - Append the "freebsd" hostflag, the specific version will be set
   dynamically by the ts-freebsd-set-hostflags script.
 - Use FREEBSD_<arch>_BUILDJOB to set the freebsdbuildjob runvar.
 - Loop around arches, although only amd64 is supported ATM. This
   should make it easier to add more arches later on.
 - Expand README comment to describe the expected layout of the
   FreeBSD install media.

Changes since v4:
 - Convert get_freebsdjob_runvars into set_freebsd_runvars, mimic the
   behavior of set_hostos_runvars.

Changes since v3:
 - Split the sg-run-job code into pre-patches.

Changes since v1:
 - Replace freebsd_buildjob with freebsdbuildjob.
 - Replace FREEBSD_SETS/IMAGE with a single FREEBSD_DIST that points
   to a folder that should contain both things.
 - Document the FreeBSDDist and FreeBSDVersion config file options in
   the README file.

6 years agoosstest: add support for FreeBSD buildjobs to sg-run-job
Roger Pau Monne [Wed, 13 Jun 2018 07:40:16 +0000 (09:40 +0200)]
osstest: add support for FreeBSD buildjobs to sg-run-job

Add support and introduce a FreeBSD build job to sg-run-job.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v5:
 - Add a '+' to the arguments passed to ts-freebsd-set-hostflags, so
   they are hidden from testid.

Changes since v4:
 - Use a switch in allocate-build-host.

Changes since v3:
 - New in this version (split from existing patch).

6 years agoosstest: change the meaning of need_build_host
Roger Pau Monne [Wed, 13 Jun 2018 07:40:16 +0000 (09:40 +0200)]
osstest: change the meaning of need_build_host

Make need_build_host store a string instead of a boolean. This is
later going to be expanded to handle the FreeBSD build jobs.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v5:
 - Use a regsub to set need_build_host.
 - NB: I would prefer to keep the tolower instead of changing the
   procs to -FREEBSD/-LINUX since I don't really like the SHOUTING.

Changes since v4:
 - Fix the usage of the catching-otherwise blocks.

Changes since v3:
 - New in this version (split from patch).

6 years agoosstest: add script to install build dependencies on FreeBSD
Roger Pau Monne [Wed, 13 Jun 2018 07:40:15 +0000 (09:40 +0200)]
osstest: add script to install build dependencies on FreeBSD

Since at the moment osstest only builds FreeBSD on FreeBSD, there are
no dependencies to install. Just mark the host as ready to share.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoosstest: introduce a script to set the runtime hostflags runvar for FreeBSD jobs
Roger Pau Monne [Wed, 13 Jun 2018 07:40:15 +0000 (09:40 +0200)]
osstest: introduce a script to set the runtime hostflags runvar for FreeBSD jobs

Due to the nature of the FreeBSD install media, which is
self-generated from the ts-freebsd-build script, the hostflags runvar
set to FreeBSD jobs are related to the current version under test.

The following hostflags might need to be fetched from the runvars of a
previous build-$arch-freebsd job:

 - share-build-freebsd-$arch-$hash: the $hash used here is calculated
   from the checksum of the installer image used by this specific job.
   This allows osstest to share FreeBSD build hosts, and be sure the
   exact desired FreeBSD version is used.
 - PropMinVer:Freebsd:$version: $version contains the major FreeBSD
   version under test. This version is obtained from the FreeBSD
   source code used to create the install media.

Note that the share-build-* hostflag is optional, and will only be set
for build jobs.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v5:
 - Fetch the host idents from the arguments, instead of assuming
   "host" always.
 - Set PropMinVer:Freebsd:<version> instead of freebsd-<version> to
   better cope with FreeBSD version bumps. This should only happen
   every ~2 years.

Changes since v4:
 - Make the share-build- flag optional.

Changes since v3:
 - Make use of the set_runtime_hostflag helper.
 - Make use of the sha256file helper.

Changes since v2:
 - New in this version.

6 years agoosstest: add support for runtime_IDENT_hostflags
Roger Pau Monne [Wed, 13 Jun 2018 07:40:15 +0000 (09:40 +0200)]
osstest: add support for runtime_IDENT_hostflags

This is required for FreeBSD, that will need to set some of the
hostflags at runtime. The current IDENT_hostflags will be keep as-is,
and they should only be set at job creation time.

Also introduce a helper to set the runtime hostflags.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v4:
 - Allow runtime flags to be appended instead of overwritten.

Changes since v3:
 - New in this version.

6 years agoosstest: introduce a FreeBSD build script
Roger Pau Monne [Wed, 13 Jun 2018 07:40:15 +0000 (09:40 +0200)]
osstest: introduce a FreeBSD build script

In order to generate the FreeBSD installer image and the install
media.

The install sets are the vanilla ones generated by the 'ftp' release
target.  The installer image is handcrafted based on the filesystem
created by the 'bootonly' target, which is then populated with the ssh
host keys, and setup in order to use the serial console. The other
difference from upstream FreeBSD installer images is that the one
built by osstest uses a ramdisk instead of relying on the installer
media to be somehow attached, either on a CD or USB drive. This is
required in order to boot the image from pxelinux (where no CD or USB
is actually attached to the host, and everything is fetched from
tftp).

Due to the nature of the FreeBSD build, the outputs are different from
what osstest expects from a buildjob, more specifically
path_freebsddist points to a folder that contains the several outputs
form this buildjob.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v4:
 - Remove some useless comments.
 - Use qw(git) instead of 'git'.
 - Replace unicode nonbreaking space.
 - Remove trail ','.
 - Improve the way to fetch the version number.

Changes since v3:
 - Introduce two helpers to perform the build process.
 - Install packages using target_install_packages.

Changes since v2:
 - Increase build target timeouts.
 - Use sysrc instead echo to set rc.conf options.

Changes since v1:
 - Remove the ts-build-check FreeBSD hack.
 - Use pkg-static instead of pkg.
 - Introduce buildcmd_stamped_logged_root and target_cmd_build_root.
 - Use target_cmd_build_root and buildcmd_stamped_logged_root in the
   ts-freebsd-build script.
 - Fix the script snippets to use <<END.<<'END' in order to avoid
   escaping the shell variables.
 - Set path_freebsddist runvar to point to the folder where the build
   files are stashed.
 - Add a comment at the top of the file describing what runvars are
   consumed/produced by the build script.

6 years agoosstest: add support for the FreeBSD package manager
Roger Pau Monne [Wed, 13 Jun 2018 07:40:14 +0000 (09:40 +0200)]
osstest: add support for the FreeBSD package manager

FreeBSD support is added to target_install_packages and
target_install_packages_norec, although there's no equivalent to the
--no-install-recommends in the FreeBSD package manager.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v6:
 - Use $ho->{Os} in order to detect the target OS.

Changes since v5:
 - Add prototype for package_install_cmd.
 - Use $ho->{Ident} instead of hardcoding "host" in get_hostflags.

Changes since v4:
 - Unify more code between FreeBSD and Debian: introduce an
   OS-agnostic package_install_cmd to generate the install cmd.

Changes since v3:
 - New in this version.

6 years agoosstest: introduce an OS $ho field
Roger Pau Monne [Wed, 13 Jun 2018 07:40:14 +0000 (09:40 +0200)]
osstest: introduce an OS $ho field

In order to differentiate between FreeBSD and Debian hosts.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v7:
 - s/Os/OS/.

Changes since v6:
 - New in this version

6 years agoosstest: add prototypes to target_install_packages{_norec}
Roger Pau Monne [Wed, 13 Jun 2018 07:40:14 +0000 (09:40 +0200)]
osstest: add prototypes to target_install_packages{_norec}

No functional change.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v5:
 - New in this version.

6 years agoosstest: introduce build helpers for FreeBSD
Roger Pau Monne [Wed, 13 Jun 2018 07:40:13 +0000 (09:40 +0200)]
osstest: introduce build helpers for FreeBSD

Some steps of the FreeBSD build process need to be done as root, so
introduce some helpers to perform those steps:
buildcmd_stamped_logged_root and target_cmd_build_root. They behave
exactly the same as the non-root counterparts.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v3:
 - New in this version.

6 years agoosstest: introduce host_shared_mark_ready
Roger Pau Monne [Wed, 13 Jun 2018 07:40:13 +0000 (09:40 +0200)]
osstest: introduce host_shared_mark_ready

That allows marking a host as ready to be shared. Replace the current
callers that open-code it.

This commit also fixes a bug where Ident was used instead of 'host' as
resource.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v4:
 - New in this version.

6 years agoosstest: add executive prefix to resource_shared_mark_ready
Roger Pau Monne [Wed, 13 Jun 2018 07:40:13 +0000 (09:40 +0200)]
osstest: add executive prefix to resource_shared_mark_ready

This is a non-functional change in preparation for introducing a
resource_shared_mark_ready in TestSupport.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v4:
 - New in this version.

6 years agoosstest: move known_hosts generation to TestSupport
Roger Pau Monne [Wed, 13 Jun 2018 07:40:12 +0000 (09:40 +0200)]
osstest: move known_hosts generation to TestSupport

This is equivalent to the already existing authorized_keys function,
and generates the contents of the known_hosts file that should be
installed on targets.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoosstest: make built_stash_file store a path_ runvar for each file
Roger Pau Monne [Wed, 13 Jun 2018 07:40:12 +0000 (09:40 +0200)]
osstest: make built_stash_file store a path_ runvar for each file

And introduce built_stash_debugfile in order the keep the previous
behavior of built_stash_file.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agosg-report-flight: When justifying, disregard out-of-flight build jobs
Ian Jackson [Thu, 7 Jun 2018 11:31:20 +0000 (11:31 +0000)]
sg-report-flight: When justifying, disregard out-of-flight build jobs

When we are looking for a previous job which justifies a failure, we
need to check that the putative justifying job used the same revision
as the baseline we are judging against.  So we investigate the build
jobs referred to by that putative justifying job.

However, there are cases where this is not appropriate.  Currently,
the most obvious example is freebsdbuildjob.

The freebsd arrangements involve referencing an anointed
freebsdbuildjob, which was in turn built from a previous
freebsdbuildjob, eventually terminating in some kind of ad-hoc job.
We would not want to investigate all of those even if we were trying
to analyse a flight on a freebsd branch.

The real thing we want to check that the build jobs *in the same
flight as the justifying job* used the right revisions.  Build jobs
from other flights were either (i) build jobs for components not being
targed for testing by this branch, but which were necessary for the
justifying job and for which we decided to reuse another build job
(in which case we don't really care what versions they used, even
if underlying it all there might be a different version of a tree
we are actually interested in (ii) the kind of continuous update
thing seen with freebsdbuildjob.

There is no corresponding issue with cs-bisection-step, because it
only looks for the *buildjob runvars of the test it is actually
interested in, and does not recurse.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agomfi-*: Set appropriate PropMinVer:XenMin: hostflags, to honour XenMin property
Ian Jackson [Wed, 6 Jun 2018 10:46:08 +0000 (11:46 +0100)]
mfi-*: Set appropriate PropMinVer:XenMin: hostflags, to honour XenMin property

* In test_matrix_iterate, where most_hostflags is set, include a
  PropMinVer:XenMin: hostflag.  This is derived from $xenbranch.
  When $xenbranch is xen-unstable, don't add that hostflag.

* But this is wrong for the migrate upgrade tests, which use both this
  and the previous version of Xen.  It is sufficient to check the
  previous version, so we strip out the existing PropMinVer if there
  is one.  We (ab)use select_prevxenbranch to calculate the old Xen
  branch name (version).

The motivation right now for this is that Xen 4.10 and earlier do not
boot xen.gz on UEFI.  In earlier versions, one has to chainload
xen.efi.  We don't support that in osstest right now on x86 (and it
probably isn't worth fixing that logic).

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agomfi-*: Provide hostflags_strip
Ian Jackson [Wed, 6 Jun 2018 10:45:05 +0000 (11:45 +0100)]
mfi-*: Provide hostflags_strip

This utility function saves us having to fragment the *_hostflags
variables any further when adding special cases.  A particular special
case can strip out things it doesn't like.

No callers yet.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agomfi-*: Reformat/refactor migrupgrade test generation slightly
Ian Jackson [Wed, 6 Jun 2018 10:43:11 +0000 (11:43 +0100)]
mfi-*: Reformat/refactor migrupgrade test generation slightly

* Introduce a variable "$hf" containing the hostflags.
* Properly indent the job_create_test call.

No functional change.  This will make the substantive change easier to
read.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agomg-repro-setup: Print flight number as soon as we have it
Ian Jackson [Tue, 29 May 2018 11:12:23 +0000 (12:12 +0100)]
mg-repro-setup: Print flight number as soon as we have it

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agoOsstest/Debian: bootloader: Fix grub parsing for XSM and multiboot1
Ian Jackson [Tue, 29 May 2018 11:09:33 +0000 (11:09 +0000)]
Osstest/Debian: bootloader: Fix grub parsing for XSM and multiboot1

bca3edb4ac0d670098b7618cbaccf7577aca267a
  "Osstest/Debian: bootloader: Understand multiboot2 syntax"
was supposed to change `multiboot' and `module' in the grub2 menu
parser to `multiboot2?' and `module2?'.  But the entry for matching
XSM policy file lines was missing the ?, which broke all multiboot1
XSM tests.  Fix this.

Reported-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoap-common: Switch to Linux 4.14 by default on X86.
Ian Jackson [Fri, 25 May 2018 14:41:54 +0000 (15:41 +0100)]
ap-common: Switch to Linux 4.14 by default on X86.

Linux 4.9 is getting a bit long in the tooth.  4.14 is an LTS branch
and the osstest-tested version seems reasonably good.  I ran a special
report[1] to see what to expect and it reported no regressions.

Accordingly I am going to switch to using Linux 4.14 by default for
most X86 runs in osstest.  ARM tests are not affected at this time;
they use their own linux-arm-xen branch which is updated by the Xen
ARM maintainers.

[1] ./sg-report-flight --that-linux=6ba89b52ba6916bc7a3d390d70951e992c0ca39e --this-linux=d88700f79448fc8f03617d4f1929c39676f8d1e4 --branches-also=linux-4.9,linux-4.14,linux-arm-xen 122974 |less

CC: Boris Ostrovsky <boris.ostrovsky@oracle.com>
CC: Juergen Gross <jgross@suse.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
CC: Wei Liu <wei.liu2@citrix.com>
CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
CC: Julien Grall <julien.grall@linaro.org>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agofreebsd: Expect a freebsd-10 hostflag for freebsd tests
Ian Jackson [Fri, 18 May 2018 15:32:47 +0000 (16:32 +0100)]
freebsd: Expect a freebsd-10 hostflag for freebsd tests

This will allow us to exclude certain hosts.  For example, right now,
we have no support for booting FreeBSD on UEFI hosts.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
6 years agots-xen-install: Install additional .debs for UEFI
Ian Jackson [Thu, 17 May 2018 17:50:44 +0000 (18:50 +0100)]
ts-xen-install: Install additional .debs for UEFI

grub2 from stretch cannot boot Xen under UEFI.  But that from buster
can, and it can be simply installed, even on jessie.  So do that.

I have copied the binaries for 2.02+dfsg1-4 to
images/grub2-uefi-amd64-2018-04-01 in Massachusetts.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years ago20_linux_xen: Use multiboot2 when Xen supports it
Ian Jackson [Thu, 17 May 2018 17:33:15 +0000 (18:33 +0100)]
20_linux_xen: Use multiboot2 when Xen supports it

This is necessary for UEFI.  The patch is similar in spirit to the
upstream commit
  http://git.savannah.gnu.org/cgit/grub.git/commit/?id=b4d709b6ee789cdaf3fa7a80fd90c721a16f48c2

A backport of that commit to Debian buster was requested in
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=898947
so hopefully this will not be necessary after stretch.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agogrub: Move 20_linux_xen to suite-specific overlays
Ian Jackson [Thu, 17 May 2018 14:33:59 +0000 (15:33 +0100)]
grub: Move 20_linux_xen to suite-specific overlays

stretch still needs some of this, in particular the XSM changes.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agoDebian.pm: debian_overlays: Honour suite-specific overlays
Ian Jackson [Thu, 17 May 2018 14:26:37 +0000 (15:26 +0100)]
Debian.pm: debian_overlays: Honour suite-specific overlays

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agoDebian.pm: debian_overlays: Allow local overlay to override supplied one
Ian Jackson [Thu, 17 May 2018 14:18:42 +0000 (15:18 +0100)]
Debian.pm: debian_overlays: Allow local overlay to override supplied one

I think, no change with any reasonable configs.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agoDebian.pm: debian_overlays: Internal default for tarball name
Ian Jackson [Thu, 17 May 2018 14:18:01 +0000 (15:18 +0100)]
Debian.pm: debian_overlays: Internal default for tarball name

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agoDebian.pm: debian_overlays: Do not make $func callback for nonexistent dirs
Ian Jackson [Thu, 17 May 2018 14:16:48 +0000 (15:16 +0100)]
Debian.pm: debian_overlays: Do not make $func callback for nonexistent dirs

This means that it is now OK not to have an `overlay-local'.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agoOsstest/Debian: bootloader: Understand multiboot2 syntax
Ian Jackson [Fri, 18 May 2018 15:40:09 +0000 (16:40 +0100)]
Osstest/Debian: bootloader: Understand multiboot2 syntax

We are going to sometimes switch to the multiboot2 protocol, which has
different directives with very similar effect.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agoOsstest/Debian: bootloader: Ignore `.config' files
Ian Jackson [Fri, 18 May 2018 15:38:31 +0000 (16:38 +0100)]
Osstest/Debian: bootloader: Ignore `.config' files

Some versions of the bootloader scripts will make menu entries for
`.config' files, containing the hypervisor config.  These should be
ignored.

(It is not clear to me, given our 20_linux_xen hack, whether this is
in fact an upstream bug, or a bug in 20_linux_xen.)

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agoDebian: Pass $ho to debian_overlays
Ian Jackson [Thu, 17 May 2018 14:11:07 +0000 (15:11 +0100)]
Debian: Pass $ho to debian_overlays

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agomfi-common: Fall back to anointed builds in Executive mode
Ian Jackson [Thu, 17 May 2018 11:01:05 +0000 (12:01 +0100)]
mfi-common: Fall back to anointed builds in Executive mode

Previously, `make-*-flight' would not work unless FREEBSD_*_BUILDJOB
was set.  Now we use the anointed values if we can find them.

If we can't, mg-anoint retrieve will print a warning.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
6 years agomfi-common: set_freebsd_runvars: Never set freebsd_distpath to `/amd64' etc.
Ian Jackson [Thu, 17 May 2018 10:54:48 +0000 (11:54 +0100)]
mfi-common: set_freebsd_runvars: Never set freebsd_distpath to `/amd64' etc.

Logically, the final branch of the if should be qualified with a check
for the emptiness of FreeBSDDist.  This is awkward in the current
structure, since we really want to do the distpath lookup only if
needed.  (This is not very important right now, but we are about to
add another case which will do a more-likely-to-bomb-out and
more-likely-to-block-on-the-db lookup.)  So refactor into `return'
style.  This lets us introduce local variables in each branch.

Now gate the final branch appropriately.  The overall result is that
if no useful FreeBSD build is found, we simply do not set the
freebsd_* runvars, rather than setting them to wrong values (eg,
`freebsd_distpath=/i386'.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
6 years agomg-anoint: Support mg-anoint retrieve --tolerate-unprepared
Ian Jackson [Thu, 17 May 2018 11:05:48 +0000 (12:05 +0100)]
mg-anoint: Support mg-anoint retrieve --tolerate-unprepared

make-*-flight is going to want this.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
6 years agomg-anoint: Make readonly operations "work" in standalone mode
Ian Jackson [Thu, 17 May 2018 10:51:35 +0000 (11:51 +0100)]
mg-anoint: Make readonly operations "work" in standalone mode

This makes `mg-anoint' in standalone mode a view onto an empty set of
anointments.  So now it becomes ok to call mg-anoint in make-*-flight.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
6 years agoPerl @INC path: fix a few more scripts to use BEGIN
Ian Jackson [Thu, 17 May 2018 10:37:40 +0000 (11:37 +0100)]
Perl @INC path: fix a few more scripts to use BEGIN

Three more files which missed out on
  dea987c5ab11 "PERLLIB, @INC: Use BEGIN { }"

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
6 years agoREADME.dev: Make example commisioning runes use $hn variable
Ian Jackson [Thu, 17 May 2018 10:23:32 +0000 (11:23 +0100)]
README.dev: Make example commisioning runes use $hn variable

This makes them better for cutting-and-pasting.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agoREADME.dev: Discuss setting Firmware for UEFI machines
Ian Jackson [Thu, 17 May 2018 10:22:59 +0000 (11:22 +0100)]
README.dev: Discuss setting Firmware for UEFI machines

This must occur before mknetbootdir, or mknetbootdir does not set
things up for UEFI booting.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agoREADME.dev: Fix a typo
Ian Jackson [Thu, 17 May 2018 10:22:24 +0000 (11:22 +0100)]
README.dev: Fix a typo

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agoOsstest/Debian: Use X64 bootloader for UEFI i386
Ian Jackson [Fri, 18 May 2018 15:27:43 +0000 (16:27 +0100)]
Osstest/Debian: Use X64 bootloader for UEFI i386

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agoOsstest/Debian: preseed: Force UEFI install regardless
Ian Jackson [Wed, 16 May 2018 16:04:43 +0000 (16:04 +0000)]
Osstest/Debian: preseed: Force UEFI install regardless

This suppresses:

   Partition disks
   ---------------

   This machine's firmware has started the installer in UEFI mode but it looks
   like there may be existing operating systems already installed using "BIOS
   compatibility mode". If you continue to install Debian in UEFI mode, it might
   be difficult to reboot the machine into any BIOS-mode operating systems later.

   If you wish to install in UEFI mode and don't care about keeping the ability to
   boot one of the existing systems, you have the option to force that here. If
   you wish to keep the option to boot an existing operating system, you should
   choose NOT to force UEFI installation here.
   Force UEFI installation?
     1: Yes      2: No
     Prompt: '?' for help>

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoOsstest/TestSupport: Use right arch for UEFI grub setup
Ian Jackson [Wed, 16 May 2018 16:03:32 +0000 (16:03 +0000)]
Osstest/TestSupport: Use right arch for UEFI grub setup

This table was erroneously never used.  Also, the value for arm64 is
wrong: it should be AA64.  We fix the table value, and substitute it
in, for no overall change on amd64.  On other arches we now do not
hardcode the wrong value.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Julien Grall <julien.grall@linaro.org>
6 years agoOsstest/Debian.pm: Remove a spurious `my $kernel'.
Ian Jackson [Thu, 17 May 2018 18:12:43 +0000 (18:12 +0000)]
Osstest/Debian.pm: Remove a spurious `my $kernel'.

This variable is not used, and is shadowed by the one which is
initialised a few lines later.  This produces a warning.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agocr-daily-branch: When reporting, always compare to real flights
Ian Jackson [Mon, 21 May 2018 14:20:20 +0000 (15:20 +0100)]
cr-daily-branch: When reporting, always compare to real flights

When we're running sg-report-flight, at the end of the flight, we
shouldn't try to compare it to play flights, but real ones (if any).
play flights might contain junk (which might even cause
sg-report-flight to crash).

CC: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agots-xen-build: run `make build' before `make', by default
Ian Jackson [Wed, 9 May 2018 15:53:57 +0000 (16:53 +0100)]
ts-xen-build: run `make build' before `make', by default

The Xen build system has some quirks.  One of them is that `make' is a
version of `make dist' which is a version of `make install', which
runs `make install' in each subdir - but there are subdirs where `make
install' is a no-op which does not depend on `make build'.  Also,
`make all' does not do `make build'.  Additionally, the default target
differs in the toplevel, compared to subdirectories.  Perhaps this is
all mistaken, but it's not something we can correct in stable
branches.

The result is that we might miss bugs where `make build' fails; and in
particular, bugs where simply `make' may fail in a subdirectory.  Eg,
the recently discovered build failures in the emulator tests, due to
backported changes, which occur with `make -C tools' but not with
`make all' or `make tools'.

Detect these by running `make build' before `make' (unless our caller
has specified some other build arguments).  In the future perhaps we
should do tools and hypervisor builds entirely separately.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
v2: Use `make build' instead of `make all' since the former actually
    detects the bug in a buggy unpatched Xen 4.8.  Fix a syntax
    error.  Improve the commit message.

6 years agoms-planner: Fix a message to have the right quoting
Ian Jackson [Fri, 18 May 2018 16:05:24 +0000 (17:05 +0100)]
ms-planner: Fix a message to have the right quoting

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agomg-adjust-flight-makexrefs: Repair after "Use ^ for excluding jobs"
Ian Jackson [Fri, 18 May 2018 13:42:13 +0000 (13:42 +0000)]
mg-adjust-flight-makexrefs: Repair after "Use ^ for excluding jobs"

In
  3b433e39382b13dda5d25aebecaf4864ef69c8d4
  "mg-adjust-flight-makexrefs: Use ^ for excluding jobs, not !"
a shell glob pattern was changed:
  -    !*)    ifmatch=$tokeep; action=$todelete ; glob="${glob#!}" ;;
  +    [!^]*) ifmatch=$tokeep; action=$todelete ; glob="${glob#?}" ;;

But in globbing, ! inside [ ] is a character class complement, not a
literal.  The result is that mg-adjust-flight-makexrefs would
generally replace jobs willy-nilly.

Fix this by using two separate glob patterns, and no character class.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agomg-schema-test-database: New --max-flight option
Ian Jackson [Mon, 3 Jul 2017 16:53:11 +0000 (17:53 +0100)]
mg-schema-test-database: New --max-flight option

This can be useful when testing things which involve old data, rather
than things which just involve new data.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agomg-schema-test-database: Apply updates, regardless of compatibility
Ian Jackson [Mon, 3 Jul 2017 16:53:26 +0000 (17:53 +0100)]
mg-schema-test-database: Apply updates, regardless of compatibility

The test database should be just like the real one, even if the schema
compatibility looks wrong.  So pass -ff to mg-schema-update.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agostep logfiles: Rely on new logfile column
Ian Jackson [Thu, 29 Jun 2017 16:13:50 +0000 (17:13 +0100)]
step logfiles: Rely on new logfile column

These are the three places which read logfile from the db, but had a
fallback to a computation involving stepno and step.

But, after steps-logfile-constraint, the logfile column is NOT NULL
(and populated with computed default data if need be) so this is not
needed any more

This is part of a "Populate-then-rely" schema change, as
described in schema/README.updates.  Specifically, the step:
10. Optionally commit: code which relies on new column, and does not
   necessarily tolerate NULL/DEFAULT; changing `constraint' to Needed.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agomg-schema-update: print timestamp when Applying
Ian Jackson [Fri, 4 May 2018 14:30:21 +0000 (14:30 +0000)]
mg-schema-update: print timestamp when Applying

This makes it easier to see the retry rate etc. if a schema update
needs to be retried due to db conflicts.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agoStandalone HostFlags: Use ^ for negation, not !
Ian Jackson [Thu, 3 May 2018 14:46:45 +0000 (15:46 +0100)]
Standalone HostFlags: Use ^ for negation, not !

The ! here doesn't cause any shell rune trouble in, but we want to
move to using ^ everywhere for consistency.

We still honour ! to support old configs.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agomg-adjust-flight-makexrefs: Use ^ for excluding jobs, not !
Ian Jackson [Thu, 3 May 2018 14:41:26 +0000 (15:41 +0100)]
mg-adjust-flight-makexrefs: Use ^ for excluding jobs, not !

The ! here doesn't cause shell rune trouble in practice very much, but
we want to move to using ^ everywhere for consistency.

We still honour !.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agomg-hosts: Use ^ for flag negation, not !
Ian Jackson [Thu, 3 May 2018 14:40:31 +0000 (15:40 +0100)]
mg-hosts: Use ^ for flag negation, not !

We still honour (and document) !

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agomg-allocate: Use ^ for deallocation, not !
Ian Jackson [Thu, 3 May 2018 14:28:59 +0000 (15:28 +0100)]
mg-allocate: Use ^ for deallocation, not !

! is annoying because some shells enable !-history expantion by
default even though few users have any idea about it.  In general users
are confused by the error message and do not know what to do next.

We still honour ! for the benefit of old wrapper scripts, finger
macros, etc.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agosg-report-flight: Provide correct links to test history pages
Ian Jackson [Fri, 27 Apr 2018 14:12:47 +0000 (15:12 +0100)]
sg-report-flight: Provide correct links to test history pages

The files are actually called `ALL.html' and `<branch>.html'.  See the
assignments to $html_file in sg-report-job-history near l.251.

I think this may have previously worked in Massachusetts (prior to the
recent upgrades) due to content negotiation, but this should not be
relied on.

Reported-by: Julien Grall <julien.grall@linaro.org>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agoproduction-config: Use something outside ~osstest/.ssh for TestHostKeypairPath
Ian Jackson [Fri, 27 Apr 2018 13:43:56 +0000 (14:43 +0100)]
production-config: Use something outside ~osstest/.ssh for TestHostKeypairPath

ansible nowadays chmods ~/.ssh to 700 for every user whose
authorized_keys it touches.  This includes osstest@osstest.

The result is that other users on osstest.test-lab cannot access this
file.  I have cp -a'd the keys, which are a piece of static
configuration we don't expect to change often, to a different
directory which will not be attacked by ansible.  Refer to them there.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agoproduction-config: Get ssh public keys from file where ansible will write them
Ian Jackson [Fri, 27 Apr 2018 13:38:36 +0000 (14:38 +0100)]
production-config: Get ssh public keys from file where ansible will write them

We had a hardcoded set of public keys ssh in production-config.  This
is not really sensible, and it causes annoyance for new users.

Instead use a file which will be generated by ansible.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agocr-for-branches: Add linux-4.14
Ian Jackson [Tue, 24 Apr 2018 11:19:04 +0000 (12:19 +0100)]
cr-for-branches: Add linux-4.14

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agodb schema: Make the testid column NOT NLLL
Ian Jackson [Mon, 3 Jul 2017 16:54:19 +0000 (17:54 +0100)]
db schema: Make the testid column NOT NLLL

We have to fix some old data.  We insist that the old data is indeed
old (more than 5 years old) and not part of proper flights (ie,
blessed "play" or "crashed" or "unknown").

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agoms-planner*: Improve debugging a bit
Ian Jackson [Fri, 13 Apr 2018 13:20:13 +0000 (14:20 +0100)]
ms-planner*: Improve debugging a bit

* Use confess a few times instead of die
* Fix failure of ms-planner-debug to DTRT

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agoMerge remote-tracking branch 'cam-daemons/master' into wip
Ian Jackson [Mon, 23 Apr 2018 14:49:22 +0000 (15:49 +0100)]
Merge remote-tracking branch 'cam-daemons/master' into wip

7 years agoproduction-config-cambridge: Drop all arm64 tests as we have no such hardware
Ian Jackson [Tue, 10 Apr 2018 11:00:16 +0000 (12:00 +0100)]
production-config-cambridge: Drop all arm64 tests as we have no such hardware

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agomfi-common: Honour BuildArches and TestArches config settings
Ian Jackson [Mon, 9 Apr 2018 15:36:31 +0000 (16:36 +0100)]
mfi-common: Honour BuildArches and TestArches config settings

These settings are currently not provided, and the defaults are
unchanged, so no functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agoproduction-config-cambridge: Update TftpDiVersion with kernel NUMA bugfix
Ian Jackson [Mon, 9 Apr 2018 15:05:31 +0000 (16:05 +0100)]
production-config-cambridge: Update TftpDiVersion with kernel NUMA bugfix

http_proxy=http://localhost:3128/ OSSTEST_SPECIALKERNELDEB_jessie_amd64=$PWD/linux-image-3.16.0-4-amd64_3.16.51-3~a.test_amd64.deb ./mg-debian-installer-update-all

See 5fc9697df33a "Update jessie amd64 kernel for NUMA bugfix".

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agoemail output: Add MIME headers
Ian Jackson [Thu, 5 Apr 2018 14:40:00 +0000 (15:40 +0100)]
email output: Add MIME headers

We universally use UTF-8 in git commit messages and other kinds of
messages.  The RFC-*822 default is us-ascii.  Fix this by providing a
set of MIME headers.

Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agocr-ensure-disk-space: Actually quit before taking lock if all is well
Ian Jackson [Thu, 5 Apr 2018 14:38:39 +0000 (15:38 +0100)]
cr-ensure-disk-space: Actually quit before taking lock if all is well

5d2466dc0f26 "cr-ensure-disk-space: Correct stdout output" was
supposed to change an `exit 0' into a `quit_ok' but erroneously
changed it into `check_space'.  Fix this.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agomake-flight: Run some shadow paging tests (`hap=false')
Ian Jackson [Thu, 5 Apr 2018 13:01:19 +0000 (14:01 +0100)]
make-flight: Run some shadow paging tests (`hap=false')

Add four tests to most flights:

    test-amd64-amd64-xl-shadow
    test-amd64-amd64-xl-qemuu-debianhvm-amd64-shadow
    test-amd64-i386-xl-shadow
    test-amd64-i386-xl-qemuu-debianhvm-amd64-shadow

These are the same as the corresponding ones without -shadow, except
that they set xen_boot_append to `hap=false', so that that will be
passed to the hypervisor to force shadow paging.

CC: Jan Beulich <jbeulich@suse.com>
CC: George Dunlap <george.dunlap@citrix.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Partially-Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agomake-flight: do_hvm_debian_test_one: new testname_sfx and testvars args
Ian Jackson [Thu, 5 Apr 2018 13:00:32 +0000 (14:00 +0100)]
make-flight: do_hvm_debian_test_one: new testname_sfx and testvars args

Currently no callers pass these, so no functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agoadhoc-revtuple-generator: Recognise http://example.net/example.git/ as git
Ian Jackson [Thu, 5 Apr 2018 12:24:24 +0000 (13:24 +0100)]
adhoc-revtuple-generator: Recognise http://example.net/example.git/ as git

In some circumstances the trailing slash appears, in a way that is
outside our control.  Eg some people with git submodules.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agocrontab-cambridge: Remove departed employee
Ian Jackson [Wed, 4 Apr 2018 14:17:28 +0000 (15:17 +0100)]
crontab-cambridge: Remove departed employee

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agocrontabs: Add warning not to just "crontab -e"
Ian Jackson [Wed, 4 Apr 2018 14:16:26 +0000 (15:16 +0100)]
crontabs: Add warning not to just "crontab -e"

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agoREADME.dev: Say to use mg-force-push for force pushes
Ian Jackson [Tue, 27 Mar 2018 15:00:17 +0000 (16:00 +0100)]
README.dev: Say to use mg-force-push for force pushes

Reported-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
7 years agots-xen-install: Add async-show-all to hypervisor options, globally
Ian Jackson [Tue, 6 Mar 2018 11:00:03 +0000 (11:00 +0000)]
ts-xen-install: Add async-show-all to hypervisor options, globally

This will help produce better debugging

CC: Jan Beulich <JBeulich@suse.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agorumpkernel: clone from github rather than the official URL
Ian Jackson [Mon, 5 Mar 2018 15:48:57 +0000 (15:48 +0000)]
rumpkernel: clone from github rather than the official URL

Because, on wheezy:

  $ GIT_SSL_NO_VERIFY=1 HOME=/ git clone http://repo.rumpkernel.org/rumprun
  Cloning into 'rumprun'...
  error: RPC failed; result=22, HTTP code = 501
  fatal: The remote end hung up unexpectedly
  $

strace shows a baroque sequence of redirects etc. involving servers
from rumpkernel.org, github.com, and some kind of gandi.net CDN.

On jessie it seems to just work.  This commit should therefore be
reverted at some point, when all the instances are running jessie or
later.  (Right now the VMs in the Mass colo are mostly wheezy.)

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agopv-in-pvh: add a pv shim test
Roger Pau Monne [Fri, 16 Feb 2018 10:37:40 +0000 (10:37 +0000)]
pv-in-pvh: add a pv shim test

The new shim tests uses the same approach as the PVH one, but doesn't
differentiate between AMD and Intel.

This is the (trimmed) diff of the output from mg-show-flight-runvars:

+test-amd64-amd64-xl-pvshim    all_host_di_version    2017-12-14
+test-amd64-i386-xl-pvshim     all_host_di_version    2017-12-14
+test-amd64-amd64-xl-pvshim    all_host_suite         jessie
+test-amd64-i386-xl-pvshim     all_host_suite         jessie
+test-amd64-amd64-xl-pvshim    all_hostflags          arch-amd64,arch-xen-amd64,suite-jessie,purpose-test
+test-amd64-i386-xl-pvshim     all_hostflags          arch-i386,arch-xen-amd64,suite-jessie,purpose-test
+test-amd64-amd64-xl-pvshim    arch                   amd64
+test-amd64-i386-xl-pvshim     arch                   i386
+test-amd64-amd64-xl-pvshim    buildjob               build-amd64
+test-amd64-i386-xl-pvshim     buildjob               build-i386
+test-amd64-amd64-xl-pvshim    debian_arch            amd64
+test-amd64-i386-xl-pvshim     debian_arch            i386
+test-amd64-amd64-xl-pvshim    debian_kernkind        pvops
+test-amd64-i386-xl-pvshim     debian_kernkind        pvops
+test-amd64-amd64-xl-pvshim    debian_shim            1
+test-amd64-i386-xl-pvshim     debian_shim            1
+test-amd64-amd64-xl-pvshim    debian_suite           jessie
+test-amd64-i386-xl-pvshim     debian_suite           jessie
+test-amd64-amd64-xl-pvshim    kernbuildjob           build-amd64-pvops
+test-amd64-i386-xl-pvshim     kernbuildjob           build-i386-pvops
+test-amd64-amd64-xl-pvshim    kernkind               pvops
+test-amd64-i386-xl-pvshim     kernkind               pvops
+test-amd64-amd64-xl-pvshim    toolstack              xl
+test-amd64-i386-xl-pvshim     toolstack              xl
+test-amd64-amd64-xl-pvshim    xenbuildjob            build-amd64
+test-amd64-i386-xl-pvshim     xenbuildjob            build-amd64

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agosg-report-host-history: Multiply size of reported history by 10
Ian Jackson [Wed, 31 Jan 2018 11:18:55 +0000 (11:18 +0000)]
sg-report-host-history: Multiply size of reported history by 10

Right now,
  http://logs.test-lab.xenproject.org/osstest/results/host/laxton1.html
contains ~200 jobs as expected, but that covers only 4 days.  We
obviously would like more like a month.

The effect ought to be some more db work, but not worse concurrency.

CC: Julien Grall <julien.grall@linaro.org>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agodaily-cron-email-*: Replace lists.xensource.com with lists.xenproject.org
Ian Jackson [Mon, 29 Jan 2018 17:27:18 +0000 (17:27 +0000)]
daily-cron-email-*: Replace lists.xensource.com with lists.xenproject.org

The .xensource.com domain is quite deprecated now.

Reported-by: Doug Goldstein <cardoe@cardoe.com>
Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agomg-hosts: Call db_readonly_report inside, not outside, db_retry
Ian Jackson [Mon, 29 Jan 2018 17:24:04 +0000 (17:24 +0000)]
mg-hosts: Call db_readonly_report inside, not outside, db_retry

Newer postgresql prints:
  WARNING:  SET TRANSACTION can only be used in transaction blocks
and it is right.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agomg-force-push: unshift . onto @INC
Ian Jackson [Mon, 29 Jan 2018 17:23:28 +0000 (17:23 +0000)]
mg-force-push: unshift . onto @INC

This script seems to have missed out on the bulk commit fixing this
problem.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agosmoke tests: Fix job reuse globs in cr-daily-branch
Ian Jackson [Thu, 14 Dec 2017 16:28:21 +0000 (16:28 +0000)]
smoke tests: Fix job reuse globs in cr-daily-branch

A symptom that the old patterns lack !build-arm64-xsm, so the xsm job
might be reused.  The overall cause is that it contained a (partial)
list of architectures.

Instead, we observe that:
 * The things we want to avoid reusing are Xen and libvirt (which
   builds against Xen.
 * Non-Xen builds are invariably build-<arch>-<thing> (or even longer)
   so we can match them all with build-*-*.
 * We need to exclude the Xen builds and the libvirt builds.  The
   libvirt builds are obvious.  The Xen builds are either build-<arch>
   which does not match build-*-*, or build-<arch>-xsm.

CC: Stefano Stabellini <sstabellini@kernel.org>
Acked-by: Julien Grall <julien.grall@linaro.org>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agosmoke tests: Build arm64 with XSM, instead of without
Ian Jackson [Thu, 14 Dec 2017 16:03:44 +0000 (16:03 +0000)]
smoke tests: Build arm64 with XSM, instead of without

The smoke flight contains test-arm64-arm64-xl-xsm so it should contain
build-arm64-xsm (and not contain build-arm64).

I have checked the results with
  OSSTEST_CONFIG=standalone-config-example eatmydata ./standalone-generate-dump-flight-runvars
and looking at the diff shows precisely the expected change.

CC: Stefano Stabellini <sstabellini@kernel.org>
Acked-by: Julien Grall <julien.grall@linaro.org>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agoproduction-config: Update jessie amd64 kernel for NUMA bugfix
Ian Jackson [Thu, 14 Dec 2017 16:15:51 +0000 (16:15 +0000)]
production-config: Update jessie amd64 kernel for NUMA bugfix

Bump TftpDiVersion_jessie.  This installer was generated by me today,
with the git branch including the di_special_kernel series, using this
rune:

 OSSTEST_SPECIALKERNELDEB_jessie_amd64=$PWD/linux-image-3.16.0-4-amd64_3.16.51-3~a.test_amd64.deb ./mg-debian-installer-update-all

The file linux-image-3.16.0-4-amd64_3.16.51-3~a.test_amd64.deb
came from here

 https://people.debian.org/~benh/packages/jessie-pu/linux-image-3.16.0-4-amd64_3.16.51-3~a.test_amd64.deb

apropos of this comment in the Debian bug report:

 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=883938#170

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agomg-debian-installer-update: Honour OSSTEST_SPECIALKERNELDEB_<suite>_<arch>
Ian Jackson [Thu, 14 Dec 2017 15:40:22 +0000 (15:40 +0000)]
mg-debian-installer-update: Honour OSSTEST_SPECIALKERNELDEB_<suite>_<arch>

This variable can be set to the absolute pathname of a kernel .deb to
use.  It will be used only for hosts for which the corresponding
hostflag "need-kernel-deb-<suite>-special" is set.

There is not currently any facility for more than one special kernel
for each architecture.

As with backports kernels, the normal (Debian-supplied) kernel is
available too, and is used for hosts without any special hostflag.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agomg-debian-installer-update: Introduce $specialkernel
Ian Jackson [Thu, 14 Dec 2017 15:37:25 +0000 (15:37 +0000)]
mg-debian-installer-update: Introduce $specialkernel

* In the first half of the backports kernel processing, set
  the new variable specialkernel to the string "backports".
  (This token occurs in the output .deb and kernel name, and
  is also referenced by hostflags of the form
     need-kernel-deb-<suite>-backports.)

* Break out the second half of the backports procesing into its
  own section, conditional on $specialkernel.

* Replace occurrences of the "backports" token, after that point,
  with $specialkernel.

Overall, this will allow other kinds of special kernel to be
introduced.  But there is, for now, no functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agodi_special_kernel: Use in preseed_create
Ian Jackson [Thu, 14 Dec 2017 12:28:08 +0000 (12:28 +0000)]
di_special_kernel: Use in preseed_create

This abolishes yet another open-coding of need-kernel-deb-* handling.

Again, there is little functional change.  A significant change is
that now if the special kernel deb does not exist, we do not fail.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agodi_special_kernel: Provide $tp; Regularise $kernel, $cpio
Ian Jackson [Thu, 14 Dec 2017 15:52:07 +0000 (15:52 +0000)]
di_special_kernel: Provide $tp; Regularise $kernel, $cpio

Make both of these paths relative to $ho->{Tftp}{Path}.  Previously
$kernel was relative to that, but $cpio contained it.

Adjust all callers, so no functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agodi_special_kernel: Use di_installer_path
Ian Jackson [Thu, 14 Dec 2017 13:09:52 +0000 (13:09 +0000)]
di_special_kernel: Use di_installer_path

This avoids the caller having to supply $d_i.  This is good because
there is a site we want to call this from which uses that name for a
different value!

No functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agodi_installer_path: Use in ts-host-install
Ian Jackson [Thu, 14 Dec 2017 13:07:02 +0000 (13:07 +0000)]
di_installer_path: Use in ts-host-install

No significant functional change.  We now honour cfg_tftp_di_version
if the $ho doesn't have the information.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agodi_installer_path: Break out of preseed_create
Ian Jackson [Thu, 14 Dec 2017 13:04:31 +0000 (13:04 +0000)]
di_installer_path: Break out of preseed_create

No functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agodi_special_kernel: Replace open-coding in ts-host-install
Ian Jackson [Thu, 14 Dec 2017 12:23:24 +0000 (12:23 +0000)]
di_special_kernel: Replace open-coding in ts-host-install

The effect is simply to reuse the loop in di_special_kernel.  The
extra tests etc. to compute $k and $c in di_special_kernel are of no
import here, and are harmless.  We have already called
di_special_kernel so if it was going to fail due to this extra
computation, it would do so earlier.

No overall functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agodi_special_kernel: Pass $kp to $fn
Ian Jackson [Thu, 14 Dec 2017 12:23:12 +0000 (12:23 +0000)]
di_special_kernel: Pass $kp to $fn

Adjust the one current caller.  No functional change

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agoDebian: Factor out di_special_kernel from ts-host-install
Ian Jackson [Thu, 14 Dec 2017 12:09:53 +0000 (12:09 +0000)]
Debian: Factor out di_special_kernel from ts-host-install

No functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agocrontab: Fix recipient of cron mails
Ian Jackson [Wed, 13 Dec 2017 17:04:19 +0000 (17:04 +0000)]
crontab: Fix recipient of cron mails

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>