]> xenbits.xensource.com Git - people/royger/osstest.git/log
people/royger/osstest.git
5 years agomake-flight: Drop all win10 tests in all flights
Ian Jackson [Thu, 7 Nov 2019 17:46:48 +0000 (17:46 +0000)]
make-flight: Drop all win10 tests in all flights

These are failing and have been for some time and it does not appear
that anyone has the capability to fix them.  Running them in these
circumstances seems wasteful.

Effect is to drop test-*-win10-* jobs (checked with
standalone-generate-dump-flight-runvars).

CC: Sander Eikelenboom <linux@eikelenboom.it>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
5 years agosg-report-host-history: Reduce limit from 2000 to 200
Ian Jackson [Wed, 6 Nov 2019 16:49:36 +0000 (16:49 +0000)]
sg-report-host-history: Reduce limit from 2000 to 200

Currently the "sg-report-host-history" part of most flights is taking
an inordinate amount of time.  Hours.  These are serialised and this
is a big problem, seriously impeding throughput.

Reducing this limit by a factor of 10 will reduce the available
history when we are looking at host-specific problems.  It is an
emergency fix.

I am working on an arrangement which will avoid having to rescan all
of history each time and which will instead reuse previous output.

CC: Jürgen Groß <jgross@suse.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agoadhoc-revtuple-generator: Bisect over 5000 commits (really)
Ian Jackson [Mon, 4 Nov 2019 16:50:38 +0000 (16:50 +0000)]
adhoc-revtuple-generator: Bisect over 5000 commits (really)

In e9b0653875b3 we changed one of the `1000' values to `5000'.  But
this magic number had been duplicated.  Urgh!

The result is that adhoc-revtuple-generator might generate a weirdly
truncated output which causes cs-bisection-stop to fail with messages
like this:
  *** not RelvUp at 3d40147282670d597b336be5599b5cc4c2ff7ddd  at ./cs-bisection-step line 554.
  *** not RelvDown at 2fa3479cfadb0bb3fe694dbfd29f2350eb2570df  at ./cs-bisection-step line 554.
  *** not RelvUp at 2fa3479cfadb0bb3fe694dbfd29f2350eb2570df  at ./cs-bisection-step line 554.
  ...
  Use of uninitialized value in concatenation (.) or string at ./cs-bisection-step line 747.
  Should test .
  BROKEN see earlier errors. at ./cs-bisection-step line 1454, <SVGI> line 10089.

Fix this by (i) plumbing the magic value we already edited properly
back to the (command-line controlled) global variable (ii) changing
the global variable from 1000 to 5000.

git-grep '\b1000\b'  still produces a fair amount of output but most
of it is timeouts, which is fair enough.  There is also a flight
count limit in sg-report-flight, which limits how far back it is
willing to look.  We don't want to change that here.

With this change, cs-bisection-step on the currently-failing freebsd
build job does this:
  Searching for interesting versions
  Result found: flight 141420 (pass), for basis pass
  Result found: flight 143397 (fail), for basis failure
  Need to reproduce basis pass (pass); had 1 already.
  Should test 2fa3479cfadb0bb3fe694dbfd29f2350eb2570df.

This looks plausible: it is picking up where it left off before the
basis pass fell over its horizon.

CC: Roger Pau Monné <royger@FreeBSD.org>
CC: Jürgen Groß <jgross@suse.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agogrub2 setup: Set GRUB_TERMINAL=console, if no other setting
Ian Jackson [Thu, 31 Oct 2019 14:57:45 +0000 (14:57 +0000)]
grub2 setup: Set GRUB_TERMINAL=console, if no other setting

The default for d-i, if it doesn't know better, is to let update-grub
set grub's terminal to `gfxterm'.  But in osstest we do not really
ever want to use a graphical console.

Let us discuss some of the cases in a bit more detail:

On UEFI systems with a serial console, the UEFI console ought (and in
our installation is in all cases so far) typically linked to the
serial console.  So GRUB_TERMINAL=console would be right for UEFI.
This appears to be correct on the albanas, our one pair of in-service
x86 boxes with a UEFI firmware configuration.

But on x86 systems, we generally pass console=ttyS... arguments on the
d-i command line, and d-i arranges for GRUB_TERMINAL=serial and
appropriate other settings.  We already have a workaround that changes
that to "serial console", which is fine whether "console" means a VGA
console we don't look at, or some kind of BIOS console redirection.
This currently works on all our x86 machines including o UEFI.

On our ThunderX (arm64) boxes, `gfxterm' does not work at all.
`console', does, because it goes to the UEFI console which UEFI sends
to the serial port.

The best approach to unpicking this mess seems to be to apply a
default setting of GRUB_TERMINAL=console.  The effect of this is to
change `gfxterm' in grub.cfg.  In practice all our x86
boxes (including our x86 UEFI boxes, where `console' would work) have
it set to `serial' (modified by us to `serial console') so remain
unchanged.

