]> xenbits.xensource.com Git - osstest.git/log
osstest.git
6 years agocr-try-bisect: When bisection is done, keep the old mro as mro.done
Ian Jackson [Thu, 17 Jan 2019 11:43:51 +0000 (11:43 +0000)]
cr-try-bisect: When bisection is done, keep the old mro as mro.done

This will help with debugging, or if we want to manually reset/restart
things.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agots-livepatch-run: Fix erroneous $$ in double-check
Ian Jackson [Wed, 16 Jan 2019 11:32:06 +0000 (11:32 +0000)]
ts-livepatch-run: Fix erroneous $$ in double-check

The doubled $s here are simply a mistake.  The result is to make this
test ineffective, since `$$file' means `the value of the variable
whose name is in the variable $file', which here will never exist.
This produces a `Use of uninitialized value' warning and substitutes
the empty string, so overall we test the existence of the directory.

The missing check is not of much consequence since this check is not
really expected ever to fail, and if it does, some actual test
execution would fail due to the missing file.

So overall I think the only change is to log output.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
6 years agots-livepatch-run: Print a message about expected failures
Ian Jackson [Wed, 16 Jan 2019 11:30:49 +0000 (11:30 +0000)]
ts-livepatch-run: Print a message about expected failures

target_cmd_output_root_status prints the command exit status.  If that
was a failure and the failure was as expected, this can be confusing
to readers who do not know that this is a possibility.  So print a
message about it.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
6 years agots-livepatch-run: Treat (just) falseish from OutputCheck as fail
Ian Jackson [Wed, 16 Jan 2019 11:28:49 +0000 (11:28 +0000)]
ts-livepatch-run: Treat (just) falseish from OutputCheck as fail

This is more idiomatic.  All existing OutputChecks return booleans, so
no functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
6 years agoproduction-config: Temporarily drop arm64
Ian Jackson [Mon, 13 Aug 2018 14:54:25 +0000 (15:54 +0100)]
production-config: Temporarily drop arm64

Both our arm64 boxes are out of commission again.

I have filed a ticket to have the recently failed box investigated.
And I am working on the stretcb upgrade which will bring our
Thunder-X into service.

But for now this is the best we can do to unblock everything.

CC: Julien Grall <julien.grall@arm.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agoproduction-config*: Update to fishdescriptor with chroot bugfix
Ian Jackson [Mon, 19 Nov 2018 16:24:42 +0000 (16:24 +0000)]
production-config*: Update to fishdescriptor with chroot bugfix

Deployment note: I have copied this binary to the images directory in
Cambridge and Massachusetts.  The corresponding patch to chiark-utils
is on its way to my upstream hat.

CC: George Dunlap <george.dunlap@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agots-depriv-audit-qemu: chmod +x qemu's chroot
Ian Jackson [Mon, 19 Nov 2018 16:22:04 +0000 (16:22 +0000)]
ts-depriv-audit-qemu: chmod +x qemu's chroot

libxl creates this directory with mode 0.  That prevents
fishdescriptor from working.  chmod it.  This is OK for testing.

CC: George Dunlap <george.dunlap@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agots-depriv-audit-qemu: Create complete /run/user in appropriate root
Ian Jackson [Mon, 19 Nov 2018 16:19:44 +0000 (16:19 +0000)]
ts-depriv-audit-qemu: Create complete /run/user in appropriate root

* Use mkdir -p, rather than trying to only create /run/user/$uid.
  That helps if /run and/or /run/user do not exist, as they do in
  libxl-made chroots with recent libxl (which gets qemu to chroot).

* Do all of this in the root directory of the qemu process, not our
  own root directory.  So it works if qemu is chrooted.

CC: George Dunlap <george.dunlap@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
v2: Actually use $qpid rather than hardcoding 8123 !

squash! ts-depriv-audit-qemu: Create complete /run/user in appropriate root

6 years agots-xen-build: Force reliance on ipxe tarball
Ian Jackson [Mon, 5 Nov 2018 18:31:04 +0000 (18:31 +0000)]
ts-xen-build: Force reliance on ipxe tarball

xen.git/tools/firmware/etherboot/Makefile tries to get a tarball from
xen-extfiles first and if that fails, tries cloning from ipxe.org.

ipxe.org is sometimes down (or half-down) and when that happens
without a tarball the build breaks and is hard to fix.

We would like, therefore, to ensure that the tarball is always made
before the commit which refers to it is in xen.git#master.

osstest has no knowledge of ipxe as a separate thing and just lets
xen.git have whatever version is in Config.mk.  So osstest never needs
to specify particular ipxe version by hash, or the like.

So simply make osstest rely on the tarball existing, by having it
specify a completely invalid URL for the git clone.  This will detect
attempts to update IPXE_GIT_TAG without making a corresponding
tarball.

CC: Paul Durrant <paul.durrant@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
6 years agomfi-common: Enable livepatch tests in 4.10 and 4.11 as intended (!)
Ian Jackson [Thu, 1 Nov 2018 13:02:50 +0000 (13:02 +0000)]
mfi-common: Enable livepatch tests in 4.10 and 4.11 as intended (!)

The pattern xen-4.1* matches xen-4.10-testing, xen-4.11-testing, etc.
The right approach is to state the excluded branch names explicitly
as is done elsewhere.

Resulting changes (standalone-generate-dump-flight-runvars):
 * new jobs: test-amd64-{amd64,i386}-livepatch
 * runvar set: enable_livepatch=true in build-ARCH, build-ARCH-xsm
 * all of the above in branches: xen-4.10-testing xen-4.11-testing

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CC: Andrew Cooper <andrew.cooper3@citrix.com>
6 years agomfi-common: Do not set enable_livepatch on build-*-prev
Ian Jackson [Thu, 1 Nov 2018 13:25:50 +0000 (13:25 +0000)]
mfi-common: Do not set enable_livepatch on build-*-prev

branch_wants_livepatch checks the current Xen version.  We don't want
to try enabling livepatch on trees that don't have it.  And for the
-prev build we care about forward migration etc., not about
livepatching the previous version.

Resulting changes (standalone-generate-dump-flight-runvars):
  runvar removed: enable_livepatch=true
  in jobs:        build-amd64-prev build-i386-prev
  in branches:    xen-4.8-testing xen-4.9-testing xen-unstable

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CC: Andrew Cooper <andrew.cooper3@citrix.com>
6 years agocr-for-branches: Add linux-4.19
Ian Jackson [Tue, 30 Oct 2018 16:04:56 +0000 (16:04 +0000)]
cr-for-branches: Add linux-4.19

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoproduction-config-cambridge: Use squid cache, not local apt proxy
Ian Jackson [Fri, 26 Oct 2018 10:57:42 +0000 (11:57 +0100)]
production-config-cambridge: Use squid cache, not local apt proxy

debian.uk.xensource.com is no more (and the service name seems to have
been discarded).  There is repo.citrite.net instead but it is a
proprietary appliance which - although it claims to be able to handle
apt repositories - is not compatible with debian-installer; at least,
jessie's d-i.

Swap to ftp.uk.debian.org (and rely for caching on the squid cache
which we have for non-apt stuff already).  That works well enough for
stable suites, at least.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agomfi-common: Drop freebsd builds on non-freebsd flights
Ian Jackson [Wed, 24 Oct 2018 10:16:32 +0000 (11:16 +0100)]
mfi-common: Drop freebsd builds on non-freebsd flights

Something is wrong with the freebsd repositories.  This causes freebsd
host installation to fail.  This problem has persisted for a while now
and is blocking other work.

For now, drop these.  The jobs being dropped are
      build-amd64-xen-freebsd
      build-amd64-xen-xsm-freebsd
in the branches
      osstest
      xen-unstable
(verified with standalone-generate-dump-flight-runvars).

CC: Roger Pau Monné <roger.pau@citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
6 years agostandalone-generate-dump-flight-runvars: Add example usage
Ian Jackson [Wed, 24 Oct 2018 10:25:38 +0000 (11:25 +0100)]
standalone-generate-dump-flight-runvars: Add example usage

I have to reinvent these runes each time, which is somewhat annoying.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agosa-init-db: Fix argument parsing
Ian Jackson [Wed, 24 Oct 2018 10:24:36 +0000 (11:24 +0100)]
sa-init-db: Fix argument parsing

It claimed to have a default db name, but it didn't.  Rework the
option parsing to make the usage message true.  (That saves me typing
  sa-init-db standalone
and getting bizarre errors as sqlite tries to treat the shell script
`standalone' as if it were a database file.)

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agocr-for-branches: Add linux 4.4 branch as that is an LTS
Ian Jackson [Wed, 17 Oct 2018 15:47:28 +0000 (16:47 +0100)]
cr-for-branches: Add linux 4.4 branch as that is an LTS

