]> xenbits.xensource.com Git - people/aperard/osstest.git/log
people/aperard/osstest.git
7 years agoopenstack tests: Don't run them on arm* wip.openstack
Anthony PERARD [Mon, 24 Jul 2017 16:01:44 +0000 (17:01 +0100)]
openstack tests: Don't run them on arm*

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agomake-flight: Increase dom0_mem for openstack flight
Anthony PERARD [Tue, 16 May 2017 14:33:04 +0000 (15:33 +0100)]
make-flight: Increase dom0_mem for openstack flight

With 4G for dom0_mem, a host running devstack is using about 1.5G of
swap.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agoNew branch openstack-ocata
Anthony PERARD [Mon, 24 Jul 2017 15:48:49 +0000 (16:48 +0100)]
New branch openstack-ocata

Testing of the Ocata stable branch of OpenStack against Xen unstable.

OpenStack have many different repo which should be clone/fetch at
roughly the same time. This does not matter much for a stable branch of
OpenStack, but during development they can be a proposed patch for a
repo that depends on a proposed patch in an other repo, so a patch with
a dependency will not be commited into master before its dependency is
commited in the other repo.

Since the concept of pushing multiple repo at once with osstest doesn't
exist, and is going to be complicated, this is not done by this patch,
and the simpler approach of pushing the main tree only is taken here.
This also mean that we cannot use the output of the branch
openstack-ocata as a baseline in an other branch.

Also, grabbing the revisions of every tree is simply done by setting the
runvars REVISION_* to the stable branch name to "origin/stable/ocata",
except Tempest does not have stable branch and is able to test any
OpenStack version.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agomake-flight: Prepare devstack jobs on "openstack*" branches only
Anthony PERARD [Wed, 15 Jul 2015 16:27:57 +0000 (17:27 +0100)]
make-flight: Prepare devstack jobs on "openstack*" branches only

This patch create new jobs *-devstack that will only be added to the
branches openstack*, which will be introduced in the next patch.  So no
overall functional change.

Here is a list of jobs that a openstack* branch will have:
  build-amd64
  build-amd64-libvirt
  build-amd64-pvops
  build-amd64-xsm
  build-arm64
  build-arm64-libvirt
  build-arm64-pvops
  build-arm64-xsm
  build-armhf
  build-armhf-libvirt
  build-armhf-pvops
  build-armhf-xsm
  test-amd64-amd64-devstack
  test-amd64-amd64-devstack-xsm
  test-arm64-arm64-devstack
  test-arm64-arm64-devstack-xsm
  test-armhf-armhf-devstack
  test-armhf-armhf-devstack-xsm

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agots-openstack-tempest: Use target_subunit_cmd
Anthony PERARD [Fri, 7 Jul 2017 16:45:23 +0000 (17:45 +0100)]
ts-openstack-tempest: Use target_subunit_cmd

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agoTestSupport: Implement target_subunit_cmd a subunit stream parser into substeps
Anthony PERARD [Tue, 4 Jul 2017 11:19:19 +0000 (12:19 +0100)]
TestSupport: Implement target_subunit_cmd a subunit stream parser into substeps

target_subunit_cmd can be used like target_cmd, but the command would
needs to output a subunit v1 stream, which will be parsed and turned
into osstest substeps. The command can be `| subunit-2to1` in order to
turn a subunit v2 stream into v1.

Currently, time is not taken into account, and all substeps will have
bogus timestamp as the output of the command is parsed after it has
runned.

This is a description of the subunit v1 protocol, taken from
python-subunit README, or https://pypi.python.org/pypi/python-subunit

test|testing|test:|testing: test LABEL
success|success:|successful|successful: test LABEL
success|success:|successful|successful: test LABEL DETAILS
failure: test LABEL
failure: test LABEL DETAILS
error: test LABEL
error: test LABEL DETAILS
skip[:] test LABEL
skip[:] test LABEL DETAILS
xfail[:] test LABEL
xfail[:] test LABEL DETAILS
uxsuccess[:] test LABEL
uxsuccess[:] test LABEL DETAILS
progress: [+|-]X
progress: push
progress: pop
tags: [-]TAG ...
time: YYYY-MM-DD HH:MM:SSZ

LABEL: UTF8*
NAME: UTF8*
DETAILS ::= BRACKETED | MULTIPART
BRACKETED ::= '[' CR UTF8-lines ']' CR
MULTIPART ::= '[ multipart' CR PART* ']' CR
PART ::= PART_TYPE CR NAME CR PART_BYTES CR
PART_TYPE ::= Content-Type: type/sub-type(;parameter=value,parameter=value)
PART_BYTES ::= (DIGITS CR LF BYTE{DIGITS})* '0' CR LF

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agoTestSupport: Introduce target_cmd_stashed
Anthony PERARD [Mon, 24 Jul 2017 14:54:49 +0000 (15:54 +0100)]
TestSupport: Introduce target_cmd_stashed

This works like target_cmd, but takes a ref to a filename as argument
and stash the output of the command then return a path to the stashed
output.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agots-openstack-deploy: Increase devstack timeout
Anthony PERARD [Sun, 11 Jun 2017 12:39:36 +0000 (13:39 +0100)]
ts-openstack-deploy: Increase devstack timeout

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agots-logs-capture: Capture OpenStack logs
Anthony PERARD [Wed, 14 Jun 2017 16:03:41 +0000 (17:03 +0100)]
ts-logs-capture: Capture OpenStack logs

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agots-openstack-deploy: Move logs to /var/log/openstack
Anthony PERARD [Wed, 14 Jun 2017 16:03:28 +0000 (17:03 +0100)]
ts-openstack-deploy: Move logs to /var/log/openstack

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agots-openstack-tempest: Update list of skipped tests
Anthony PERARD [Tue, 6 Jun 2017 14:32:34 +0000 (15:32 +0100)]
ts-openstack-tempest: Update list of skipped tests

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agots-openstack-tempest: Fix tempest invocation
Anthony PERARD [Thu, 11 May 2017 15:49:02 +0000 (16:49 +0100)]
ts-openstack-tempest: Fix tempest invocation

