Ian Jackson [Mon, 11 Jun 2018 13:09:35 +0000 (14:09 +0100)]
sg-run-job: Allow flight to specify recipe flag to disable migr tests
We want this because there is no sensible way to probe whether a
restricted qemu can cope with save/restore or migration. So we will
want to disable it in flight construction (depending on Xen version,
eventually).
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Ian Jackson [Tue, 12 Jun 2018 15:56:29 +0000 (15:56 +0000)]
cs-bisection-step: Do explicitly set runvar for suppressed recursion
When we detect that we are considering a job which is identically
named to one earlier in the dependency chain, it could happen that the
final referencing runvar in the job at which we break the cycle is
actually to an unqualified job name.
(This cannot happen unless the cycle has more than 2 jobs, and
therefore more than one job name, because otherwise the job we would
be copying would have a self-reference. So it cannot occur right
now.)
So when breaking the cycle, we should update the job we are building
to refer to the exact flight and job we want it to reuse.
The most convenient way to do this is to reorganise the new recursion
suppression code: we retain the suppressed entries in $subjobs, and
filter them as appropriate.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Jackson [Tue, 12 Jun 2018 15:22:38 +0000 (15:22 +0000)]
cs-bisection-step: Handle build job chains
cs-bisection-step assumes that every job it will need to create has a
unique name. Indeed, in general, it is probably not reasonable to
expect it to work if that is not the case.
build-amd64-freebsd needs a previous build-amd64-freebsd.
Currently cs-bisection-step confuses itself into writing a flight
where build-amd64-freebsd uses itself as its freebsdbuildjob.
This naturally does not work very well.
I think the right approach is for cs-bisection-step to spot when it
its recursion through the jobs, via *job runvars, would descend into a
job name which it was already encoutered earlier in the dependency
chain, and, when that occurs, to simply skip regenerating that deeper
copy of the job.
That is achieved here by filtering the subjob out of the list, before
we go looking for jobs to reuse. As a result, not only will no new
job be created, but the original deeper job will be reused because the
runvar value will not be updated.
FTR, the circular dependency produces this error from sg-execute-flight:
wait for process failed: no children
while executing
"wait -nohang"
(procedure "main_iteration" line 14)
invoked from within
"main_iteration"
(procedure "main" line 8)
invoked from within
"main"
(file "./sg-execute-flight" line 238)
This is because sg-execute-flight's algorithm assumes that if there
are no jobs running there must be some job whose dependencies are done.
That is true if the job graph has no cycles.
Improving the error message from sg-execute-flight is left as an
exercise for the future.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Jackson [Tue, 12 Jun 2018 15:20:09 +0000 (15:20 +0000)]
cs-bisection-step: Refactor $subjobs calculations a bit
Parse the runvar name earlier, adding job and orgflight members to the
row hashes we got from the db. This slightly unifies the call to
preparejob, but more relevantly, makes the effective job and flight
information available earlier. That will be useful in a moment.
No functional change.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Jackson [Wed, 30 May 2018 15:50:24 +0000 (16:50 +0100)]
TestSupport: substeps: work if steps in ad-hoc tests take >1s
When running by hand, OSSTEST_TESTID is not set. We provide a value
with the time and the pid in it, so that rerunning the script by hand
works, even though in production this would result in multiple
identically-named substeps.
But we need to fix this value for the duration of the script.
Otherwise when it calls substep_finish, if the time has moved on, it
computes a different OSSTEST_TESTID and therefore a different substep
name, and then the substep machinery smells a rat and bombs out.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Ian Jackson [Tue, 12 Jun 2018 11:24:39 +0000 (12:24 +0100)]
config: ExtraDebs: replace with DebianExtraPackages
`ExtraDebs' is a silly name. Also the semantics are rather
inflexible; we might want to install specific packages rather than
the contents of a whole directory.
And, document it.
This variable has only just been introduced, so hopefully it is OK to
replace and rename it now without causing too much disruption.
(osstest's own production runs each use their own copy of the config,
so they will be fine. It's just downstreams, or users whose config is
set up to use one not in their own tree, who will be affected.)
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
------------------------------
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Ian Jackson [Mon, 11 Jun 2018 16:45:08 +0000 (17:45 +0100)]
ResourceCondition: Break out PropCompareBase
Make a base class so we can easily invent other kinds of resource
property condition. The child is responsible only for stringification
and the actual comparison.
These classes does not need Exporter, so drop all that. Use `use
parent' to import the base class.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Ian Jackson [Mon, 14 May 2018 15:29:28 +0000 (16:29 +0100)]
cs-adjust-flight: Allow adjusting play flights after start
Specifically, rather than simply bombing out, if the flight already
has steps, we call dbfl_check again with an empty list of OK
blessings. dbfl_check will then bomb out, unless the flight's
blessing or intended blessing is `play'. If it doesn't bomb out, we
print a message.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Ian Jackson [Wed, 2 May 2018 15:00:26 +0000 (16:00 +0100)]
ts-xen-install: Drop obsolete --check and $checkmode
Since 5edec3222ff14b8200d5b41ed9af3c8d04c27314
ts-xen-build-check: reimplementation ...
in 2011 we have a fully general version, and the --check option
is no longer used.
And since 467d6239daa352483ec8fef003bd4fc723702b77
pygrub: guest kernel install: move target_extract_jobdist_path into Osstest
also in 2011, --check has not worked properly, because that
commit moved the relevant code somewhere where $checkmode was
not available and simply dropped the check.
So remove the vestigial code in ts-xen-build. As for @ARGV, we simply
die if we see something that looks like an option.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Ian Jackson [Thu, 7 Jun 2018 11:31:20 +0000 (11:31 +0000)]
sg-report-flight: When justifying, disregard out-of-flight build jobs
When we are looking for a previous job which justifies a failure, we
need to check that the putative justifying job used the same revision
as the baseline we are judging against. So we investigate the build
jobs referred to by that putative justifying job.
However, there are cases where this is not appropriate. Currently,
the most obvious example is freebsdbuildjob.
The freebsd arrangements involve referencing an anointed
freebsdbuildjob, which was in turn built from a previous
freebsdbuildjob, eventually terminating in some kind of ad-hoc job.
We would not want to investigate all of those even if we were trying
to analyse a flight on a freebsd branch.
The real thing we want to check that the build jobs *in the same
flight as the justifying job* used the right revisions. Build jobs
from other flights were either (i) build jobs for components not being
targed for testing by this branch, but which were necessary for the
justifying job and for which we decided to reuse another build job
(in which case we don't really care what versions they used, even
if underlying it all there might be a different version of a tree
we are actually interested in (ii) the kind of continuous update
thing seen with freebsdbuildjob.
There is no corresponding issue with cs-bisection-step, because it
only looks for the *buildjob runvars of the test it is actually
interested in, and does not recurse.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Jackson [Wed, 6 Jun 2018 10:46:08 +0000 (11:46 +0100)]
mfi-*: Set appropriate PropMinVer:XenMin: hostflags, to honour XenMin property
* In test_matrix_iterate, where most_hostflags is set, include a
PropMinVer:XenMin: hostflag. This is derived from $xenbranch.
When $xenbranch is xen-unstable, don't add that hostflag.
* But this is wrong for the migrate upgrade tests, which use both this
and the previous version of Xen. It is sufficient to check the
previous version, so we strip out the existing PropMinVer if there
is one. We (ab)use select_prevxenbranch to calculate the old Xen
branch name (version).
The motivation right now for this is that Xen 4.10 and earlier do not
boot xen.gz on UEFI. In earlier versions, one has to chainload
xen.efi. We don't support that in osstest right now on x86 (and it
probably isn't worth fixing that logic).
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Ian Jackson [Wed, 6 Jun 2018 10:45:05 +0000 (11:45 +0100)]
mfi-*: Provide hostflags_strip
This utility function saves us having to fragment the *_hostflags
variables any further when adding special cases. A particular special
case can strip out things it doesn't like.
No callers yet.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Ian Jackson [Tue, 29 May 2018 11:09:33 +0000 (11:09 +0000)]
Osstest/Debian: bootloader: Fix grub parsing for XSM and multiboot1
bca3edb4ac0d670098b7618cbaccf7577aca267a
"Osstest/Debian: bootloader: Understand multiboot2 syntax"
was supposed to change `multiboot' and `module' in the grub2 menu
parser to `multiboot2?' and `module2?'. But the entry for matching
XSM policy file lines was missing the ?, which broke all multiboot1
XSM tests. Fix this.
Reported-by: Jan Beulich <jbeulich@suse.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Jackson [Fri, 25 May 2018 14:41:54 +0000 (15:41 +0100)]
ap-common: Switch to Linux 4.14 by default on X86.
Linux 4.9 is getting a bit long in the tooth. 4.14 is an LTS branch
and the osstest-tested version seems reasonably good. I ran a special
report[1] to see what to expect and it reported no regressions.
Accordingly I am going to switch to using Linux 4.14 by default for
most X86 runs in osstest. ARM tests are not affected at this time;
they use their own linux-arm-xen branch which is updated by the Xen
ARM maintainers.
Ian Jackson [Thu, 17 May 2018 17:33:15 +0000 (18:33 +0100)]
20_linux_xen: Use multiboot2 when Xen supports it
This is necessary for UEFI. The patch is similar in spirit to the
upstream commit
http://git.savannah.gnu.org/cgit/grub.git/commit/?id=b4d709b6ee789cdaf3fa7a80fd90c721a16f48c2
A backport of that commit to Debian buster was requested in
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=898947
so hopefully this will not be necessary after stretch.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Ian Jackson [Thu, 17 May 2018 10:54:48 +0000 (11:54 +0100)]
mfi-common: set_freebsd_runvars: Never set freebsd_distpath to `/amd64' etc.
Logically, the final branch of the if should be qualified with a check
for the emptiness of FreeBSDDist. This is awkward in the current
structure, since we really want to do the distpath lookup only if
needed. (This is not very important right now, but we are about to
add another case which will do a more-likely-to-bomb-out and
more-likely-to-block-on-the-db lookup.) So refactor into `return'
style. This lets us introduce local variables in each branch.
Now gate the final branch appropriately. The overall result is that
if no useful FreeBSD build is found, we simply do not set the
freebsd_* runvars, rather than setting them to wrong values (eg,
`freebsd_distpath=/i386'.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com> CC: Roger Pau Monné <roger.pau@citrix.com>
Ian Jackson [Wed, 16 May 2018 16:04:43 +0000 (16:04 +0000)]
Osstest/Debian: preseed: Force UEFI install regardless
This suppresses:
Partition disks
---------------
This machine's firmware has started the installer in UEFI mode but it looks
like there may be existing operating systems already installed using "BIOS
compatibility mode". If you continue to install Debian in UEFI mode, it might
be difficult to reboot the machine into any BIOS-mode operating systems later.
If you wish to install in UEFI mode and don't care about keeping the ability to
boot one of the existing systems, you have the option to force that here. If
you wish to keep the option to boot an existing operating system, you should
choose NOT to force UEFI installation here.
Force UEFI installation?
1: Yes 2: No
Prompt: '?' for help>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Jackson [Wed, 16 May 2018 16:03:32 +0000 (16:03 +0000)]
Osstest/TestSupport: Use right arch for UEFI grub setup
This table was erroneously never used. Also, the value for arm64 is
wrong: it should be AA64. We fix the table value, and substitute it
in, for no overall change on amd64. On other arches we now do not
hardcode the wrong value.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com> CC: Julien Grall <julien.grall@linaro.org>
Ian Jackson [Mon, 21 May 2018 14:20:20 +0000 (15:20 +0100)]
cr-daily-branch: When reporting, always compare to real flights
When we're running sg-report-flight, at the end of the flight, we
shouldn't try to compare it to play flights, but real ones (if any).
play flights might contain junk (which might even cause
sg-report-flight to crash).
CC: Wei Liu <wei.liu2@citrix.com> Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Ian Jackson [Wed, 9 May 2018 15:53:57 +0000 (16:53 +0100)]
ts-xen-build: run `make build' before `make', by default
The Xen build system has some quirks. One of them is that `make' is a
version of `make dist' which is a version of `make install', which
runs `make install' in each subdir - but there are subdirs where `make
install' is a no-op which does not depend on `make build'. Also,
`make all' does not do `make build'. Additionally, the default target
differs in the toplevel, compared to subdirectories. Perhaps this is
all mistaken, but it's not something we can correct in stable
branches.
The result is that we might miss bugs where `make build' fails; and in
particular, bugs where simply `make' may fail in a subdirectory. Eg,
the recently discovered build failures in the emulator tests, due to
backported changes, which occur with `make -C tools' but not with
`make all' or `make tools'.
Detect these by running `make build' before `make' (unless our caller
has specified some other build arguments). In the future perhaps we
should do tools and hypervisor builds entirely separately.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
v2: Use `make build' instead of `make all' since the former actually
detects the bug in a buggy unpatched Xen 4.8. Fix a syntax
error. Improve the commit message.
Ian Jackson [Fri, 18 May 2018 13:42:13 +0000 (13:42 +0000)]
mg-adjust-flight-makexrefs: Repair after "Use ^ for excluding jobs"
In 3b433e39382b13dda5d25aebecaf4864ef69c8d4
"mg-adjust-flight-makexrefs: Use ^ for excluding jobs, not !"
a shell glob pattern was changed:
- !*) ifmatch=$tokeep; action=$todelete ; glob="${glob#!}" ;;
+ [!^]*) ifmatch=$tokeep; action=$todelete ; glob="${glob#?}" ;;
But in globbing, ! inside [ ] is a character class complement, not a
literal. The result is that mg-adjust-flight-makexrefs would
generally replace jobs willy-nilly.
Fix this by using two separate glob patterns, and no character class.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Jackson [Thu, 29 Jun 2017 16:13:50 +0000 (17:13 +0100)]
step logfiles: Rely on new logfile column
These are the three places which read logfile from the db, but had a
fallback to a computation involving stepno and step.
But, after steps-logfile-constraint, the logfile column is NOT NULL
(and populated with computed default data if need be) so this is not
needed any more
This is part of a "Populate-then-rely" schema change, as
described in schema/README.updates. Specifically, the step:
10. Optionally commit: code which relies on new column, and does not
necessarily tolerate NULL/DEFAULT; changing `constraint' to Needed.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Ian Jackson [Thu, 3 May 2018 14:28:59 +0000 (15:28 +0100)]
mg-allocate: Use ^ for deallocation, not !
! is annoying because some shells enable !-history expantion by
default even though few users have any idea about it. In general users
are confused by the error message and do not know what to do next.
We still honour ! for the benefit of old wrapper scripts, finger
macros, etc.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Ian Jackson [Fri, 27 Apr 2018 13:43:56 +0000 (14:43 +0100)]
production-config: Use something outside ~osstest/.ssh for TestHostKeypairPath
ansible nowadays chmods ~/.ssh to 700 for every user whose
authorized_keys it touches. This includes osstest@osstest.
The result is that other users on osstest.test-lab cannot access this
file. I have cp -a'd the keys, which are a piece of static
configuration we don't expect to change often, to a different
directory which will not be attacked by ansible. Refer to them there.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Ian Jackson [Mon, 3 Jul 2017 16:54:19 +0000 (17:54 +0100)]
db schema: Make the testid column NOT NLLL
We have to fix some old data. We insist that the old data is indeed
old (more than 5 years old) and not part of proper flights (ie,
blessed "play" or "crashed" or "unknown").
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Ian Jackson [Thu, 5 Apr 2018 14:40:00 +0000 (15:40 +0100)]
email output: Add MIME headers
We universally use UTF-8 in git commit messages and other kinds of
messages. The RFC-*822 default is us-ascii. Fix this by providing a
set of MIME headers.
Reported-by: Andrew Cooper <andrew.cooper3@citrix.com> Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Ian Jackson [Thu, 5 Apr 2018 14:38:39 +0000 (15:38 +0100)]
cr-ensure-disk-space: Actually quit before taking lock if all is well
5d2466dc0f26 "cr-ensure-disk-space: Correct stdout output" was
supposed to change an `exit 0' into a `quit_ok' but erroneously
changed it into `check_space'. Fix this.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
These are the same as the corresponding ones without -shadow, except
that they set xen_boot_append to `hap=false', so that that will be
passed to the hypervisor to force shadow paging.
CC: Jan Beulich <jbeulich@suse.com> CC: George Dunlap <george.dunlap@citrix.com> Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com> Partially-Reviewed-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com> Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Ian Jackson [Mon, 5 Mar 2018 15:48:57 +0000 (15:48 +0000)]
rumpkernel: clone from github rather than the official URL
Because, on wheezy:
$ GIT_SSL_NO_VERIFY=1 HOME=/ git clone http://repo.rumpkernel.org/rumprun
Cloning into 'rumprun'...
error: RPC failed; result=22, HTTP code = 501
fatal: The remote end hung up unexpectedly
$
strace shows a baroque sequence of redirects etc. involving servers
from rumpkernel.org, github.com, and some kind of gandi.net CDN.
On jessie it seems to just work. This commit should therefore be
reverted at some point, when all the instances are running jessie or
later. (Right now the VMs in the Mass colo are mostly wheezy.)
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Ian Jackson [Wed, 31 Jan 2018 11:18:55 +0000 (11:18 +0000)]
sg-report-host-history: Multiply size of reported history by 10
Right now,
http://logs.test-lab.xenproject.org/osstest/results/host/laxton1.html
contains ~200 jobs as expected, but that covers only 4 days. We
obviously would like more like a month.
The effect ought to be some more db work, but not worse concurrency.
CC: Julien Grall <julien.grall@linaro.org> Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Ian Jackson [Mon, 29 Jan 2018 17:27:18 +0000 (17:27 +0000)]
daily-cron-email-*: Replace lists.xensource.com with lists.xenproject.org
The .xensource.com domain is quite deprecated now.
Reported-by: Doug Goldstein <cardoe@cardoe.com> Reported-by: Andrew Cooper <andrew.cooper3@citrix.com> Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Ian Jackson [Thu, 14 Dec 2017 16:28:21 +0000 (16:28 +0000)]
smoke tests: Fix job reuse globs in cr-daily-branch
A symptom that the old patterns lack !build-arm64-xsm, so the xsm job
might be reused. The overall cause is that it contained a (partial)
list of architectures.
Instead, we observe that:
* The things we want to avoid reusing are Xen and libvirt (which
builds against Xen.
* Non-Xen builds are invariably build-<arch>-<thing> (or even longer)
so we can match them all with build-*-*.
* We need to exclude the Xen builds and the libvirt builds. The
libvirt builds are obvious. The Xen builds are either build-<arch>
which does not match build-*-*, or build-<arch>-xsm.
CC: Stefano Stabellini <sstabellini@kernel.org> Acked-by: Julien Grall <julien.grall@linaro.org> Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Ian Jackson [Thu, 14 Dec 2017 16:03:44 +0000 (16:03 +0000)]
smoke tests: Build arm64 with XSM, instead of without
The smoke flight contains test-arm64-arm64-xl-xsm so it should contain
build-arm64-xsm (and not contain build-arm64).
I have checked the results with
OSSTEST_CONFIG=standalone-config-example eatmydata ./standalone-generate-dump-flight-runvars
and looking at the diff shows precisely the expected change.
CC: Stefano Stabellini <sstabellini@kernel.org> Acked-by: Julien Grall <julien.grall@linaro.org> Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
This variable can be set to the absolute pathname of a kernel .deb to
use. It will be used only for hosts for which the corresponding
hostflag "need-kernel-deb-<suite>-special" is set.
There is not currently any facility for more than one special kernel
for each architecture.
As with backports kernels, the normal (Debian-supplied) kernel is
available too, and is used for hosts without any special hostflag.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* In the first half of the backports kernel processing, set
the new variable specialkernel to the string "backports".
(This token occurs in the output .deb and kernel name, and
is also referenced by hostflags of the form
need-kernel-deb-<suite>-backports.)
* Break out the second half of the backports procesing into its
own section, conditional on $specialkernel.
* Replace occurrences of the "backports" token, after that point,
with $specialkernel.
Overall, this will allow other kinds of special kernel to be
introduced. But there is, for now, no functional change.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Ian Jackson [Thu, 14 Dec 2017 13:09:52 +0000 (13:09 +0000)]
di_special_kernel: Use di_installer_path
This avoids the caller having to supply $d_i. This is good because
there is a site we want to call this from which uses that name for a
different value!
No functional change.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Jackson [Thu, 14 Dec 2017 12:23:24 +0000 (12:23 +0000)]
di_special_kernel: Replace open-coding in ts-host-install
The effect is simply to reuse the loop in di_special_kernel. The
extra tests etc. to compute $k and $c in di_special_kernel are of no
import here, and are harmless. We have already called
di_special_kernel so if it was going to fail due to this extra
computation, it would do so earlier.
No overall functional change.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>