6 years agolibvirt.pm: Drop some unneeded parens (no functional change0
Ian Jackson [Thu, 27 Sep 2018 10:29:23 +0000 (11:29 +0100)]
libvirt.pm: Drop some unneeded parens (no functional change0

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agots-xen-build-prep: install libgnutls28-dev for libvirt build
Wei Liu [Wed, 26 Sep 2018 16:37:04 +0000 (17:37 +0100)]
ts-xen-build-prep: install libgnutls28-dev for libvirt build

d54ecf31b2 placed the build dependency in a wrong file. This patch
adds the dependency to the right file.  Add a runtime dependency in
libvirt.pm.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agomake-flight: Test with `sched=credit'
Ian Jackson [Wed, 19 Sep 2018 10:52:37 +0000 (11:52 +0100)]
make-flight: Test with `sched=credit'

The default in xen-unstable#staging is soon to be sched=credit2.  That
leaves osstest not testing credit1 at all.

Add a job that does this.  It's a copy of the -credit2 job.  (It's
a pretty nugatory test but it will probably do.)

We call the test -credit1, although the Xen parameter is =credit.

I have verified with standalone-generate-dump-flight-runvars that the
effect is to add the appropriately mutated copy of the credit2 job to
every flight.  The mutations are solely the sched= parameter and the
job name.

CC: George Dunlap <george.dunlap@citrix.com>
CC: Dario Faggioli <dfaggioli@suse.com>
CC: Jan Beulich <JBeulich@suse.com>
CC: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CC: Tim Deegan <tim@xen.org>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
6 years agostandalone: Mention sa-init-db on missing standalone.db
Ian Jackson [Wed, 19 Sep 2018 10:29:18 +0000 (11:29 +0100)]
standalone: Mention sa-init-db on missing standalone.db

I usually do not use standalone mode.  But I use it for
  standalone-generate-dump-flight-runvars

That means I have to have a standalone.db.  ./standalone prints a
message about standalone-reset, which does a lot of undesirable stuff.

Mention sa-init-db too.  That just creates the db with empty tables
and is sufficient for standalone-generate-dump-flight-runvars.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agolibvirt: Install GnuTLS for libvirt builds
Jim Fehlig [Wed, 5 Sep 2018 21:43:12 +0000 (15:43 -0600)]
libvirt: Install GnuTLS for libvirt builds

Since libvirt commit 60d9ad6f GnuTLS is required to build libvirt. The
various libvirt build tests in osstest began failing after the commit
hit libvirt.git master. Adding libgnutls28-dev to the list of packages
needed to build libvirt will fix the currently broken builds.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoREADME.dev: Document things that are now handled by ansible in Mass
Ian Jackson [Thu, 13 Sep 2018 16:51:55 +0000 (17:51 +0100)]
README.dev: Document things that are now handled by ansible in Mass

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agosg-run-job: Pair tests: Repeat the migration 10x
Ian Jackson [Fri, 7 Sep 2018 17:50:44 +0000 (18:50 +0100)]
sg-run-job: Pair tests: Repeat the migration 10x

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoosstest: add missing disk driver name
Roger Pau Monne [Wed, 5 Sep 2018 14:11:39 +0000 (16:11 +0200)]
osstest: add missing disk driver name

elbling boxes uses the mfi driver and have the hard disks in
passthrough mode, which means the mfi driver will expose them as
mfisyspd? instead of mfid?. In order for the installer to detect such
disks add mfisyspd0 to the list of disks to probe.

This should fix the host-install issues reported on elbling boxes:

http://logs.test-lab.xenproject.org/osstest/logs/127304/

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoRevert "production-config: Temporarily drop arm64"
Ian Jackson [Wed, 22 Aug 2018 10:49:35 +0000 (11:49 +0100)]
Revert "production-config: Temporarily drop arm64"

This reverts commit 2d3fd8087e746bc5f64d3cf01014aac388a1bb7e.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
CC: Julien Grall <julien.grall@arm.com>
6 years agoosstest: configure git proxy for FreeBSD
Roger Pau Monne [Mon, 20 Aug 2018 10:49:43 +0000 (12:49 +0200)]
osstest: configure git proxy for FreeBSD

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoosstest: make git proxy setup common
Roger Pau Monne [Mon, 20 Aug 2018 10:00:19 +0000 (12:00 +0200)]
osstest: make git proxy setup common

By moving it into TestSupport. No functional change.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoosstest: add a FreeBSD Xen build job to osstest flights
Roger Pau Monne [Wed, 18 Jul 2018 15:49:40 +0000 (17:49 +0200)]
osstest: add a FreeBSD Xen build job to osstest flights

The runvar diff is the following:

+osstest build-amd64-xen-freebsd     all_host_os        freebsd
+osstest build-amd64-xen-xsm-freebsd all_host_os        freebsd
+osstest build-amd64-xen-freebsd     all_hostflags      PropEq:Firmware:bios:bios
+osstest build-amd64-xen-xsm-freebsd all_hostflags      PropEq:Firmware:bios:bios
+osstest build-amd64-xen-freebsd     arch               amd64
+osstest build-amd64-xen-xsm-freebsd arch               amd64
+osstest build-amd64-xen-freebsd     build_lvextend_max 50
+osstest build-amd64-xen-xsm-freebsd build_lvextend_max 50
+osstest build-amd64-xen-freebsd     enable_livepatch   true
+osstest build-amd64-xen-xsm-freebsd enable_livepatch   true
+osstest build-amd64-xen-freebsd     enable_ovmf        false
+osstest build-amd64-xen-xsm-freebsd enable_ovmf        false
+osstest build-amd64-xen-freebsd     enable_xend        false
+osstest build-amd64-xen-xsm-freebsd enable_xend        false
+osstest build-amd64-xen-freebsd     enable_xsm         false
+osstest build-amd64-xen-xsm-freebsd enable_xsm         true
+osstest build-amd64-xen-freebsd     host_hostflags     arch-amd64,purpose-build
+osstest build-amd64-xen-xsm-freebsd host_hostflags     arch-amd64,purpose-build
+osstest build-amd64-xen-freebsd     revision_minios
+osstest build-amd64-xen-xsm-freebsd revision_minios
+osstest build-amd64-xen-freebsd     revision_ovmf
+osstest build-amd64-xen-xsm-freebsd revision_ovmf
+osstest build-amd64-xen-freebsd     revision_qemu
+osstest build-amd64-xen-xsm-freebsd revision_qemu
+osstest build-amd64-xen-freebsd     revision_qemuu     ap-fetch-version-baseline:qemu-upstream-unstable
+osstest build-amd64-xen-xsm-freebsd revision_qemuu     ap-fetch-version-baseline:qemu-upstream-unstable
+osstest build-amd64-xen-freebsd     revision_seabios
+osstest build-amd64-xen-xsm-freebsd revision_seabios
+osstest build-amd64-xen-freebsd     revision_xen       ap-fetch-version-baseline:xen-unstable
+osstest build-amd64-xen-xsm-freebsd revision_xen       ap-fetch-version-baseline:xen-unstable
+osstest build-amd64-xen-freebsd     tree_minios
+osstest build-amd64-xen-xsm-freebsd tree_minios
+osstest build-amd64-xen-freebsd     tree_ovmf
+osstest build-amd64-xen-xsm-freebsd tree_ovmf
+osstest build-amd64-xen-freebsd     tree_qemu          git://xenbits.xen.org/qemu-xen-traditional.git
+osstest build-amd64-xen-xsm-freebsd tree_qemu          git://xenbits.xen.org/qemu-xen-traditional.git
+osstest build-amd64-xen-freebsd     tree_qemuu         git://xenbits.xen.org/qemu-xen.git
+osstest build-amd64-xen-xsm-freebsd tree_qemuu         git://xenbits.xen.org/qemu-xen.git
+osstest build-amd64-xen-freebsd     tree_seabios
+osstest build-amd64-xen-xsm-freebsd tree_seabios
+osstest build-amd64-xen-freebsd     tree_xen           git://xenbits.xen.org/xen.git
+osstest build-amd64-xen-xsm-freebsd tree_xen           git://xenbits.xen.org/xen.git

Suggested-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoosstest: add FreeBSD Xen build job
Roger Pau Monne [Fri, 29 Jun 2018 10:09:37 +0000 (12:09 +0200)]
osstest: add FreeBSD Xen build job

To both the FreeBSD and the xen-unstable flights.

This is the runvar difference of all flights:

+freebsd-master build-amd64-xen-freebsd     all_host_os        freebsd
+freebsd-master build-amd64-xen-freebsd     all_hostflags      PropEq:Firmware:bios:bios
+freebsd-master build-amd64-xen-freebsd     arch               amd64
+freebsd-master build-amd64-xen-freebsd     enable_ovmf
+freebsd-master build-amd64-xen-freebsd     enable_xend
+freebsd-master build-amd64-xen-freebsd     enable_xsm
+freebsd-master build-amd64-xen-freebsd     freebsdbuildjob    build-amd64-freebsd
+freebsd-master build-amd64-xen-freebsd     host_hostflags     arch-amd64,purpose-build
+freebsd-master build-amd64-xen-freebsd     recipe_testinstall true
+freebsd-master build-amd64-xen-freebsd     revision_minios
+freebsd-master build-amd64-xen-freebsd     revision_ovmf
+freebsd-master build-amd64-xen-freebsd     revision_qemu
+freebsd-master build-amd64-xen-freebsd     revision_qemuu     ap-fetch-version-baseline:qemu-upstream-unstable
+freebsd-master build-amd64-xen-freebsd     revision_seabios
+freebsd-master build-amd64-xen-freebsd     revision_xen       ap-fetch-version-baseline:xen-unstable
+freebsd-master build-amd64-xen-freebsd     tree_minios
+freebsd-master build-amd64-xen-freebsd     tree_ovmf
+freebsd-master build-amd64-xen-freebsd     tree_qemu          git://xenbits.xen.org/qemu-xen-traditional.git
+freebsd-master build-amd64-xen-freebsd     tree_qemuu         git://xenbits.xen.org/qemu-xen.git
+freebsd-master build-amd64-xen-freebsd     tree_seabios
+freebsd-master build-amd64-xen-freebsd     tree_xen           git://xenbits.xen.org/xen.git
+xen-unstable   build-amd64-xen-freebsd     all_host_os        freebsd
+xen-unstable   build-amd64-xen-xsm-freebsd all_host_os        freebsd
+xen-unstable   build-amd64-xen-freebsd     all_hostflags      PropEq:Firmware:bios:bios
+xen-unstable   build-amd64-xen-xsm-freebsd all_hostflags      PropEq:Firmware:bios:bios
+xen-unstable   build-amd64-xen-freebsd     arch               amd64
+xen-unstable   build-amd64-xen-xsm-freebsd arch               amd64
+xen-unstable   build-amd64-xen-freebsd     build_lvextend_max 50
+xen-unstable   build-amd64-xen-xsm-freebsd build_lvextend_max 50
+xen-unstable   build-amd64-xen-freebsd     enable_livepatch   true
+xen-unstable   build-amd64-xen-xsm-freebsd enable_livepatch   true
+xen-unstable   build-amd64-xen-freebsd     enable_ovmf        false
+xen-unstable   build-amd64-xen-xsm-freebsd enable_ovmf        false
+xen-unstable   build-amd64-xen-freebsd     enable_xend        false
+xen-unstable   build-amd64-xen-xsm-freebsd enable_xend        false
+xen-unstable   build-amd64-xen-freebsd     enable_xsm         false
+xen-unstable   build-amd64-xen-xsm-freebsd enable_xsm         true
+xen-unstable   build-amd64-xen-freebsd     host_hostflags     arch-amd64,purpose-build
+xen-unstable   build-amd64-xen-xsm-freebsd host_hostflags     arch-amd64,purpose-build
+xen-unstable   build-amd64-xen-freebsd     revision_minios
+xen-unstable   build-amd64-xen-xsm-freebsd revision_minios
+xen-unstable   build-amd64-xen-freebsd     revision_ovmf
+xen-unstable   build-amd64-xen-xsm-freebsd revision_ovmf
+xen-unstable   build-amd64-xen-freebsd     revision_qemu
+xen-unstable   build-amd64-xen-xsm-freebsd revision_qemu
+xen-unstable   build-amd64-xen-freebsd     revision_qemuu     ap-fetch-version-baseline:qemu-upstream-unstable
+xen-unstable   build-amd64-xen-xsm-freebsd revision_qemuu     ap-fetch-version-baseline:qemu-upstream-unstable
+xen-unstable   build-amd64-xen-freebsd     revision_seabios
+xen-unstable   build-amd64-xen-xsm-freebsd revision_seabios
+xen-unstable   build-amd64-xen-freebsd     revision_xen       ap-fetch-version:xen-unstable
+xen-unstable   build-amd64-xen-xsm-freebsd revision_xen       ap-fetch-version:xen-unstable
+xen-unstable   build-amd64-xen-freebsd     tree_minios
+xen-unstable   build-amd64-xen-xsm-freebsd tree_minios
+xen-unstable   build-amd64-xen-freebsd     tree_ovmf
+xen-unstable   build-amd64-xen-xsm-freebsd tree_ovmf
+xen-unstable   build-amd64-xen-freebsd     tree_qemu          git://xenbits.xen.org/qemu-xen-traditional.git
+xen-unstable   build-amd64-xen-xsm-freebsd tree_qemu          git://xenbits.xen.org/qemu-xen-traditional.git
+xen-unstable   build-amd64-xen-freebsd     tree_qemuu         git://xenbits.xen.org/qemu-xen.git
+xen-unstable   build-amd64-xen-xsm-freebsd tree_qemuu         git://xenbits.xen.org/qemu-xen.git
+xen-unstable   build-amd64-xen-freebsd     tree_seabios
+xen-unstable   build-amd64-xen-xsm-freebsd tree_seabios
+xen-unstable   build-amd64-xen-freebsd     tree_xen           git://xenbits.xen.org/xen.git
+xen-unstable   build-amd64-xen-xsm-freebsd tree_xen           git://xenbits.xen.org/xen.git

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v2:
 - Only add FreeBSD Xen buildjobs to the xen-* branches.

Changes since v1:
 - Fix enabling of FreeBSD Xen buildjob based on branch.
 - Introduce a helper to add the FreeBSD Xen build jobs.
 - Introduce the ts-xen-build-freebsd wrapper around ts-xen-build for
   FreeBSD.
 - Introduce a create_xen_build_job helper.

6 years agoosstest: introduce a helper to create Xen build jobs
Roger Pau Monne [Thu, 12 Jul 2018 14:54:41 +0000 (16:54 +0200)]
osstest: introduce a helper to create Xen build jobs

This is currently a non-functional change, since no new jobs are
added, and the existing ones should stay unchanged. Runvars of all
flights remain unchanged.

The purpose of the helper is to allow adding different Xen build jobs,
with likely different runvars in the future.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoosstest: set the make command to use for xen-build
Roger Pau Monne [Fri, 29 Jun 2018 08:18:04 +0000 (10:18 +0200)]
osstest: set the make command to use for xen-build

The default make on FreeBSD is the BSD make, and Xen requires the GNU
make in order to build. Set the make command based on the OS for the
Xen build.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v1:
 - Use gmake for all BSDs.

6 years agoosstest: limit FreeBSD jobs to hardware booting in BIOS mode
Roger Pau Monne [Wed, 4 Jul 2018 16:06:17 +0000 (18:06 +0200)]
osstest: limit FreeBSD jobs to hardware booting in BIOS mode

There's no support yet in osstest to install FreeBSD from UEFI, so for
the time being limit the FreeBSD jobs to boxes booting with legacy
BIOS.

The hostflags are not set for examine jobs, in order to avoid them
from only running on BIOS boxes.

The runvar difference with this patch applied is:

+freebsd-master build-amd64-freebsd       all_hostflags PropEq:Firmware:bios:bios
+freebsd-master build-amd64-freebsd-again all_hostflags PropEq:Firmware:bios:bios

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v2:
 - Fix hosts flight to not require BIOS firmware.

Changes since v1:
 - Fix nonbreaking space.
 - Fix long line.

6 years agoosstest: abstract code to create a FreeBSD build job
Roger Pau Monne [Wed, 4 Jul 2018 15:21:48 +0000 (17:21 +0200)]
osstest: abstract code to create a FreeBSD build job

Into a helper. A diff of the runvars of flights generated with and
without the patch show no differences.

No functional change.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoosstest: remove duplicate set_freebsd_runvars
Roger Pau Monne [Fri, 29 Jun 2018 11:45:09 +0000 (13:45 +0200)]
osstest: remove duplicate set_freebsd_runvars

The set_freebsd_runvars helper in mfi-common is a superset of the
original function present in make-freebsd-flight, and will attempt to
fetch the last anointed FreeBSD build as a last resort option if no
FreeBSD build is signaled from the FreeBSD env vars. There's no reason
to have this duplication, since the set_freebsd_runvars in mfi-common
is perfectly suitable to be used by make-freebsd-flight.

This duplication was wrongly introduced by d36a7d892f by adding a
set_freebsd_runvars to mfi-common without removing the original
function in make-freebsd-flight.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v1:
 - Add commit message.

6 years agoosstest: allow appending to existing runvars
Ian Jackson [Wed, 4 Jul 2018 15:21:15 +0000 (17:21 +0200)]
osstest: allow appending to existing runvars

So that the contents of the runvar can be expanded. There are
currently two ways to do this:

 - Using += will append to the end of the runvar.
 - Using ,= will append to the end of the runvar using ',' as the
   separator.

Note that if the runvar is empty {,|+}= just sets the runvar.

Signed-off-by: Ian Jackson <ian.jackson@citrix.com>
6 years agodummy flight generation: cs-hosts-list should not print { }
Ian Jackson [Tue, 17 Jul 2018 14:51:42 +0000 (14:51 +0000)]
dummy flight generation: cs-hosts-list should not print { }

With newer bash, this causes
      local envvar="FREEBSD_${arch^^}_BUILDJOB"
      if [ -n "${!envvar}" ]; then
to (properly) report a syntax error.

As Roger says, it is better to print a dummy host for each
architecture, so do that.

Reported-by: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agodummy flight generation: Tolerate lack of repos
Ian Jackson [Tue, 17 Jul 2018 14:50:35 +0000 (14:50 +0000)]
dummy flight generation: Tolerate lack of repos

In particular
  OSSTEST_CONFIG=standalone-config-example eatmydata bash -x ./standalone-generate-dump-flight-runvars
should not require ~/osstest-repos to exist.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agocr-publish-flight-logs: Work with --push-harness but no remote git
Ian Jackson [Tue, 14 Aug 2018 09:48:02 +0000 (10:48 +0100)]
cr-publish-flight-logs: Work with --push-harness but no remote git

--push-harness might be specified even though there is no git tree to
push to.  In that situation, do not daftly not even push the logs.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agoproduction-config: Temporarily drop arm64
Ian Jackson [Mon, 13 Aug 2018 14:54:25 +0000 (15:54 +0100)]
production-config: Temporarily drop arm64

Both our arm64 boxes are out of commission and repairing them is
taking too long.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Julien Grall <julien.grall@arm.com>
6 years agoPublish: Cambridge: Get the public URL right
Ian Jackson [Wed, 11 Jul 2018 14:10:30 +0000 (15:10 +0100)]
Publish: Cambridge: Get the public URL right

This URL is now accessible, although there are some webserver tweaks
remaining to do.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agoPublish: Cambridge: Publish to new public host
Ian Jackson [Wed, 11 Jul 2018 11:20:00 +0000 (12:20 +0100)]
Publish: Cambridge: Publish to new public host

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agoPublish: Introduce {Logs,Results}PublishSshOpts
Ian Jackson [Wed, 11 Jul 2018 11:06:12 +0000 (12:06 +0100)]
Publish: Introduce {Logs,Results}PublishSshOpts

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agoPublish: Introduce publish_ssh_opts
Ian Jackson [Wed, 11 Jul 2018 11:15:50 +0000 (12:15 +0100)]
Publish: Introduce publish_ssh_opts

We need to pass it $cfgbase because this will soon be configurable.

No functional change right now.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agocr-publish-flight-logs: Refactor rsync -e option construction
Ian Jackson [Wed, 11 Jul 2018 11:07:47 +0000 (12:07 +0100)]
cr-publish-flight-logs: Refactor rsync -e option construction

Previously this was hardcoded.  Now we make a variable @ssh, and use
rsync's quoting scheme to transform it into a value suitable for -e.

No overall functional change, although now the rsync command contains
additional quotes in the -e option.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agocr-publish-flight-logs: Refactor copydir args
Ian Jackson [Wed, 11 Jul 2018 11:02:26 +0000 (12:02 +0100)]
cr-publish-flight-logs: Refactor copydir args

Have it take $cfgbase and $subdir instead.  This allows us to lift the
config test into it.  And it will be even more useful in a moment.

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agoPublish: Default LogsPublish and ResultsPublish from Publish
Ian Jackson [Wed, 11 Jul 2018 10:48:40 +0000 (11:48 +0100)]
Publish: Default LogsPublish and ResultsPublish from Publish

And delete the explicit settings from production-config.

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agocr-ensure-disk-space: With -D, print check_space command
Ian Jackson [Wed, 11 Jul 2018 13:20:07 +0000 (14:20 +0100)]
cr-ensure-disk-space: With -D, print check_space command

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agoresource allocation: PropEq, PropMinVer: support defaults
Ian Jackson [Wed, 4 Jul 2018 10:53:11 +0000 (11:53 +0100)]
resource allocation: PropEq, PropMinVer: support defaults

Now you can pass another :-separated argument, the default value to
use if none is specified.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Roger Pau Monné <royger@FreeBSD.org>
6 years agoresource allocation: PropEq, PropMinVer: Honour HostProp_...
Ian Jackson [Wed, 4 Jul 2018 10:52:27 +0000 (11:52 +0100)]
resource allocation: PropEq, PropMinVer: Honour HostProp_...

We need to take these from the config too.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Roger Pau Monné <royger@FreeBSD.org>
6 years agoresource allocation: PropCompareBase: Break out _get_val
Ian Jackson [Wed, 4 Jul 2018 10:41:22 +0000 (11:41 +0100)]
resource allocation: PropCompareBase: Break out _get_val

This is going to make defaulting etc. a bit easier.

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Roger Pau Monné <royger@FreeBSD.org>
6 years agoPDU: ipmi: Pass further options to ipmitool
Ian Jackson [Wed, 11 Jul 2018 14:31:30 +0000 (14:31 +0000)]
PDU: ipmi: Pass further options to ipmitool

This is useful, for example, for passing `-I lanplus'.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoPDU: ipmi: Only log the first cmd run
Ian Jackson [Wed, 11 Jul 2018 14:31:03 +0000 (14:31 +0000)]
PDU: ipmi: Only log the first cmd run

This quietens the output again.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoPDU: pause: Honour OSSTEST_PDU_NOPAUSE
Ian Jackson [Wed, 11 Jul 2018 14:27:27 +0000 (14:27 +0000)]
PDU: pause: Honour OSSTEST_PDU_NOPAUSE

For debugging.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoPDU: ipmi: Use arrays rather than strings for cmd
Ian Jackson [Wed, 11 Jul 2018 14:26:45 +0000 (14:26 +0000)]
PDU: ipmi: Use arrays rather than strings for cmd

This allows arguments with spaces, etc.

No functional change with the existing configurations I know about.
It would be good to fix this before any configurations are created
where this would make a difference...

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agocs-adjust-flight: Allow runvar-build-set new value to be just "."
Ian Jackson [Fri, 6 Jul 2018 13:36:37 +0000 (14:36 +0100)]
cs-adjust-flight: Allow runvar-build-set new value to be just "."

This is useful because if you say new: for the flight to be adjusted,
you don't have the flight number.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agots-depriv-audit-qemu: Leaked substeps are `blocked', and then script is fail
Ian Jackson [Fri, 6 Jul 2018 11:08:33 +0000 (12:08 +0100)]
ts-depriv-audit-qemu: Leaked substeps are `blocked', and then script is fail

If thus script crash in some non-substep-specific operation, the
substeps may have been created (and thus be in the db as `running').
Leaving them like this is not allowed: it is treated by sg-run-job,
and by the archaeologists as an internal error.

If this happens, what we want is for the script as a whole to be
`fail', and for the failing tests to be `blocked'.  The former will
spot if this crash is a regression.  The latter will avoid treating
the substeps themselves as regressions.

Reported-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agoarmhf, xsm: Drop XSM tests on 32-bit ARM
Ian Jackson [Fri, 6 Jul 2018 11:05:37 +0000 (12:05 +0100)]
armhf, xsm: Drop XSM tests on 32-bit ARM

We are at the limit of ARM capacity, which has not kept pace with X86
expansion.  New hardware is on the way but it is not here yet.

Dropping the XSM tests drops one test, but also one build, which saves
considerable effort.  Builds are currently the bottleneck, because we
avoid building on the unreliable Arndale boards.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Julien Grall <julien.grall@arm.com>
6 years agoxsm_variants: Allow XSM enablement to depend on the architecture
Ian Jackson [Fri, 6 Jul 2018 11:04:25 +0000 (12:04 +0100)]
xsm_variants: Allow XSM enablement to depend on the architecture

Builds and tests have different ideas about arch variables, because
tests have dom0 arch, xen arch, etc.  So pass it in as a parameter.

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agolibvirt build: Set make_njobs=1 except when testing libvirt
Ian Jackson [Fri, 6 Jul 2018 10:36:59 +0000 (11:36 +0100)]
libvirt build: Set make_njobs=1 except when testing libvirt

libvirt has a -j bug.  This is allegedly going to be fixed in upstream
RSN ?  Anyway, for now, serialise all the builds on other branches so
they are not affected.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agoBuildSupport: Honour new runvar make_njobs
Ian Jackson [Fri, 6 Jul 2018 10:25:36 +0000 (11:25 +0100)]
BuildSupport: Honour new runvar make_njobs

Having a hardcoded -j4, and having this come via DefMakeFlags, is not
brilliant.  But at least this make_njobs variable has better semantics
so won't make it harder to make this more sophisticated later.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agoPDU::ipmi_try: New method
Ian Jackson [Mon, 2 Jul 2018 16:40:40 +0000 (16:40 +0000)]
PDU::ipmi_try: New method

For power on, this is just like ipmi.

For power off, it doesn't mind errors (although it has three
attempts).  This is useful when combined with pdu power: if the
chassis power is already off, ipmi will fail.