./run_tempest.sh is deprecated.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agots-openstack-deploy: Ignore libvirt-python version and use latest
Anthony PERARD [Fri, 9 Jun 2017 15:03:24 +0000 (16:03 +0100)]
ts-openstack-deploy: Ignore libvirt-python version and use latest

Devstack is going to try to install a specific version of libvirt-python
(currently 2.5.0) but this fail with libvirt installed by osstest.
Remove the requirement and use the latest available instead.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agots-openstack-deploy: Apply a Tempest patch
Anthony PERARD [Tue, 6 Jun 2017 14:38:04 +0000 (15:38 +0100)]
ts-openstack-deploy: Apply a Tempest patch

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agots-openstack-deploy: Increase open fd limit for RabbitMQ
Anthony PERARD [Tue, 16 May 2017 14:34:22 +0000 (15:34 +0100)]
ts-openstack-deploy: Increase open fd limit for RabbitMQ

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agots-openstack-deploy: Switch to Neutron for network
Anthony PERARD [Wed, 10 May 2017 14:14:44 +0000 (15:14 +0100)]
ts-openstack-deploy: Switch to Neutron for network

nova-network is not supported anymore and Neutron is the default.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agots-kernel-build: Enable network related modules for Neutron
Anthony PERARD [Wed, 10 May 2017 14:14:00 +0000 (15:14 +0100)]
ts-kernel-build: Enable network related modules for Neutron

Those options/modules are needed to run OpenStack Neutron with Open
vSwitch.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agots-openstack-deploy: Try to disable use of SYSTEMD
Anthony PERARD [Fri, 5 May 2017 14:45:21 +0000 (15:45 +0100)]
ts-openstack-deploy: Try to disable use of SYSTEMD

There is USE_SYSTEMD off by default, but it is now turned on if
USE_SCREEN if off. Try to keep use of systemd disabled.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agots-openstack-deploy: Keep CURL_CA_BUNDLE when sudo is called
Anthony PERARD [Thu, 27 Apr 2017 14:04:15 +0000 (15:04 +0100)]
ts-openstack-deploy: Keep CURL_CA_BUNDLE when sudo is called

This is part of commit "ts-openstack-deploy: set CURL_CA_BUNDLE" but
also allow pip to work when it is called via sudo without preserving the
existing environment variables.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agots-openstack-deploy: set CURL_CA_BUNDLE
Ian Jackson [Tue, 25 Apr 2017 18:04:55 +0000 (18:04 +0000)]
ts-openstack-deploy: set CURL_CA_BUNDLE

This overrides pip's attempt to specify a specific certificate bundle,
and is necessary if we have a MITM SSL proxy.

The security implications are not ideal, because the MITM proxy will
allow any X.509 cert from any CA, whereas pip would only allow an
expected cert.  But we got pip via plain https to start with...

CC: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agoTestSupport: provide target_https_mitm_proxy_cert_path
Ian Jackson [Tue, 25 Apr 2017 18:04:25 +0000 (18:04 +0000)]
TestSupport: provide target_https_mitm_proxy_cert_path

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agots-openstack-deploy: Set http proxy
Ian Jackson [Mon, 24 Apr 2017 14:04:43 +0000 (14:04 +0000)]
ts-openstack-deploy: Set http proxy

This allows ./stack.sh to access the global internet.

CC: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agots-openstack-tempest: Run Tempest to check OpenStack
Anthony PERARD [Thu, 6 Aug 2015 11:33:38 +0000 (12:33 +0100)]
ts-openstack-tempest: Run Tempest to check OpenStack

This script runs the OpenStack integration test suite, Tempest.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agots-openstack-deploy: Deploy OpenStack on a host with devstack
Anthony PERARD [Wed, 15 Jul 2015 16:27:49 +0000 (17:27 +0100)]
ts-openstack-deploy: Deploy OpenStack on a host with devstack

This script installs any necessary packages and clones all of the OpenStack
trees which are used by devstack to deploy OpenStack.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agoMaxUmask: enforce a maximum umask value
Ian Jackson [Tue, 17 Oct 2017 11:08:31 +0000 (12:08 +0100)]
MaxUmask: enforce a maximum umask value

On some operating systems, the default umask is not 002 as it should
be (for the sensible setup with personal groups).

If a user with an 022 or 077 umask invokes osstest in Executive mode,
they end up creating directories in $c{Logs} which are writeable only
by them, and that can stop the whole system because the service user
cannot expire them.

Prevent this from happening.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agoHostDiskRoot: bump to 20G
Ian Jackson [Fri, 13 Oct 2017 13:11:56 +0000 (14:11 +0100)]
HostDiskRoot: bump to 20G

Some of our Windows guests have more RAM now, and some of them have
big ISOs too.  The guest memory ends up in /root as a save image, and
the ISO ends up there too.

Double the size of / to 20G.  That will probably do for now and is
unlikely to break anything.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Reported-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
7 years agopvh: rename pvh tests to pvhv2
Roger Pau Monne [Wed, 11 Oct 2017 09:05:00 +0000 (10:05 +0100)]
pvh: rename pvh tests to pvhv2