The net result is that on ARM, we now set `GRUB_TERMINAL=console', and
we now get all of the bootloader serial output on the rochesters.

I have tested this on:
  rochester0         - arm64 uefi ThunderX, used not to work
  laxton1            - arm64 uefi SoftIron
  albana0            - x86 uefi
  huxelrebe0         - x86 bios
  arndale-westfield  - armhf u-boot
  cubietruck-gleizes - armhf u-boot

Thanks to Brian Woods for poking at rochester0 and making the key
suggestions.

CC: Brian Woods <brian.woods@xilinx.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
CC: Julien Grall <julien.grall@arm.com>
CC: Jürgen Groß <jgross@suse.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agoxl guest creation: Pause 10s to work around libxl/blkback races
Ian Jackson [Wed, 30 Oct 2019 16:04:49 +0000 (16:04 +0000)]
xl guest creation: Pause 10s to work around libxl/blkback races

In ea6626f7edd9eb40a3510eaf6816a77cac4f63d0
  guest_prepare_disk: Only do the umount if we set an env var
we removed (in the usual case) a check for the guest disk
already being mounted in dom0 etc.  This check is there for
ad-hoc testing.

We removed it because it exposes what we think is an annoying race in
blkback.

Unfortunately this change seems to have made guest-rapid-restart races
worse rather than better.  Steps test-* guest-start/debian.repeat seem
to fail a lot more now.

We are in the throes of preparing the Xen 4.13 release.  These guest
restart races have existed for a long time.

Bodge this for now by adding a sleep :-/.

We do this in the xl toolstack, during domain creation.  And also in
the libvirt toolstack because that uses xl but doesn't inherit the
sleep from the Osstest module.

Release-acked-by: Jürgen Groß <jgross@suse.com>
CC: Wei Liu <wl@xen.org>
CC: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agoother_revision_job_suffix: disregard recursive FreeBSD builds
Ian Jackson [Fri, 25 Oct 2019 15:25:24 +0000 (15:25 +0000)]
other_revision_job_suffix: disregard recursive FreeBSD builds

We aren't actually interested in bisecting the FreeBSD
version (usually, the anointed version) which was used as the platform
for the failed builds.  We are thereby making the assumption that any
build failure (or indeed test failure) is the result in changes to the
recent FreeBSD being actually built or used, not the version being
used as a build host.

Achieve ignoring this by having other_revision_job_suffix return a new
magic new value DISCARD, which all callers must know means `skip
this one'.  There are three call sites:

In cs-bisection-step:flight_rmap, we skip those rows in the Perl
loop.  (We can't skip them conveniently in the SQL because we can't
refer to the column `othrev'; we'd have to duplicate the expression,
or have a subquery.  This doesn't seem likely to matter much.)

In cs-bisection-step:preparejob, we always compare the returned suffix
with a fixed value (which eventually came from the previous call).  So
DISCARD will never match.  No change is needed here.

In Osstest.pm:main_revision_job_cond, we compare the returned suffix
with ''.  Again, it will never match and no change is needed.

I have checked that now a cs-bisection-step run chooses a single
FreeBSD master commit to try to build.

CC: Roger Pau Monné <royger@FreeBSD.org>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agoadhoc-revtuple-generator: Bisecting over 5000 commits
Ian Jackson [Fri, 25 Oct 2019 15:24:00 +0000 (15:24 +0000)]
adhoc-revtuple-generator: Bisecting over 5000 commits

Rather than merely 1000.  Right now we have a troublesome FreeBSD
build problem which needs this!

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agopower_cycle_sleep: Change default sleep to 15s
Ian Jackson [Thu, 24 Oct 2019 10:46:13 +0000 (11:46 +0100)]
power_cycle_sleep: Change default sleep to 15s

5s is so short that when a host fails to respond we aren't sure if it
was just very idle and ran off its PSU's internal energy storage for
that period.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agomake-flight: Drop arm64 with Linux before 4.10
Ian Jackson [Wed, 23 Oct 2019 14:55:06 +0000 (15:55 +0100)]
make-flight: Drop arm64 with Linux before 4.10

The driver for the laxtons' network cards is not in 4.4 (and that's
quite old).  Our ThunderX's may even require something more recent but
we will cross that bridge when we see it.

Effect is to drop the following jobs:
  linux-4.1  *arm64*
  linux-4.4  *arm64*
  linux-4.9  *arm64*
(Checked by eyeballing standalone-generate-dump-flight-runvars diff.)

CC: Julien Grall <julien.grall@arm.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Julien Grall <julien.grall@arm.com>
5 years agomake-flight: Rework arch_branch_filter_callback slightly
Ian Jackson [Wed, 23 Oct 2019 14:49:43 +0000 (15:49 +0100)]
make-flight: Rework arch_branch_filter_callback slightly

Now we have two lists of things not supported on ARM: one of branches
where that's inherent in the branch somehow, and one for those where
the kernel is simply too old.  The latter are going to differ between
armhf and arm64.

No functional change.
(Verified with standalone-generate-dump-flight-runvars.)

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agoToolstack/xl: Wrap a long command
Ian Jackson [Mon, 21 Oct 2019 13:31:42 +0000 (14:31 +0100)]
Toolstack/xl: Wrap a long command

No functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agoguest_prepare_disk: Only do the umount if we set an env var
Ian Jackson [Mon, 21 Oct 2019 13:23:55 +0000 (14:23 +0100)]
guest_prepare_disk: Only do the umount if we set an env var

This call to guest_umount_lv is here for the benefit of ad-hoc reruns
of (eg) ts-guest-start tidy up any ad-hoc messing about (eg from
earlier runs of ts-debian-fixup or something).  It is not needed in
production runs.

Serendipitously, this osstest code discovered a bug in the Linux
blkback: when tearing down, it sets the backend state to 6 before it
has closed the underlying block devices.  This ultimately means that
after "xl destroy" or "xl shutdown -w" there is a period when the
guest's open handle onto its storage is still open.  This is wrong.

This detection depends on us winning a tricky race.  So it shows up in
osstest as a very low probability heisenbug.  The bug is currently in
all versions of Linux and causing a bit of a nuisance.

It would be best to add a proper check for this bug.  However, this is
quite fiddly: really, it ought to be done as close to the xl command
completion as possible, in the same ssh invocation.  That would
involve a fair bit of plumbing and ad-hocery.  I don't think that
would be proportionate for such a low-impact bug.

So instead in this patch I just disable this cleanup code in the
troublesome case, unless it is explicitly requested by the user
setting OSSTEST_GUEST_DISK_MOUNT_CLEANUP to a trueish value.  (This
would be reasonably convenient for the ad-hoc testing that this call
serves.)

Thanks to Roger for diagnosing the Linux kernel bug.

CC: Jürgen Groß <jgross@suse.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Reviewed-by: Roger Pau Monne <roger.pau@citrix.com>
5 years agocs-adjust-flight: Provide runvar-set-default
Ian Jackson [Wed, 16 Oct 2019 13:46:57 +0000 (14:46 +0100)]
cs-adjust-flight: Provide runvar-set-default

No change to existing code.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agoOsstest.pm: Fix main_revision_job_cond after 0964bab7a9ea
Ian Jackson [Thu, 3 Oct 2019 09:48:38 +0000 (10:48 +0100)]
Osstest.pm: Fix main_revision_job_cond after 0964bab7a9ea

In
  other_revision_job_suffix: Take and pass referring runvar name
we updated main_revision_job_cond to pass a dummy 'x' for the new
parameter.  But the parameter is a sql expression, not a value,
and so an extra pair of quotes are needed.

This error broke sg-check-tested and this fix fixes it.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agofreebsd build job bisection: add special case
Ian Jackson [Mon, 30 Sep 2019 14:16:04 +0000 (15:16 +0100)]
freebsd build job bisection: add special case

other_revision_job_suffix contains ad-hoc code which returns an
identifier distinguishing certain jobs which are expected to refer to
different revisions within their flight.

Add the special case for freebsdbuildjob's recursion.

After this change we are now willing to tolerate the fact that a
freebsd build job has as input multiple different revisions of
freebsd.

cs-bisection-step has code to avoid creating recursive build jobs: the
created top-level job will therefore reuse the same freebsdbuildjob as
the template.  Hopefully that will be the previously anointed one and
still be available.

The bisector wants to repro on the same host as before.  This means it
won't necessarily use the most recent pass as the basis build.  So
long as the previous build has not been expired, this is fine.  It
does involve building an earlier freebsd on a later one but this
should be OK.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agoother_revision_job_suffix: Take and pass referring runvar name
Ian Jackson [Mon, 30 Sep 2019 14:00:02 +0000 (15:00 +0100)]
other_revision_job_suffix: Take and pass referring runvar name

We are going to need this to sort out bisection for freebsd's
recursive builds.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agomake-hosts-flight: Prefer stretch to jessie
Ian Jackson [Thu, 29 Aug 2019 12:38:15 +0000 (13:38 +0100)]
make-hosts-flight: Prefer stretch to jessie

The list of suites in ALL_SUITES is in decreasing order of preference:
it gets passed to cs-hosts-list, where the order is significant.

Without this patch, we try to commission hosts by running jessie if
the host flags seem to say jessie would be supported.  That's not
really sensible.

CC: Dominic Brekau <dominic.brekau@credativ.de>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agomg-hosts mknetbootdir: Introduce and require -F<firmware>
Ian Jackson [Thu, 29 Aug 2019 09:12:44 +0000 (10:12 +0100)]
mg-hosts mknetbootdir: Introduce and require -F<firmware>

If one runs
  ./mg-hosts mknetbootdir HOST
before having sorted out all the host configuration, it uses the
default configuration value for the host's firmware kind, which is
"bios".  If the configuration is then changed, things don't work.
This is confusing.

So ask the user to specify one or more -F<firmware>, or -Fany.

CC: Dominic Brekau <dominic.brekau@credativ.de>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agohost properties: Firmware: Move default to selecthost
Ian Jackson [Thu, 29 Aug 2019 09:10:01 +0000 (10:10 +0100)]
host properties: Firmware: Move default to selecthost

Drop the explicit default from all the call sites.  This centralises
the default.  This is going to be the new scheme for host properties
in general.

(Two of the call sites had a different default, "", which in their
context was semantically equivalent to "bios".)

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agomg-hosts mknetbootdir: Improve sub-option parser
Ian Jackson [Thu, 29 Aug 2019 08:57:47 +0000 (09:57 +0100)]
mg-hosts mknetbootdir: Improve sub-option parser

No semantic change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agots-kernel-build: Actually disable CONFIG_ARCH_QCOM
Ian Jackson [Tue, 24 Sep 2019 13:44:44 +0000 (14:44 +0100)]
ts-kernel-build: Actually disable CONFIG_ARCH_QCOM

osstest c/s efeddf7eca86
  ts-kernel-build: Disable CONFIG_ARCH_QCOM in Xen Project CI
did not work because it lacked the needed `setopt'.  Oops.

Suggested-by: Julien Grall <julien.grall@arm.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Julien Grall <julien.grall@arm.com>
5 years agots-*-build: Save the .config (as <host>--kconfig)
Ian Jackson [Tue, 24 Sep 2019 12:26:54 +0000 (13:26 +0100)]
ts-*-build: Save the .config (as <host>--kconfig)

This is saved after the build but we want it even if there is a build
failure, so save it after it is generated and before we start the
build.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agoTestSupport: Provide target_getfile_stash
Ian Jackson [Tue, 24 Sep 2019 12:24:36 +0000 (13:24 +0100)]
TestSupport: Provide target_getfile_stash

No callers yet.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agoTestSupport: Break out target_getfile_something_stash
Ian Jackson [Tue, 24 Sep 2019 12:23:51 +0000 (13:23 +0100)]
TestSupport: Break out target_getfile_something_stash

No functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agofreebsd-build: fix building efifat after r351831
Roger Pau Monne [Tue, 10 Sep 2019 11:27:53 +0000 (12:27 +0100)]
freebsd-build: fix building efifat after r351831

FreeBSD revisions after r351831 no longer automatically build an
efifat partition image, and makefs should be used instead if such file
is required.

Do this and add logic to build the efifat partition ourselves if it's
not present in the output of the build.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agoupdate d-i version
Ian Jackson [Tue, 10 Sep 2019 09:35:53 +0000 (10:35 +0100)]
update d-i version

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agots-hosts-allocate-Executive: Treat "no suitable host" as starved
Ian Jackson [Tue, 2 Jul 2019 16:26:02 +0000 (17:26 +0100)]
ts-hosts-allocate-Executive: Treat "no suitable host" as starved

In particular, this means that
 * platform-* jobs will not cause problems in old Xen branches when
   there a platform supports only newer Xen
 * commissioning flights will complain less about the architectures
   that aren't included in the particular set of hosts

The motivation for this patch, now, is that the first of these applies
to `platform-thunderx', recently introduced in the Xen Project colo.

CC: Julien Grall <julien.grall@arm.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agots-hosts-allocate-Executive: Introduce $alloc_starved_r
Ian Jackson [Tue, 2 Jul 2019 16:25:31 +0000 (17:25 +0100)]
ts-hosts-allocate-Executive: Introduce $alloc_starved_r

This should not have been a hardcoded constant.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agocr-daily-branch, mfi-common: Use tested seabios and ovmf for -prev
Ian Jackson [Tue, 2 Jul 2019 16:16:47 +0000 (17:16 +0100)]
cr-daily-branch, mfi-common: Use tested seabios and ovmf for -prev

Introduce {TREE,REVISION}_{OVMF,SEABIOS}_PREV, so that -prev builds
use the tested ovmf too.  This should be true in all branches,
including xen-unstable.  (In the seabios and ovmf branches, there
are no -prev builds.)

Checked with standalone-generate-dump-flight-runvars
and the result is to these runvars
    revision_ovmf
    revision_ovmf
    revision_seabios
    revision_seabios
to jobs
    build-i386-prev
    build-amd64-prev
in the branches
    xen-*-testing      values are baseline
    xen-unstable       values are the empty string
The empty string is equivalent to unset: see config in ts-xen-build.

CC: Wei Liu <wl@xen.org>
CC: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agostarvation: Do not give up if there are other jobs running
Ian Jackson [Wed, 26 Jun 2019 10:44:48 +0000 (11:44 +0100)]
starvation: Do not give up if there are other jobs running

We want those other jobs to finish so that we can include the time
they took, and the fact that they completed, in our calculations.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agostarvation: Do require a sufficiently old estimate
Ian Jackson [Fri, 21 Jun 2019 16:11:31 +0000 (17:11 +0100)]
starvation: Do require a sufficiently old estimate

If there is no estimate at least $period ago, this function must
return undef.  Nothing else here ensures this.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agomg-repro-setup: Do not wrongly reject multiple --rebuild
Ian Jackson [Tue, 21 May 2019 12:03:01 +0000 (13:03 +0100)]
mg-repro-setup: Do not wrongly reject multiple --rebuild

--rebuild ends the current --rebuild specification.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
v2: New patch

5 years agomg-repro-setup: actually accept --rebuild -rVAR=VALUE
Ian Jackson [Mon, 20 May 2019 15:54:20 +0000 (16:54 +0100)]
mg-repro-setup: actually accept --rebuild -rVAR=VALUE

The glob syntax here was wrong, and the code cs-adjust-flight did not
handle it properly either.  So --rebuild -r has not worked since it
first appeared in:
   a1e0e5846f7bb7d82a5db1d7cd643b9f5ca1b9a9
   mg-repro-flight: Provide --rebuild to make variant build jobs

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
v2: New patch

5 years agomg-repro-setup: New mode --autoalloc
Ian Jackson [Fri, 17 May 2019 17:32:20 +0000 (17:32 +0000)]
mg-repro-setup: New mode --autoalloc

This just involves turning autoalloc on and statictask off.
It is most useful with mg-transient-task, as documented.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agomg-repro-setup: Introduce `statictask' variable
Ian Jackson [Fri, 17 May 2019 17:24:12 +0000 (17:24 +0000)]
mg-repro-setup: Introduce `statictask' variable

We are going to make a mode where we don't set OSSTEST_TASK.  The
result is that our subprocesses will do whatever they usually do.

Those are mg-allocate (which would allocate for our static task) and
mg-execute-flight which will make a dynamic task.  We must therefore
prevent mg-allocate from running since the allocations would not be
useable for the flight execution.

No functional change yet, since nothing sets statictask=false and
therefore OSSTEST_TASK would always be set.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agomg-repro-setup: Do not imply that a --rebuild needs a +TREE
Ian Jackson [Mon, 20 May 2019 15:53:46 +0000 (16:53 +0100)]
mg-repro-setup: Do not imply that a --rebuild needs a +TREE

The +TREEs and other specifications are convolved.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agomg-repro-setup: Do all builds in their own tasks, regardless
Ian Jackson [Fri, 17 May 2019 17:46:33 +0000 (17:46 +0000)]
mg-repro-setup: Do all builds in their own tasks, regardless

In case OSSTEST_TASK was set by the caller, unset it.  Unsetting it
will cause each sg-run-job (inside mg-execute-task) to become its own
task.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agomg-transient-task: Put the ownd fd on a high fd, say, 114
Ian Jackson [Tue, 21 May 2019 09:59:14 +0000 (10:59 +0100)]
mg-transient-task: Put the ownd fd on a high fd, say, 114

This avoids clashes with other shell scripts' etc. fds.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
v2: New patch

5 years agomg-transient-task: New utility
Ian Jackson [Fri, 17 May 2019 17:46:44 +0000 (17:46 +0000)]
mg-transient-task: New utility

Will be useful in combination with new mode(s) of mg-repro-setup.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agots-kernel-build: Disable CONFIG_ARCH_QCOM in Xen Project CI
Ian Jackson [Thu, 30 May 2019 16:47:42 +0000 (17:47 +0100)]
ts-kernel-build: Disable CONFIG_ARCH_QCOM in Xen Project CI

  drivers/firmware/qcom_scm.c:469:47: error: passing argument 3 of `dma_alloc_coherent' from incompatible pointer type [-Werror=incompatible-pointer-types]

This is fixed by

  firmware: qcom_scm: Use proper types for dma mappings

but this is not present in all relevant stable branches.

We currently have no Qualcomm hardware in the Xen Project test lab so
we do not need this enabled.

CC: Stefano Stabellini <sstabellini@kernel.org>
CC: linux-arm-msm@vger.kernel.org
CC: linux-kernel@vger.kernel.org
CC: Stephen Boyd <swboyd@chromium.org>
CC: Andy Gross <agross@kernel.org>
CC: Bjorn Andersson <bjorn.andersson@linaro.org>
CC: Avaneesh Kumar Dwivedi <akdwived@codeaurora.org>
Acked-by: Julien Grall <julien.grall@arm.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agoDrop all linux branches 3.18 and earlier
Ian Jackson [Thu, 30 May 2019 09:37:45 +0000 (10:37 +0100)]
Drop all linux branches 3.18 and earlier

3.18 doesn't boot on Xen any more and Linux stable upstream say it
will not be fixed because it's EOL.  Thanks to them for that
confirmation.

While we are here, drop all earlier Linux branches too.  We are
wasting our time fetching them, seeing if they have changed, and then
doing nothing.

CC: stable@vger.kernel.org
CC: Greg KH <greg@kroah.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agoinstalls: Disable cron
Ian Jackson [Fri, 17 May 2019 13:39:47 +0000 (13:39 +0000)]
installs: Disable cron

The presence of cron causes leak check failures, since cron may run
processes that the leak checker detects.  Disable it, since none of
our installs live long enough for this to matter.

Do this in host_install_postboot_complete since it seems to me like we
don't want this in guests any more than we want it in hosts.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agocr-daily-branch: seabios: "usually" use xen-tested-master
Ian Jackson [Fri, 3 May 2019 13:38:53 +0000 (13:38 +0000)]
cr-daily-branch: seabios: "usually" use xen-tested-master

This branch is supposed to be suitable for all versions of Xen.
Conversely, older versions of seabios do not build on newer
compilers (as provided, eg, in stretch).

So, for "branches" other than xen-unstable and xen-unstable-smoke, use
the usual "determine_version" machinery, which will select
xen-tested-master for branches other than the ovmf branch itself.

No change for the seabios "branch", nor for xen-unstable*.  The effect
is to switch xen-*-testing, qemu-*, linux-*, etc., to all use ovmf
xen-tested-master.

This commit is identical to the corresponding one relating to ovmf,
  c9d1e5896fe2246d17d436f05a9960a66ea55426
  cr-daily-branch: ovmf: "usually" use xen-tested-master
mutandis mutandi.  Verified with
  diff -u <(git-show c9d1e5896fe2246d17d436f05a9960a66ea55426) <(git-diff | sed 's/SEABIOS/OVMF/g; s/seabios/ovmf/g') |less

A cursory examination of the standalone-generate-dump-flight-runvars
output revealed what seemed to be the expected changes and nothing
untoward.

Acked-by: Wei Liu <wei.liu2@citrix.com>
CC: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoproduction-config: Update HTTPS proxy certificate
Anthony PERARD [Tue, 9 Apr 2019 14:18:37 +0000 (15:18 +0100)]
production-config: Update HTTPS proxy certificate

The previous certificate had expired, a new one have been generated.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
6 years agomg-allocate: Don't try allocating the same resource for two specs
Ian Jackson [Fri, 3 May 2019 13:38:53 +0000 (13:38 +0000)]
mg-allocate: Don't try allocating the same resource for two specs

This is obviously wrong.  In fact it does not work (we bomb out in the
allocation).

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
v2: New patch

6 years agomg-repro-setup: Detect options (-...) in wrong place
Ian Jackson [Fri, 3 May 2019 13:17:02 +0000 (13:17 +0000)]
mg-repro-setup: Detect options (-...) in wrong place

Without this they tend to be interpreted as HOSTSPECs leading to
lossage.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
v2: New patch

6 years agomg-repro-flight: Provide --rebuild to make variant build jobs too
Ian Jackson [Thu, 2 May 2019 15:59:16 +0000 (16:59 +0100)]
mg-repro-flight: Provide --rebuild to make variant build jobs too

This allows a single command to repro a particular job with a variety
of different source code.

The implementation technique is:
  - run the build job in a separate flight, so that it can run
    with a separate task which gives its host up after the build
  - do much of the heavy lifting of runvar fiddling etc. in
    a new helper routine in cs-adjust-flight

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
v2: Add a missing `continue' (without which everything goes quite wrong)

6 years agomg-repro-setup: Move flight creation up before task creation
Ian Jackson [Thu, 2 May 2019 16:24:34 +0000 (17:24 +0100)]
mg-repro-setup: Move flight creation up before task creation

No significant functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agomg-repro-setup: Allow arguments to badusage
Ian Jackson [Thu, 2 May 2019 13:49:31 +0000 (14:49 +0100)]
mg-repro-setup: Allow arguments to badusage

No functional change with existing call sites.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agomg-repro-setup: Move logging setup to later
Ian Jackson [Thu, 2 May 2019 13:46:13 +0000 (14:46 +0100)]
mg-repro-setup: Move logging setup to later

No functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agomg-repro-setup: Break out compute_adjusts
Ian Jackson [Thu, 2 May 2019 13:39:44 +0000 (14:39 +0100)]
mg-repro-setup: Break out compute_adjusts

No functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agomg-repro-setup: Improve a doc message slightly
Ian Jackson [Thu, 2 May 2019 13:07:38 +0000 (14:07 +0100)]
mg-repro-setup: Improve a doc message slightly

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agocs-adjust-flight: Use db_prepare and honour -D -D for sql dumps
Ian Jackson [Thu, 2 May 2019 17:33:23 +0000 (18:33 +0100)]
cs-adjust-flight: Use db_prepare and honour -D -D for sql dumps

This makes debugging it easier.  No functional change with zero or one
occurrences of -D.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agocs-adjust-flight: Break out copy_jobs_*
Ian Jackson [Thu, 2 May 2019 15:58:14 +0000 (16:58 +0100)]
cs-adjust-flight: Break out copy_jobs_*

No functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agomg-execute-flight: Save an mro in tmp/
Ian Jackson [Thu, 2 May 2019 16:32:23 +0000 (17:32 +0100)]
mg-execute-flight: Save an mro in tmp/

This may be useful for some things.  For example, it will be used in
just a moment.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoDrop Xen 4.5 and earlier
Ian Jackson [Wed, 1 May 2019 10:43:08 +0000 (11:43 +0100)]
Drop Xen 4.5 and earlier

These releases are out of security support.  They are known not to
build on Debian stretch, which is what we are using, and we do not
intend to ever update them to fix that.

Xen 4.6 is also out of security support but we want osstest to be able
to continue to build it so that we can test 4.6->4.7 migration, for
the purposes of testing Xen 4.7, which is still supported right now.

So we have recently applied some build fixes to the 4.6 tree, and for
now we retain 4.6 in osstest so that build fixes applied to
staging-4.6 can propagate to stable-4.6.

CC: committers@xenproject.org
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoRevert "arm64: tolerate host allocation failures"
Ian Jackson [Wed, 1 May 2019 10:14:21 +0000 (11:14 +0100)]
Revert "arm64: tolerate host allocation failures"

We now have 4 working arm64 boxes and this is quite ample for our
current test matrix.  We have two kinds of box, too.  So, great.

This reverts commit 0705bed9e20ea4375e7ac9f8109ef955ebc6fe9c.

CC: Stefano Stabellini <sstabellini@kernel.org>
Acked-by: Julien Grall <julien.grall@arm.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agots-kernel-build: Move main program to bottom of script
Ian Jackson [Fri, 26 Apr 2019 16:26:40 +0000 (17:26 +0100)]
ts-kernel-build: Move main program to bottom of script

Having it in the middle makes it quite hard to find !

No functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agocross builds: Build armhf kernels on amd64 hosts
Ian Jackson [Fri, 26 Apr 2019 14:58:47 +0000 (15:58 +0100)]
cross builds: Build armhf kernels on amd64 hosts

Our armhf hosts are devboards and very slow, as well as scarce.  It
takes 17ks or so for a kernel build.  This will go *much* faster on
an amd64 box and we have lots of those too.

standalone-generate-dump-flight-runvars shows that the only change is
to change host_arch from armhf to amd64 in build-armhf-pvops jobs.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
Acked-by: Julien Grall <julien.grall@arm.com>
---
v2: Fix typo in commit message.

6 years agocross builds: mfi-common: Prepare for kernel cross building
Ian Jackson [Fri, 26 Apr 2019 14:22:55 +0000 (15:22 +0100)]
cross builds: mfi-common: Prepare for kernel cross building

Introduce job_create_build_crossable, which takes a target->host
architecture map in its arguments, and use it for build-kern,
passing an empty architecture map.

Overall functional change is only to add
  host_arch=$arch
to the kernel build jobs, which has no ultimate effect because it's
the same as the arch=$arch.  (Difference in flight construction
verified with standalone-generate-dump-flight-runvars.)

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agocross builds: mfi-common: Break out set_build_hostflags
Ian Jackson [Fri, 26 Apr 2019 14:22:18 +0000 (15:22 +0100)]
cross builds: mfi-common: Break out set_build_hostflags

No functional change.

Verified with standalone-generate-dump-flight-runvars.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agocross builds: ts-kernel-build: Support cross target armhf
Ian Jackson [Fri, 26 Apr 2019 14:00:27 +0000 (15:00 +0100)]
cross builds: ts-kernel-build: Support cross target armhf

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Julien Grall <julien.grall@arm.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
---
v2: Drop HOSTCC= setting

6 years agots-kernel-build: Introduce cmd()
Ian Jackson [Fri, 26 Apr 2019 13:53:11 +0000 (14:53 +0100)]
ts-kernel-build: Introduce cmd()

Right now this is a simple wrapper around target_cmd_build.

No functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoarch replumbing: ts-debian-di-install: Use $gho->{Arch}
Ian Jackson [Fri, 26 Apr 2019 13:44:04 +0000 (14:44 +0100)]
arch replumbing: ts-debian-di-install: Use $gho->{Arch}

This is just tidying up.  The only effect is that now these would
honour $r{all_guest_arch} as a fallback.  But right now,
$r{GUEST_arch} will always be set, and that is what ends up in
$gho->{Arch}.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoarch replumbing: make-flight: Fix $r{arch} comment
Ian Jackson [Fri, 26 Apr 2019 13:35:07 +0000 (14:35 +0100)]
arch replumbing: make-flight: Fix $r{arch} comment

This comment was lamenting the very problem we are fixing now.  It
would now be possible to test i386->amd64 tools migration, by writing
an appropriate test job with different src_host_arch and
dst_host_arch etc.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoarch replumbing: Replace many $r{arch} with $[g]ho->{Arch}
Ian Jackson [Fri, 26 Apr 2019 13:27:12 +0000 (14:27 +0100)]
arch replumbing: Replace many $r{arch} with $[g]ho->{Arch}

No functional change with existing flights.  But the effect is that
now, generally, ts-* scripts and the support code will honour
host_arch, if it is set, in preference to arch.

This patch contains only replacements of $r{arch} with $ho->{Arch} or
$gho->{Arch}.  In fact, perhaps surprisingly, there were no locations
where $gho was wanted rather than $ho (I have double checked this).

Exceptions, where we left $r{arch} alone, are:

 * make-flight: a comment, which we are about to deal with;

 * ts-kernel-build: we are going to support cross building and
    $r{arch} is going to be the architecture of the kernel we want
    rather than of the build host.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoarch replumbing: ts-memdisk-try-append: Remove unidiomatic " "
Ian Jackson [Fri, 26 Apr 2019 13:24:18 +0000 (14:24 +0100)]
arch replumbing: ts-memdisk-try-append: Remove unidiomatic " "

No functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoarch replumbing: ts-debian-di-install: Remove unidiomatic { }
Ian Jackson [Fri, 26 Apr 2019 13:21:06 +0000 (14:21 +0100)]
arch replumbing: ts-debian-di-install: Remove unidiomatic { }

No functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoarch replumbing: Provide $ho->{Arch} and $gho->{Arch}
Ian Jackson [Fri, 26 Apr 2019 13:17:25 +0000 (14:17 +0100)]
arch replumbing: Provide $ho->{Arch} and $gho->{Arch}

With existing flights these are $r{arch} and GUEST_arch.
Nothing uses these yet.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
v2: Correctly set $gho->{Arch} in selectguest, not $ho->{Arch}

6 years agoarch replumbing: ts-host-install: Move $kern_arch_info setting
Ian Jackson [Fri, 26 Apr 2019 13:10:21 +0000 (14:10 +0100)]
arch replumbing: ts-host-install: Move $kern_arch_info setting

We are going to want to do this after selecthost.

No functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoTestSupport: target_var: Use host_V for host variables
Ian Jackson [Fri, 26 Apr 2019 13:07:08 +0000 (14:07 +0100)]
TestSupport: target_var: Use host_V for host variables

Change `target_var' to set `IDENT_V' rather than just V.  For
compatibility with older flights and older flight construction,
look for plain V too when looking up the variable.

And, we now look at all_host_V before V.  This has no functional
change with existing flights, because existing flights only have
  all_host_suite
  all_host_di_version
  all_host_os
and we never set the corresponding V form of those variables.

So with existing flights the only functional change is a change to
synth runvars, to add HOST_ to the name.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoTestSupport: target_var: Refactor to allow for another host case
Ian Jackson [Fri, 26 Apr 2019 13:05:49 +0000 (14:05 +0100)]
TestSupport: target_var: Refactor to allow for another host case

Make an explicit list of the prefixes and a loop to walk over them.
No functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agostarvation: Better logging/debugging output
Ian Jackson [Thu, 19 Jul 2018 14:49:50 +0000 (15:49 +0100)]
starvation: Better logging/debugging output

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agohostalloc_maxwait_max: Use starvation most_optimistic
Ian Jackson [Tue, 16 Apr 2019 14:31:15 +0000 (15:31 +0100)]
hostalloc_maxwait_max: Use starvation most_optimistic

Now that we have a more sophisticated estimate of our likely scheduled
time, use it here too.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agostarvation: Abandon jobs which are unreasonably delaying their flight
Ian Jackson [Tue, 16 Apr 2019 14:30:29 +0000 (15:30 +0100)]
starvation: Abandon jobs which are unreasonably delaying their flight

Sometimes, due to a shortage of available resources, a flight might be
delayed because a handful of jobs are waiting much longer than the
rest.  Add a heuristic which causes these jobs to be abandoned.

We consider ourselves starving if we are starving now, based on the
most optimistic start time seen in the last I.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agostarvation: Infrastructure for jobs which are delaying their flights
Ian Jackson [Wed, 18 Jul 2018 12:21:27 +0000 (13:21 +0100)]
starvation: Infrastructure for jobs which are delaying their flights

Provide hostalloc_starvation_* in Osstest::Executive, and a comment
saying what we are going to do.  And provide a demo utility which
prints the effect of some particular runvar value on a range of
situations.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agostarvation: Use "starved" for hostalloc_maxwait_max
Ian Jackson [Wed, 18 Jul 2018 12:20:39 +0000 (13:20 +0100)]
starvation: Use "starved" for hostalloc_maxwait_max

Previously this was "broken".

We mustn't just call `broken' inside attempt_allocation because that
runs in a db transaction.  Instead, we arrange that attempt_allocation
returns 2, which threads its way back out to the return value from
alloc_resources, and then call broken there.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agots-host-allocate-Executive: Break out $now and add a newline
Ian Jackson [Tue, 16 Apr 2019 13:55:17 +0000 (14:55 +0100)]
ts-host-allocate-Executive: Break out $now and add a newline

Prep work, no functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agostarvation: Propagate starved job status into dependent jobs
Ian Jackson [Fri, 20 Jul 2018 15:13:23 +0000 (16:13 +0100)]
starvation: Propagate starved job status into dependent jobs

If a build job is starved, then the same status

(No jobs are marked `starved' yet.)

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agotcl/JobDB-Executive: Do not squash "starved" status
Ian Jackson [Tue, 16 Apr 2019 10:51:16 +0000 (11:51 +0100)]
tcl/JobDB-Executive: Do not squash "starved" status

ts-hosts-allocate is going to set the job status to `starved'
sometimes, and then die.  `starved' needs to be added to the list of
job statuses that sg-run-job leaves alone.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoTestSupport: Make "broken" set the step state too
Ian Jackson [Tue, 16 Apr 2019 17:49:25 +0000 (18:49 +0100)]
TestSupport: Make "broken" set the step state too

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agostarvation: Permit step_finish to set the state `starved'
Ian Jackson [Tue, 16 Apr 2019 17:56:54 +0000 (18:56 +0100)]
starvation: Permit step_finish to set the state `starved'

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoJobDB::Executive: step_*: fix log messages to talk about "steps"
Ian Jackson [Thu, 18 Apr 2019 16:11:17 +0000 (17:11 +0100)]
JobDB::Executive: step_*: fix log messages to talk about "steps"

These functions are about to be sometimes called for non-substep
steps.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoTestSupport: Make "broken" print the actual job state
Ian Jackson [Wed, 18 Jul 2018 12:19:56 +0000 (13:19 +0100)]
TestSupport: Make "broken" print the actual job state

No functional change except to a message.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agostep handling: Preserve step states set by ts-* scripts
Ian Jackson [Tue, 16 Apr 2019 17:46:42 +0000 (18:46 +0100)]
step handling: Preserve step states set by ts-* scripts

sg-run-job would unconditionally set the step state to the value it
calculated, which would usually be `pass' or `fail' or
`broken' (according to the recipe).

Relax this interface somewhat to allow a test script to set the step
status itself: specifically, do not overwrite an existing status of
  aborted broken starved

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agostarvation: Teach sg-execute-flight about job state starved
Ian Jackson [Tue, 16 Apr 2019 17:45:44 +0000 (18:45 +0100)]
starvation: Teach sg-execute-flight about job state starved

It needs to not mind if a job reports as `starved', even if sg-run-job
exited non-zero.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agostarvation: Teach ms-flights-summary about job state starved
Ian Jackson [Tue, 16 Apr 2019 17:44:23 +0000 (18:44 +0100)]
starvation: Teach ms-flights-summary about job state starved

This just affects sorting etc. in the summary display.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agostarvation: Teach archaeologists about starved job state
Ian Jackson [Thu, 18 Apr 2019 16:18:53 +0000 (17:18 +0100)]
starvation: Teach archaeologists about starved job state

sg-report-flight is a bit awkward.  It thinks mostly about step
status, not job status.  So, when justifying, if we don't find a step,
and the job state is starved, we treat the step as starved.

If there are only starved steps, then we don't have evidence that this
is a regression, because the test wasn't run in the baseline.

If there are other steps we look at those instead.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agostarvation: Teach sg-report-flight about starved step state
Ian Jackson [Thu, 18 Apr 2019 12:17:50 +0000 (13:17 +0100)]
starvation: Teach sg-report-flight about starved step state

We are going to use this for situations where the resources to run the
test weren't available.  In general we are going to treat this as not
a regression.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoalloc_resources: Support special abandonment values
Ian Jackson [Fri, 20 Jul 2018 15:11:37 +0000 (16:11 +0100)]
alloc_resources: Support special abandonment values

This gives a way for the caller's $resourcecall to signal something
interesting, back to its main loop.  This is useful for calling
broken, for example: that can't be done within $resourcecall because
$resourcecall operates within the allocation db transaction (which
ought to be rolled back...)

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agots-logs-capture: Do not try to capture logs of hosts not allocated
Ian Jackson [Tue, 16 Apr 2019 10:50:41 +0000 (11:50 +0100)]
ts-logs-capture: Do not try to capture logs of hosts not allocated

Little significant change with existing non-broken flights etc.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoselecthost: Honour new $none_ok optional parameter
Ian Jackson [Tue, 16 Apr 2019 10:50:11 +0000 (11:50 +0100)]
selecthost: Honour new $none_ok optional parameter

No functional change with existing callers.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agots-hosts-allocate-Executive: with -U, just append to the same logfile
Ian Jackson [Fri, 20 Jul 2018 15:13:49 +0000 (16:13 +0100)]
ts-hosts-allocate-Executive: with -U, just append to the same logfile

This is much more convenient for ad-hoc use.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agoTftpDiVersion_stretch: update
Ian Jackson [Mon, 29 Apr 2019 10:36:51 +0000 (10:36 +0000)]
TftpDiVersion_stretch: update

We need to keep up with a d-i update by Debian.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agobuilds: Run i386 builds on amd64 kernels
Ian Jackson [Thu, 25 Apr 2019 15:04:56 +0000 (16:04 +0100)]
builds: Run i386 builds on amd64 kernels

Most hardware that supports i386 supports amd64 too.  When doing
builds we do need the right userland, but we don't actually care what
the kernel is doing.  With Linux 32-on-64 is good for that.

Especially, there is a kernel regression (evident in the Debian
stretch kernel, but not present in jessie's) where 32-bit Linux
mismanages the memory on hosts with moderately large amounts of
RAM (ie, significantly more RAM than can be addressed at once),
resulting in what amounts to a near-stall of the paging system.  Since
the paging system is used for filesystem writes too, the effect is
that commands run by builds can take totally unreasonable amounts of
time.  Ie, this version of Linux is broken when i386 PAE is needed.

In practice this is causing significant trouble in the Xen Project CI.

This kernel bug probably won't affect our test jobs because
(i) we use our own kernels, so we would probably detect this
regression when switching kernel branches etc. (ii) test jobs
run with a dom0_mem setting which avoids the preconditions for the
particular bug.

CC: Juergen Gross <jgross@suse.com>
CC: Boris Ostrovsky <boris.ostrovsky@oracle.com>
CC: Wei Liu <wei.liu2@citrix.com>
CC: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Paul Durrant <paul.durrant@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoDebian: preferred arch: Apply setarch to sshd
Ian Jackson [Thu, 25 Apr 2019 14:58:00 +0000 (15:58 +0100)]
Debian: preferred arch: Apply setarch to sshd

Many build systems (including Xen's, and autoconf) use uname to try to
discern the system's architecture.  When running i386 userland on an
amd64 kernel, this gives the wrong answer.  These build systems then
go off and try to do a sort of cross compile thing, and, generally,
fall over.

The uname -m value (which is what is at issue) is an inherited process
property.  Linux provides a utility `setarch' which changes this.  We
need to apply this to all builds; and it is not really convenient to
add an adverbial command to every build via the existing ssh build
shell rune mechanisms.

A fairly simple way to get the right behaviour is to wrap sshd
instead.  sshd doesn't mind what `personality' it sees.  Replacing
/usr/bin/sshd with a wrapper shell script might break
start-stop-daemon's attempts to shut down or restart sshd but we don't
care about that in osstest (certainly not on build installs, where
this feature is to be used).

Nothing uses this yet.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoDebian: preferred arch: Honour LinuxKernPreferredArchInfo
Ian Jackson [Thu, 25 Apr 2019 14:55:39 +0000 (15:55 +0100)]
Debian: preferred arch: Honour LinuxKernPreferredArchInfo

Nothing sets this yet.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agomg-repro-setup: Fix runvar adjustment shell syntax
Ian Jackson [Thu, 25 Apr 2019 14:56:11 +0000 (15:56 +0100)]
mg-repro-setup: Fix runvar adjustment shell syntax

-r would fail with a bash syntax error.  This bug has existed ever
since this feature was introduced.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agosg-run-job, ts-host-install: New --build option
Ian Jackson [Tue, 23 Apr 2019 10:49:24 +0000 (11:49 +0100)]
sg-run-job, ts-host-install: New --build option

Used to specify that the host will be used for building.  Currently
has no effect.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agots-syslog-server: --no-stdin option
Ian Jackson [Thu, 18 Apr 2019 14:52:59 +0000 (15:52 +0100)]
ts-syslog-server: --no-stdin option

Useful when running on a tty interactively.

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