If the ipmi operation does fail, then the chassing pdu power operation
will do the job.  So this will also fix things if the test case
crashed the bmc or something.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoPDU::pause: Better pause time configuration
Ian Jackson [Mon, 2 Jul 2018 15:39:47 +0000 (15:39 +0000)]
PDU::pause: Better pause time configuration

If no time is specified, use 120 (or the PowerOnTime host property
value) when powering on, or 10 when powering off.

This is all intended to be used like this:
  HostProp_rimava0_PowerMethod nest; msw --apc6 pdu2 19; pause; ipmi rimava0m

This means:
  * For power on, first turn on the APC PDU pdu2 port 19
  * Wait 120s (or HostProp_rimava0_PowerOnTime)
  * Then ipmi to the host name rimava0m with ADMIN/ADMIN
    (or HostProp_rimava0_IpmiUser/HostProp_rimava0_IpmiPassword)
  * For power off, do that in reverse, only with a 10s pause.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agoPowerMethod: New pause functionality
Ian Jackson [Fri, 29 Jun 2018 16:32:16 +0000 (16:32 +0000)]
PowerMethod: New pause functionality

And, an abbreviation for invoking it: just writing numbers (or
<on>/<off> pair of numbers).

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoPowerMethod: New "nest" psuedo-method
Ian Jackson [Fri, 29 Jun 2018 16:29:45 +0000 (16:29 +0000)]
PowerMethod: New "nest" psuedo-method