Due to the recent changes to the PVH tests, all of them are now
failing because the current Linux kernel used by osstest doesn't
support PVHv2, and osstest treats the failures as regressions because
previously the PVH tests where actually testing classic PV.

Rename the tests to 'pvhv2' in order to prevent osstest from
classifying the failures as regressions.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agoexamine: save xl info output
Ian Jackson [Mon, 9 Oct 2017 11:30:31 +0000 (12:30 +0100)]
examine: save xl info output

One reason we want this is that it contains a reasonably easy-to-parse
record of the host memory.

When we have collected this information for all hosts, as xl info
output, we can write a program to copy the information into a host
property.  This will allow us to restrict certain jobs to hosts with
enough memory.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: George Dunlap <George.Dunlap@citrix.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
7 years agoosstest: fix PVH DomU tests
Roger Pau Monne [Tue, 3 Oct 2017 10:21:35 +0000 (11:21 +0100)]
osstest: fix PVH DomU tests

The pvh=1 xl option was removed, so switch the PVH tests to use
type='pvh' instead.

On older branches still supporting PVHv1 (and the 'pvh' xl option),
this change would turn the PVH tests into PV tests), except that the
previous change removed the PVH tests from those branches.
PVHv1 has already been removed from upstream Linux and Xen.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agoosstest: limit PVH tests to Xen >= 4.10
Roger Pau Monne [Tue, 3 Oct 2017 10:21:37 +0000 (11:21 +0100)]
osstest: limit PVH tests to Xen >= 4.10

Older Xen versions don't support the 'type' xl option used to create a
PVHv2 guest, which we are about to switch to.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agoosstest: use type='hvm' for HVM guests
Roger Pau Monne [Tue, 3 Oct 2017 10:21:36 +0000 (11:21 +0100)]
osstest: use type='hvm' for HVM guests

The previous builder='hvm' is also kept for compatibility with older
Xen releases. Note that the type option is ignored in previous Xen
versions.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agots-kernel-build: enable ntfs and fuse support
Wei Liu [Wed, 27 Sep 2017 11:04:16 +0000 (12:04 +0100)]
ts-kernel-build: enable ntfs and fuse support

They will be useful for extracting files from Windows and other OSes
from Dom0 while debugging.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
7 years agots-leak-check: Treat listing failure as fail, not broken
Ian Jackson [Wed, 27 Sep 2017 10:00:29 +0000 (11:00 +0100)]
ts-leak-check: Treat listing failure as fail, not broken

This can easily occur if the test host crashes, due to a bug.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agoREADME.dev: Improve instructions for new machine commissioning
Ian Jackson [Fri, 8 Sep 2017 17:37:50 +0000 (18:37 +0100)]
README.dev: Improve instructions for new machine commissioning

Discuss preliminary setup (hardware and BIOS).

Invent "mudcake0" and "mudcake1" as machines being added and use them
consistently in the example runes.

Recommend to run a host examination flight first.  (NB I am still
testing that this actually works as expected.  Host examination is a
bit new.)

Consistently suggest use of a $basis, and use of $flight variable.

Do not prepend runes with OSSTEST_CONFIG setting.  Instead, we expect
the user to have it set already (and mention this).

Use "cs-adjust-flight new:" rather than the two-step process.

Formatting improvements etc.

CC: Xudong Hao <xudong.hao@intel.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agoREADME.dev: Miscellaneous minor improvements
Ian Jackson [Fri, 8 Sep 2017 17:36:29 +0000 (18:36 +0100)]
README.dev: Miscellaneous minor improvements

Clarify documentation on mg-blockage, and also suggest using
allocation instead.

No longer advise removing crontab as a way to shut osstest down.  The
stop file approach works fine and is less disruptive.

Minor formatting changes.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agoREADME: Better documentation of recipes, db, etc.
Ian Jackson [Fri, 8 Sep 2017 13:51:52 +0000 (14:51 +0100)]
README: Better documentation of recipes, db, etc.

CC: George Dunlap <george.dunlap@citrix.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agoexamine: Do not try to find old version
Ian Jackson [Fri, 8 Sep 2017 14:04:47 +0000 (15:04 +0100)]
examine: Do not try to find old version

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agoosstest: fix a typo in mg-repro-setup
Roger Pau Monne [Wed, 6 Sep 2017 08:09:22 +0000 (09:09 +0100)]
osstest: fix a typo in mg-repro-setup

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
7 years agomake-flight etc.: drop arm64
Ian Jackson [Wed, 6 Sep 2017 14:06:09 +0000 (15:06 +0100)]
make-flight etc.: drop arm64

These are causing unjustified push blocks.

Verified with
  OSSTEST_CONFIG=standalone-config-example eatmydata ./standalone-generate-dump-flight-runvars
that no arm64 jobs remain.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agoauthorized_keys: Look for ed25519 and ecdsa keys too
Ian Jackson [Fri, 1 Sep 2017 16:55:26 +0000 (17:55 +0100)]
authorized_keys: Look for ed25519 and ecdsa keys too

Reported-by: George Dunlap <George.Dunlap@citrix.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agoPERLLIB, @INC: Use BEGIN { }
Ian Jackson [Fri, 1 Sep 2017 15:42:24 +0000 (16:42 +0100)]
PERLLIB, @INC: Use BEGIN { }

unshifting @INC is only effective if done at compile time, so that it
affects `use' directives.  So "Perl: Put . on @INC"
f261b07cbe96844dba5d8594c38149c0b179068a is simply broken

This patch was autogenerated using the following rune:

  git-grep -l 'unshift @INC' | xargs perl -i~ -pe 's#\bunshift\s+\@INC,\s*qw\(\.\)\;#BEGIN { $& }#'

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agomg-hosts: Fix another couple of prepared statements
Ian Jackson [Fri, 1 Sep 2017 15:35:05 +0000 (16:35 +0100)]
mg-hosts: Fix another couple of prepared statements

Use our $blah_q //= ... since these are used only here.  This is a
cheap kind of memoisation of a global constant.

Reported-by: George Dunlap <George.Dunlap@citrix.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agoREADME: document need for libnet-snmp-perl
Ian Jackson [Fri, 1 Sep 2017 15:24:00 +0000 (16:24 +0100)]
README: document need for libnet-snmp-perl

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Reported-by: George Dunlap <George.Dunlap@citrix.com>
7 years agomg-host: Prepare $checkhostq only if needed
Ian Jackson [Fri, 1 Sep 2017 15:21:23 +0000 (16:21 +0100)]
mg-host: Prepare $checkhostq only if needed

This is helpful because in standalone mode there is no resources table
and this fails.  But we want people to use `mg-hosts power' in
standalone mode, if they can, rather than running ./msu-pdu ad-hoc (or
whatever).

Reported-by: George Dunlap <George.Dunlap@citrix.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agoPERLLIB, @INC: Add . in some places we missed
Ian Jackson [Fri, 1 Sep 2017 15:04:08 +0000 (16:04 +0100)]
PERLLIB, @INC: Add . in some places we missed

* cri-getconfig (invoked by many cr* scripts, standalone-reset, etc.)
* mgi-common (invoked by many mg*)
* Two literal perl -e includes in Tcl code.