If specified as the first method, it means to reverse the order when
powering off.

There don't seem to be any docs for PowerMethod, so I have not
documented this right now.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoPDU::ipmi: Better username/password configuration
Ian Jackson [Mon, 2 Jul 2018 15:46:20 +0000 (15:46 +0000)]
PDU::ipmi: Better username/password configuration

This can now come from host properties, or failing that we use
ADMIN/ADMIN which seems common.

No functional change with working existing configs.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agoPDU::ipmi: Do not return until the power state has changed
Ian Jackson [Fri, 29 Jun 2018 16:11:35 +0000 (16:11 +0000)]
PDU::ipmi: Do not return until the power state has changed

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agocrontabs: Run freebsd-master only three times per week
Ian Jackson [Wed, 27 Jun 2018 13:39:29 +0000 (14:39 +0100)]
crontabs: Run freebsd-master only three times per week

freebsd master seems to update very frequently and our tests are
pretty minimal.  Right now having a permanent freebsd build test going
is probably not a very good use of our resources.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
6 years agoosstest: move install of FreeBSD build deps to build-prep
Roger Pau Monne [Fri, 29 Jun 2018 06:58:57 +0000 (08:58 +0200)]
osstest: move install of FreeBSD build deps to build-prep

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoosstest: allow to treat host install errors as failures
Roger Pau Monne [Fri, 29 Jun 2018 06:58:57 +0000 (08:58 +0200)]
osstest: allow to treat host install errors as failures