I think this leaves no scripts which do not set PERLLIB or @INC,
either by themselves or by something they source with `.'.

Reported-by: George Dunlap <George.Dunlap@citrix.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agoproduction-config: Publish per-flight osstest git refs in separate tree
Ian Jackson [Fri, 1 Sep 2017 10:05:55 +0000 (11:05 +0100)]
production-config: Publish per-flight osstest git refs in separate tree

Those refs need to be somewhere public so that the relevant git
objects are accessible.  I think they probably have to be in
refs/tags/ or refs/heads/ of some repo.

But it doesn't have to be the main one on xenbits.  Most people won't
want these refs.  Most git commits they are interested in (eg git
commits referred to in flight reports) will be available on the
osstest master branch.  And having these refs there makes git fetch
and git clone of the main repo slow.

Deployment note:

I have already created the destination repo.  Once this commit makes
it to master, I will manually transfer all the flight-* refs from the
main tree to osstest/osstest-massachusetts.git.

Reported-by: George Dunlap <George.Dunlap@citrix.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agosg-report-flight: Consider broken jobs as blockers even if other failure found
Ian Jackson [Tue, 1 Aug 2017 13:20:36 +0000 (14:20 +0100)]
sg-report-flight: Consider broken jobs as blockers even if other failure found

This stops us, effectively, justifying a currently broken job by
reference to a previously failed step which does justify a currently
failed step.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agomg-repro-setup: Slightly better document the alloc: syntax
Ian Jackson [Tue, 1 Aug 2017 13:18:29 +0000 (14:18 +0100)]
mg-repro-setup: Slightly better document the alloc: syntax

Provide a clearer indication that the <resource-spec> is passed to
mg-allocate (and therefore, implicitly, that mg-allocate's docs should
be consulted).

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
7 years agocs-hosts-list: Document the --arches, --kernels and --suites options
Ian Jackson [Fri, 28 Jul 2017 15:24:23 +0000 (16:24 +0100)]
cs-hosts-list: Document the --arches, --kernels and --suites options

These have a rather counterintuitive behaviour which is nevertheless
useful.  Document it, and the reasoning.

CC: Roger Pau Monne <roger.pau@citrix.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agoarm64: tolerate host allocation failures
Ian Jackson [Fri, 28 Jul 2017 10:31:03 +0000 (11:31 +0100)]
arm64: tolerate host allocation failures

We have no working ARM64 hardware right now.  Stop blocking things.

(Arguably this ought to be done in general for all arches, but
actually bugs in the flight construction code can cause this too, and
we wouldn't want such a regression to pass the osstest
self-push-gate.)

CC: Julien Grall <julien.grall@arm.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
v2: Match @@-arm64 jobs (eg build-arm64) too

7 years agocoverity: Set CoverityToolsStripComponents to 2
Ian Jackson [Wed, 26 Jul 2017 13:31:52 +0000 (14:31 +0100)]
coverity: Set CoverityToolsStripComponents to 2

This needs to be 2 for cov-analysis-linux64-2017.07.tar.gz
because that contains "./" at the start of its paths, which
tar counts as a component it's stripping.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
7 years agocoverity: Parameterise CoverityToolsStripComponents
Ian Jackson [Wed, 26 Jul 2017 13:30:58 +0000 (14:30 +0100)]
coverity: Parameterise CoverityToolsStripComponents

No functional change with current production-config.

(In fact, this needs to be 2 for cov-analysis-linux64-2017.07.tar.gz)

Reported-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
7 years agoap-common: Switch to Linux 4.9 by default
Ian Jackson [Mon, 22 May 2017 15:09:23 +0000 (16:09 +0100)]
ap-common: Switch to Linux 4.9 by default

I ran a special report[1] to see what to expect and:

   Tests which did not succeed and are blocking,
   including tests which could not be run:
    test-amd64-i386-xl-qemuu-win7-amd64 15 guest-localmigrate/x10 fail REGR.
    test-amd64-i386-xl-qemut-win7-amd64 15 guest-localmigrate/x10 fail REGR.

These Windows 7 migration tests have been failing on many branches and
don't look like they are something to do with the version of Linux
used in dom0.

Accordingly I intend to push this change to switch osstest to using
Linux 4.9 by default.  ARM tests are not affected at this time.

[1] ./sg-report-flight --that-linux=b65f2f457c49b2cfd7967c34b7a0b04c25587f13 --this-linux=f5eea276d8de10a32e68721707ae8f2fdfaa0960 --branches-also=linux-3.14,linux-arm-xen 109662 |less

CC: Boris Ostrovsky <boris.ostrovsky@oracle.com>
CC: Juergen Gross <jgross@suse.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
CC: Wei Liu <wei.liu2@citrix.com>
CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agostep logfiles: Populate logfile column with logfile name
Ian Jackson [Thu, 29 Jun 2017 15:19:16 +0000 (16:19 +0100)]
step logfiles: Populate logfile column with logfile name

This is part of a "Populate-then-rely" schema change, as described in
schema/README.updates.  Specifically, this is the final part of the
step:

5. Commit: code to populate new column; changing `add' to status
   Needed and `constraint' to status Ready.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agostep logfiles: sg-run-job: Break out step-log-leafname
Ian Jackson [Thu, 29 Jun 2017 15:18:26 +0000 (16:18 +0100)]
step logfiles: sg-run-job: Break out step-log-leafname

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agostep logfiles: Make substep_* take $logfile, not $script
Ian Jackson [Thu, 29 Jun 2017 12:10:38 +0000 (13:10 +0100)]
step logfiles: Make substep_* take $logfile, not $script

The $script parameter was used by Standalone to print a message, but
this is no longer done.

It is used by Executive as the value for the "step" column in the
steps table, which shows up as "script" in the output from
sg-report-flight.  But, when running under sg-run-job,
JobDB::Executive already has a better source of the script name: the
parent step (as reported in OSSTEST_TESTID).  When not running under
sg-run-job the use of $0 is good enough.

Finally, it is used by Executive as a logfile name.  But when running
under sg-run-job, JobDB::Executive gets the right logfile name anyway
(as above); and when not running under sg-run-job there is no default
logfile.

Conversely, substeps might organise their own logfile.

So abolish $script from the TestSupport substep API.  Replace it in
substep_start and substep_eval with a $logfile parameter.

Update all call sites to no longer pass $script.  None make their own
logfiles, so none pass the new parameter $logfile.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agostep logfiles: Honour new logfile column
Ian Jackson [Thu, 29 Jun 2017 12:05:18 +0000 (13:05 +0100)]
step logfiles: Honour new logfile column

There are the following places in the tree where we construct the
logfile name from stepno and step:
 * tcl/JobDB-Executive            main decision about logfile name  } OK
 * JobDB::Executive               final fallback for new steps      } keep
 * steps-logfile-constraint.sql   default for old data              }
 * sg-report-flight (twice)   } both read stepno and step from the db;
 * determine-failure-reasons  }  here we teach them to try logfile first

Now substep logs will have correct links in the job output, as soon as
the logfile column has the right data.

This is part of a "Populate-then-rely" schema change, as described in
schema/README.updates.  Specifically, this is the step:

6. Optionally commit: code which reads new column, but which tolerates
   it containing NULL/DEFAULT.  (`add' is already Needed.)

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agosubstep logfiles: Set logfile and step columns correctly for substeps
Ian Jackson [Thu, 29 Jun 2017 12:02:24 +0000 (13:02 +0100)]
substep logfiles: Set logfile and step columns correctly for substeps

If we are running under sg-run-job, OSSTEST_TESTID will be set to the
testid of the parent step (ie, the step created by sg-run-job which
relates to the execution of the whole script).

Unless the caller has specified otherwise, the log and script are
the same as for the parent step.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agosubstep logfiles: Populate new logfile column, at all, for substeps
Ian Jackson [Thu, 29 Jun 2017 11:55:54 +0000 (12:55 +0100)]
substep logfiles: Populate new logfile column, at all, for substeps

For now we populate it with the sometimes-wrong value based on
$script.  In detail:

* Add a parameter $logfile to $mjobdb->step_start, which currently
  always gets passed undef.

* In JobDB::Executive::step_start, try to use it as the value for the
  new logfile column.  But, if it is not set (which is currently
  always the case), default it to "<stepno>.<script>.log".

  This is the same log filename currently assumed (and therefore used)
  by sg-report-flight.  So with current versions of sg-report-flight,
  this has no visible functional change.

This is part of a "Populate-then-rely" schema change, as described in
schema/README.updates.  Specifically, this is part of the step:

5. Commit: code to populate new column; changing `add' to status
   Needed and `constraint' to status Ready.

We don't set `constraint' to Ready yet because we haven't completed
the code to populate the new column.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agostep logfiles: Provide new column
Ian Jackson [Thu, 29 Jun 2017 11:43:00 +0000 (12:43 +0100)]
step logfiles: Provide new column

We will write things into it, and use it, soon.

This is the start of a "Populate-then-rely" schema change, as
described in schema/README.updates.  Specifically, the steps:
1. Commit: new schema update `add', status Preparatory
2. Commit: new schema update `constraint', status Unfinished

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agosubstep logfiles: Move defaulting of $script into Executive
Ian Jackson [Thu, 29 Jun 2017 15:56:24 +0000 (16:56 +0100)]
substep logfiles: Move defaulting of $script into Executive

We are going to want to default this here in a more sophisticated way,
but we can't do that if it's already been defaulted from $0 earlier.

The other consumer of this default was in JobDB/Standalone, but we
have just changed that to ignore it.  So, no functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agostep logfiles: Standalone mode: Do not print uninformative $script value
Ian Jackson [Thu, 29 Jun 2017 11:08:48 +0000 (12:08 +0100)]
step logfiles: Standalone mode: Do not print uninformative $script value

Right now, this is sometimes wrong; even if it were right, it's not
going to be interesting in the transcript since the actual script name
is obvious from context.

Now this function does not care if $script is undef.

While we're here, fix the prototype (which is mostly commentary here,
as it is not used for method calls).

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agostep logfiles: Break out $logfilename in two places
Ian Jackson [Thu, 29 Jun 2017 16:28:03 +0000 (17:28 +0100)]
step logfiles: Break out $logfilename in two places

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agodb write transactions: Make all INSERTs name columns explicitly
Ian Jackson [Thu, 29 Jun 2017 12:40:00 +0000 (13:40 +0100)]
db write transactions: Make all INSERTs name columns explicitly

This makes the code more robust against schema updates.  Specifically,
if any columns were to be deleted, these runes would break.  (Also if
any column was inserted other than after the existing columns,
although this is not something Postgres can currently do AIUI.)

Affected tables are:
  flights_harness_touched
  jobs
  resources
  runvars
  steps

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agoschema updates: Be willing to apply Ready changes
Ian Jackson [Fri, 30 Jun 2017 15:19:06 +0000 (16:19 +0100)]
schema updates: Be willing to apply Ready changes

If the oldest code declares itself Ready for this change, or
(implausibly) Needed, then it is OK to apply.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agoschema updates: mg-schema-test-database: Cope with applied updates
Ian Jackson [Thu, 29 Jun 2017 11:41:50 +0000 (12:41 +0100)]
schema updates: mg-schema-test-database: Cope with applied updates

The schema_updates table contents are written by the call to
mg-schema-update.  Trying to copy the contents from the source db
correctly fails with duplicate key errors.  So don't do that.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agoschema updates: Document how to remove a used column
Ian Jackson [Thu, 29 Jun 2017 15:44:11 +0000 (16:44 +0100)]
schema updates: Document how to remove a used column

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agoschema updates: Fix typo in developer doc
Ian Jackson [Thu, 29 Jun 2017 15:05:55 +0000 (16:05 +0100)]
schema updates: Fix typo in developer doc

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agoDeveloper docs: A rune for flight comparision
Ian Jackson [Thu, 29 Jun 2017 11:27:00 +0000 (12:27 +0100)]
Developer docs: A rune for flight comparision

Something like this rune can be useful for comparing testids of
different flights.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agocoverity: Switch to tools 2017.07
Ian Jackson [Wed, 28 Jun 2017 12:21:19 +0000 (13:21 +0100)]
coverity: Switch to tools 2017.07

The old tools are no longer working.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Andrew Cooper <andrew.cooper3@citrix.com>
7 years agosg-run-job: Logfiles: Suppress links to 0-length files
Ian Jackson [Wed, 21 Jun 2017 12:22:17 +0000 (13:22 +0100)]
sg-run-job: Logfiles: Suppress links to 0-length files

These are not really helpful.  Making them not be links makes them
easier to skip by eye.

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

7 years agosg-report-flight: Make logfile list into table, with more info
Ian Jackson [Wed, 21 Jun 2017 12:21:54 +0000 (13:21 +0100)]
sg-report-flight: Make logfile list into table, with more info

Also print the mtime and the size.

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

7 years agoDebian: Pass sylog server details to debian-installer
Ian Jackson [Fri, 16 Jun 2017 10:10:44 +0000 (11:10 +0100)]
Debian: Pass sylog server details to debian-installer

This logs the installer output, even during a failed install.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agosg-run-job: Abolish `anyfailed'
Ian Jackson [Wed, 21 Jun 2017 11:46:26 +0000 (12:46 +0100)]
sg-run-job: Abolish `anyfailed'

This is very similar to !$ok.

anyfailed is set to 1 only by catching-otherwise, which also then sets
ok to 0.  The differences are solely some sites which set ok to 0
without setting anyfailed to 1:
 (i) In run-job, if there are escaped steps
 (ii) In run-job, if any steps were not run due to the skip_testids
      or truncate_testids runvars
 (iii) If a per-host-ts step fails

The only places where anyfailed was used were:

 * To decide whether to do log capture in build jobs.  This happens
   before (i) and (ii); and (iii) is not applicable because it only
   applies if $need_xen_hosts is nonempty which is never true if
   $need_build_host is false.  We can simply use $ok instead,
   without any functional change.

 * In printing a message to stdout at the end of the job.
   We update this use site to use $ok and change the message
   accordingly.

So overall, no functional change other than to a message in the
transcript.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agosg-run-job: Make catching-otherwise honour $ok
Ian Jackson [Wed, 21 Jun 2017 11:40:39 +0000 (12:40 +0100)]
sg-run-job: Make catching-otherwise honour $ok

This is more regular and abolishes a number of explicit $ok tests in
run-job.