And use it for the build-amd64-freebsd-again job, which should test
the new FreeBSD build produced by build-amd64-freebsd and a host
install error should be treated as a failure in order to trigger the
bisection.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoDebian preseed: Disable security archive for jessie arm64
Ian Jackson [Fri, 29 Jun 2018 11:15:35 +0000 (11:15 +0000)]
Debian preseed: Disable security archive for jessie arm64

jessie arm64 is out of security support, see
  https://wiki.debian.org/LTS
and the security archive at
  http://security.debian.org/dists/jessie/updates/main/binary-arm64
is gone.  This causes autoinstallation to fail.  We don't really care
much about the lack of security support, so override the set of `apt
services'.

I have tested that this can once again now install on arm64 on one of
the laxtons.  Because currently all arm64 tests are broken, and this
change affects only arm64, I will force push it right away.

CC: Julien Grall <julien.grall@linaro.org>
CC: Juergen Gross <jgross@suse.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoproduction-config: Update TftpDiVersion
Ian Jackson [Tue, 26 Jun 2018 14:25:09 +0000 (15:25 +0100)]
production-config: Update TftpDiVersion

In both places.  I have run
  ./mg-debian-installer-update-all jessie

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agocr-for-branches: Branch for Xen 4.11
Ian Jackson [Mon, 25 Jun 2018 13:59:41 +0000 (14:59 +0100)]
cr-for-branches: Branch for Xen 4.11

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agoosstest: use -DWITHOUT_AUTO_OBJ with FreeBSD release targets
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>
---
v19: Rework on top of target_run_pkgmanager_install

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 agoTestSupport: Introduce target_run_pkgmanager_install
Ian Jackson [Thu, 21 Jun 2018 15:44:10 +0000 (16:44 +0100)]
TestSupport: Introduce target_run_pkgmanager_install

This replaces target_run_apt.  It takes more abstract options.  It
also constructs a @cmd, allowing more flexibility, and supports -f.

The use in ts-xen-install, when handling extradebs, is a bit anomalous
because of the empty package list, but it is an anomaly inherited from
apt (and this is an apt-specific context).

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
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 agocr-daily-branch, cr-publish-flight-logs: Tolerate failure to push harness
Ian Jackson [Wed, 13 Jun 2018 13:50:13 +0000 (14:50 +0100)]
cr-daily-branch, cr-publish-flight-logs: Tolerate failure to push harness

Provide cr-publish-flight-logs --push-harness-try, which attempts the
push but doesn't mind if it fails.

If we are not --real, tolerate failure to publish the flight logs.

Also, honour OSSTEST_PUSH_HARNESS which might contain '' or
--push-harness or --push-harness-try.

CC: Roger Pau Monné <roger.pau@citrix.com>
Tested-by: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agosg-execute-flight: make nqueued be right
Ian Jackson [Tue, 12 Jun 2018 16:10:21 +0000 (17:10 +0100)]
sg-execute-flight: make nqueued be right

LIMIT 1 means it's either 0 or 1.  It would be nicer for the
transcript to show the real value.  For logic purposes, it's only ever
tested for zero, so no functional change except to messages.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agodm restrict audit: Document future plans
Ian Jackson [Tue, 12 Jun 2018 12:40:56 +0000 (13:40 +0100)]
dm restrict audit: Document future plans

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agodm restrict audit: Run ts-depriv-audit-qemu
Ian Jackson [Thu, 7 Jun 2018 16:02:40 +0000 (17:02 +0100)]
dm restrict audit: Run ts-depriv-audit-qemu

Add the new steps to jobs where the `recipe_dmrestrict' runvars is
set, and set that flag on the relevant job.