Of the call sites:
 * "catching-otherwise blocked check-not-blocked" near the top of
   run-job is soon after $ok is set, so NFC.
 * The other call sites in run-job all test $ok explicitly, so NFC.
 * The one call site outside run-job (in examine-host-examine)
   contains only calls to run-ts, and to examine-host-install-* which
   itself only contains similar calls.  These all therefore honour $ok
   already.  So NFC.

While we are here:
 * Add a doc comment.
 * Do some slight whitespace fixups.

Overall, no functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agosg-run-job: Spawn ts-syslog-server
Ian Jackson [Thu, 15 Jun 2017 18:06:13 +0000 (19:06 +0100)]
sg-run-job: Spawn ts-syslog-server

Every job now gets a syslog server, which starts up after host
allocation.

The server's address and port are recorded by ts-syslog-server in a
runvar and can be used by subsequent test steps.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
v2: Change mistaken TESTID `.' to `='.  `.' means literally `.'.
    Do not start ts-syslog-server if !$ok.
    Do not start ts-syslog-server if job is being truncated now.
    Use new | (stdin pipe) spawn-ts feature; avoids total failure.

7 years agosg-run-job: Break out allocate-build-host, and reorder
Ian Jackson [Mon, 19 Jun 2017 16:24:02 +0000 (16:24 +0000)]
sg-run-job: Break out allocate-build-host, and reorder

We're going to want to start the syslog server after host allocation
but before installation, so we need to split these steps up.

A side effect is that a build job becomes `running' when it starts its
host install, not when it starts the actual build.

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

7 years agosg-run-job: examination: Run host install in prep
Ian Jackson [Mon, 19 Jun 2017 15:43:23 +0000 (15:43 +0000)]
sg-run-job: examination: Run host install in prep

We want to run this in prep, so that we can start the syslogd after
this.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agosg-run-job: examination: Style improvement
Ian Jackson [Mon, 19 Jun 2017 15:42:48 +0000 (15:42 +0000)]
sg-run-job: examination: Style improvement

This is going to make things a bit clearer.

Whitespace change only.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agosg-run-job: Execute prep-job/RECIPE if it exists
Ian Jackson [Mon, 19 Jun 2017 15:41:19 +0000 (15:41 +0000)]
sg-run-job: Execute prep-job/RECIPE if it exists

This allows a job to do its own host allocation, for example.

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

7 years agots-syslog-server: New test script
Ian Jackson [Thu, 15 Jun 2017 18:05:50 +0000 (19:05 +0100)]
ts-syslog-server: New test script

This is a "complete implementation of the UDP syslog protocol".

In fact, the UDP syslog protocol is trivial: the UDP packets contain
newline-terminated unix text strings.  We can simply chomp them and
log them (along with the sending address and port).

This script is designed to be run with the new "|" spawn-ts mode: it
will keep running until it is reaped.

Currently it is not part of any jobs.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agoTestSupport: Provide controller_ipaddr
Ian Jackson [Fri, 16 Jun 2017 10:10:32 +0000 (11:10 +0100)]
TestSupport: Provide controller_ipaddr

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agosg-run-job: Support scripts which need to be told when to quit
Ian Jackson [Fri, 16 Jun 2017 14:50:06 +0000 (15:50 +0100)]
sg-run-job: Support scripts which need to be told when to quit

We give them a pipe on stdin, whose writing end we close when we want
to reap them.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agosg-run-job: Document run-ts and spawn-ts argument syntaxes
Ian Jackson [Fri, 16 Jun 2017 14:44:12 +0000 (15:44 +0100)]
sg-run-job: Document run-ts and spawn-ts argument syntaxes

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
v2: More accurate explanation of ! in IFFAIL; and mention $ok.

7 years agomake-flight: Provide Windows 10 and Windows Server 16 guests with 3.5G of RAM
Ian Jackson [Fri, 16 Jun 2017 16:40:04 +0000 (17:40 +0100)]
make-flight: Provide Windows 10 and Windows Server 16 guests with 3.5G of RAM

Paul advises that 4G may be needed, but we have some 8G hosts in
various places.  If this is not sufficient in practice, we should
consider restricting the test to bigger hosts.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
CC: Dario Faggioli <dario.faggioli@citrix.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
7 years agomake-flight: do_hvm_win_test_one: honour extra args as runvars
Ian Jackson [Fri, 16 Jun 2017 16:37:47 +0000 (17:37 +0100)]
make-flight: do_hvm_win_test_one: honour extra args as runvars

No functional change as nothing passes extra args right now

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agots-windows-install: Honour memsize and disksize guest runvars
Ian Jackson [Fri, 16 Jun 2017 16:33:30 +0000 (17:33 +0100)]
ts-windows-install: Honour memsize and disksize guest runvars

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoTestSupport: Provide guest_template
Ian Jackson [Fri, 16 Jun 2017 16:32:27 +0000 (17:32 +0100)]
TestSupport: Provide guest_template

This will allow us to ask about guest_var and target_var before the
guest object has been created (eg by prepareguest).

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agots-windows-install: Provide guest with 32G of disk rather than 10G
Ian Jackson [Fri, 16 Jun 2017 15:55:26 +0000 (16:55 +0100)]
ts-windows-install: Provide guest with 32G of disk rather than 10G

Paul Durrant examined a VM after a migration failure and found it
short of free space with some essential services not running, and
conjectures that this is cauxed by disk shortage.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
7 years agomg-repro-setup: Use new syntax for cs-adjust-flight
Ian Jackson [Wed, 14 Jun 2017 14:52:16 +0000 (14:52 +0000)]
mg-repro-setup: Use new syntax for cs-adjust-flight

In 497b2c6c933d "Rework runvar-build-set new value handling" we fixed
bugs in cs-adjust-flight which would make mg-repro-setup's attempt to
adjust build jobs sometimes not match at all, but we also changed the
syntax for specifying just a new flight.  I forgot to update the
one in-tree user of that feature.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agoDrop build-*-oldkern
Wei Liu [Mon, 12 Jun 2017 11:26:36 +0000 (12:26 +0100)]
Drop build-*-oldkern

That is for testing the in-xen.git kernel build machinery which we
surely don't care about anymore.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
7 years agosubstep handling improvements
Ian Jackson [Mon, 12 Jun 2017 11:14:04 +0000 (12:14 +0100)]
substep handling improvements

* Change sg-run-job to pass OSSTEST_TESTID to ts-* scripts

* If the specified $testid starts with /, prepend OSSTEST_TESTID
  (with a fallback for ad-hoc by-hand invocations).

* Default $script to the leafname from $0.

* Provide substep_eval, which does the obvious thing with eval and $@.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agosg-check-tested: Provide --flight option
Ian Jackson [Tue, 6 Jun 2017 15:57:00 +0000 (16:57 +0100)]
sg-check-tested: Provide --flight option

This is mostly useful in ad-hoc situations.  For example, it can be
usefully used with ./mg-adjust-flight-makexrefs.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agocs-adjust-flight: Rework runvar-build-set new value handling
Ian Jackson [Tue, 6 Jun 2017 15:50:37 +0000 (16:50 +0100)]
cs-adjust-flight: Rework runvar-build-set new value handling

Previously, if it didn't contain a `.', it would be taken as a flight
name and completed with the old job name.  (This was not documented.)

This meant that there was no way to adjust to refer to a differnet job
in the flight being manipulated without specifying the flight number
(which is not desirable, nor even possible with new:)

Instead, we adopt the convention that a trailing . completes the value
with the old job name.  Values without a . are taken literally as a
job name, resulting in intra-flight references to that job.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agomake-flight: Add livepatch build/test target in the matrix.
Konrad Rzeszutek Wilk [Tue, 13 Dec 2016 01:40:46 +0000 (20:40 -0500)]
make-flight: Add livepatch build/test target in the matrix.

So we can have "test-amd64-amd64-livepatch" or such.

Changes to the flights are as follows.  In these branches:
    osstest
    xen-4.8-testing
    xen-4.9-testing
    xen-unstable
add the new jobs:
    test-amd64-amd64-livepatch
    test-amd64-i386-livepatch
which look a bit like this (test-amd64-amd64-livepatch example):
    all_host_di_version     current
    all_host_suite          jessie
    all_hostflags           arch-amd64,arch-xen-amd64,suite-jessie,purpose-test
    arch                    amd64
    buildjob                build-amd64
    kernbuildjob            build-amd64-pvops
    kernkind                pvops
    toolstack               xl
    xen_boot_append         loglvl=all
    xenbuildjob             build-amd64

Note that we do not add these jobs to xen-unstable-smoke of course,
although we did (earlier) turn livepatching for the Xen build
configuration in those flights, and try building the livepatch test
cases (since those things are cheap).

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agosg-run-job: Add the test-livepatch.
Konrad Rzeszutek Wilk [Wed, 16 Nov 2016 00:25:04 +0000 (19:25 -0500)]
sg-run-job: Add the test-livepatch.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agots-livepatch: Initial test-cases.
Konrad Rzeszutek Wilk [Tue, 15 Nov 2016 21:36:40 +0000 (16:36 -0500)]
ts-livepatch: Initial test-cases.

There are 37 of the test-cases in there. Before we run
any of them we verify that the payload files are present
in /usr/lib/debug.

If so we go through all of the test-cases.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
7 years agots-xen-build: Build livepatches test-cases
Konrad Rzeszutek Wilk [Mon, 21 Nov 2016 22:11:13 +0000 (17:11 -0500)]
ts-xen-build: Build livepatches test-cases

Livepatch compiles and works on x86/ARM{32|64} so we can enable it
in the Xen config when requested by the enable_livepatch runvar.

When we are trying to build with enable_livepatch, run `make
dist-tests' as well, to ship the test cases.  This depends on a
corresponding change to xen.git.

Finally, split the livepatch tests into their own stashed deliverable
from this job.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad@kernel.org>
7 years agomfi-common: Add an enable_livepatch runvar to the Xen build jobs
Konrad Rzeszutek Wilk [Thu, 18 May 2017 00:54:07 +0000 (20:54 -0400)]
mfi-common: Add an enable_livepatch runvar to the Xen build jobs

Set it to true on branches that support livepatching (Xen versions 4.9
and higher).  Currently nothing reads this variable, so no overall
functional change.

Changes to the flights are as follows.  On these branches:
        osstest
xen-4.8-testing
xen-4.9-testing
xen-unstable
xen-unstable-smoke
in these jobs:
build-amd64    build-amd64-xsm
build-arm64    build-arm64-xsm
build-armhf    build-armhf-xsm
build-i386     build-i386-xsm
add the runvar setting `enable_livepatch=true'.

Signed-off-by: Konrad Rzeszutek Wilk <konrad@kernel.org>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad@kernel.org>
7 years agoTestSupport: target_cmd_output_root_status: New sub
Konrad Rzeszutek Wilk [Mon, 12 Dec 2016 18:48:37 +0000 (13:48 -0500)]
TestSupport: target_cmd_output_root_status: New sub

Similar to target_cmd_root_status except it outputs both output _and_
status.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>