We introduce the new recipe-flag proc in sg-run-job to make this
more convenient.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agodm restrict audit: Provide auditing script
Ian Jackson [Tue, 12 Jun 2018 12:24:21 +0000 (13:24 +0100)]
dm restrict audit: Provide auditing script

ts-depriv-audit-qemu knows how to create a domain paused, and audit
its fds.  It uses
  * osstest-depriv-fd-collector, an on-test-host helper script
  * fishdescriptor, a new utility program in chiark-scripts
  * depriv-fd-checker, a new test program in xen.git

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agodm restrict audit: install newer chiark-scripts for fishdescriptor
Ian Jackson [Thu, 7 Jun 2018 15:57:32 +0000 (16:57 +0100)]
dm restrict audit: install newer chiark-scripts for fishdescriptor

fishdescriptor is not in stretch or earlier.  It will be in buster,
and we expect that a suitable version will be available in
stretch-backports soon.

For jessie, use DebianExtraPackages to install the .deb from buster
(which is directly installable on jessie).

Deployment note: I have already copied the .deb to the images
directories in Massachusetts and Cambridge.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agotoolstack: Provide guest_unpause
Ian Jackson [Tue, 29 May 2018 17:56:50 +0000 (18:56 +0100)]
toolstack: Provide guest_unpause

Only for xl (and xm) for now.

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