]> xenbits.xensource.com Git - people/liuw/osstest.git/log
people/liuw/osstest.git
10 years agomfi-common, make-flight: create XSM test jobs xsm-11
Wei Liu [Mon, 2 Feb 2015 19:57:13 +0000 (19:57 +0000)]
mfi-common, make-flight: create XSM test jobs

Duplicate Debian PV and HVM test jobs for XSM testing.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes in v8:
1. Make libvirtbuildjob = ${bfi}build-$dom0arch-libvirt

Changes in v6:
1. Skip generating xsm job for different platforms.
2. Use "xsms".
3. Reformat some long lines.

10 years agomake-flight: factor out do_pv_debian_tests
Wei Liu [Mon, 2 Feb 2015 19:53:26 +0000 (19:53 +0000)]
make-flight: factor out do_pv_debian_tests

Pure code motion. No effect on job generation.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agots-xen-install: install Xen with XSM support if requested
Wei Liu [Mon, 22 Sep 2014 13:13:41 +0000 (14:13 +0100)]
ts-xen-install: install Xen with XSM support if requested

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
Changes in v4:
1. Use "true" instead of "y"

10 years agoDebian.pm: load flask policy in uboot
Wei Liu [Fri, 12 Sep 2014 15:29:00 +0000 (16:29 +0100)]
Debian.pm: load flask policy in uboot

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes in v10:
1. Correctly get $flaskpolicy.

Changes in v9:
1. Add "xen,multiboot-module".

Changes in v8:
1. Append flask_enforcing=1 and flask_enabled=1.

10 years agoDebian.pm: pass in XSM configuration to bootloader setup routines
Wei Liu [Mon, 22 Sep 2014 13:11:51 +0000 (14:11 +0100)]
Debian.pm: pass in XSM configuration to bootloader setup routines

Change to Uboot will come in another patch. GRUB 1 is ignored, as
currently OSSTest only has Wheezy which has GRUB 2.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes in v6:
1. Wrap some overly long lines.

Changes in v4:
1. Modify callsite of debian_boot_setup to avoid regression.

10 years agomfi-common: create build-$arch-xsm job
Wei Liu [Mon, 8 Sep 2014 10:41:44 +0000 (11:41 +0100)]
mfi-common: create build-$arch-xsm job

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
Changes in v4:
1. Use "true" and "false" instead of "y" and "n".
2. Rename xenbranch_wants_xsm_tests to xenbranch_xsm_variants.

10 years agots-xen-build: only move hypervisor to xeninstall
Wei Liu [Mon, 23 Feb 2015 12:03:16 +0000 (12:03 +0000)]
ts-xen-build: only move hypervisor to xeninstall

... so that we can leave xenpolicy-* in tools tarball.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agots-xen-build: build with XSM support if requested
Wei Liu [Mon, 8 Sep 2014 15:06:52 +0000 (16:06 +0100)]
ts-xen-build: build with XSM support if requested

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes in v5:
1. Only set XSM_ENABLE when runvar is defined.
2. Fix inconsistent whitespace.

Changes in v4:
1. Use "true" instead of "y"

10 years agots-xen-build-prep: install checkpolicy
Wei Liu [Fri, 5 Sep 2014 16:24:36 +0000 (17:24 +0100)]
ts-xen-build-prep: install checkpolicy

This is used to complie Flask policy.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agooverlay: update overlay/etc/grub.d/20_linux_xen
Wei Liu [Sun, 12 Oct 2014 16:04:34 +0000 (17:04 +0100)]
overlay: update overlay/etc/grub.d/20_linux_xen

This file was originally created to work around Debian bug #633127
("/etc/grub/20_linux does not recognise some old Xen kernels").

According to Debian bug tracker [0], #633127 bug is fixed in Wheezy. As
we're now using Wheezy in OSSTest we can safely remove the old overlay
file if there's no further bugs discovered.

However we have another bug #690538 ("grub-common: Please make submenu
creation optional or at least allow users to disable it easily") that
would break OSSTest.  We're now using Wheezy in production. There's no
way to disable submenu in Wheezy. And submenu breaks OSSTest's grub menu
parser.

So update this overlay file to the one in Wheezy's grub-common
1.99-27+deb7u2 and take care of Debian bug #690538 by removing the lines
to generate submenu.

Also work around GRUB bug #43420 ("20_linux_xen doesn't support Xen XSM
policy file") by applying a small patch proposed in [2].

Add a note to reference #633127 and #690538 above grub2 setup function.

0: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=633127
1: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=690538
2: https://savannah.gnu.org/bugs/?43420

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agorump kernel tests: Fix testid of repeat xenstorels test
Ian Jackson [Thu, 19 Feb 2015 11:57:08 +0000 (11:57 +0000)]
rump kernel tests: Fix testid of repeat xenstorels test

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Ian Campbell <ian.campbell@citrix.com>
10 years agoNTP servers: Work around Debian's failure to honour preseed
Ian Jackson [Tue, 17 Feb 2015 17:35:57 +0000 (17:35 +0000)]
NTP servers: Work around Debian's failure to honour preseed

Setting clock-setup/ntp-server is not sufficient: it only takes effect
in the installer (!)

I have reported this as Debian #778564.  In the meantime we should
work around it for current releases (including jessie, which is
frozen).

For later releases, the new ntp.conf editing code arranges to bomb out
if we have an NTP server configured and find it hasn't been honoured
during the install.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
10 years agoNTP servers: Use NtpServer host property
Ian Jackson [Tue, 17 Feb 2015 17:44:01 +0000 (17:44 +0000)]
NTP servers: Use NtpServer host property

Move the specification of NTP servers in the production-config from
the ad-hoc entry in DebianPreseed to a dedicated NtpServer host
property.

This results in no overall functional change, except that the order of
elements in the preseed file is slightly different.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index a044f8f..cc075a4 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -506,7 +506,7 @@ sub di_installcmdline_core ($$;@) {
 sub preseed_base ($$$;@) {
     my ($ho,$suite,$extra_packages,%xopts) = @_;

-    return <<"END";
+    my $preseed = <<"END";
 d-i mirror/suite string $suite

 d-i debian-installer/locale string en_GB
@@ -572,10 +572,22 @@ d-i pkgsel/include string openssh-server, ntp, ntpdate, ethtool, chiark-utils-bi

 $xopts{ExtraPreseed}

-### END OF DEBIAN PRESEED BASE
+END
+
+    my $ntpserver = get_target_property($ho,'NtpServer');
+use Data::Dumper;
+print STDERR "PRESEED NTP ", Dumper($ntpserver);
+    $preseed .= <<"END" if $ntpserver;
+d-i clock-setup/ntp-server string $ntpserver
+END

+    $preseed .= <<"END";
+
+### END OF DEBIAN PRESEED BASE
 END
-}
+
+    return $preseed;
+}

 sub preseed_create ($$;@) {
     my ($ho, $sfx, %xopts) = @_;
diff --git a/README b/README
index 6e63e97..0a0242c 100644
--- a/README
+++ b/README
@@ -334,6 +334,11 @@ HostProp_<testbox>_TftpScope
    Defines the Tftp scope (i.e. subnet) where this host resides. See
    "TftpFoo_<scope> and TftpFoo" below.

+HostProp_<testbox>_NtpServer
+   NTP server to use.  You should probably have your own local
+   NTP server for production use; the default is to use the operating
+   system's default (normally, Debian's pool.ntp.org servers).
+
 HostFlags_<testbox>
    Defines a set of flags for the host. Flags is a list separated by
    whitespace, comma or semi-colon. A flag can be unset by prepending
@@ -357,9 +362,7 @@ HostGroupFlags_<group>
    merged with the host specific flags. Only used in standalone mode.

 DebianPreseed
-   Text to add to the debian-installer preseed file.  Optional
-   but you will need to set some NTP servers here if your firewall
-   doesn't permit NTP to Debian's pool.ntp.org servers.
+   Text to add to the debian-installer preseed file.  Optional.

 ========================================

diff --git a/production-config b/production-config
index 515bd98..5fbca50 100644
--- a/production-config
+++ b/production-config
@@ -77,8 +77,9 @@ XenUseUser osstest
 #DebianMirrorHost debian.uk.xensource.com
 DebianMirrorHost 10.80.16.196

+HostProp_NtpServer ntp.uk.xensource.com
+
 DebianPreseed= <<'END'
-d-i clock-setup/ntp-server string ntp.uk.xensource.com
 END

 HostProp_Serial sympathy woking

10 years agoNTP servers: Introduce new NtpServer host property
Ian Jackson [Tue, 17 Feb 2015 17:42:42 +0000 (17:42 +0000)]
NTP servers: Introduce new NtpServer host property

Allow the specification of NTP servers in a dedicated NtpServer host
property, which we honour in preseed_create.

Change the documentation to recommend this, rather than use of
ad-hoc text in DebianPreseed.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index a044f8f..cc075a4 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -506,7 +506,7 @@ sub di_installcmdline_core ($$;@) {
 sub preseed_base ($$$;@) {
     my ($ho,$suite,$extra_packages,%xopts) = @_;

-    return <<"END";
+    my $preseed = <<"END";
 d-i mirror/suite string $suite

 d-i debian-installer/locale string en_GB
@@ -572,10 +572,22 @@ d-i pkgsel/include string openssh-server, ntp, ntpdate, ethtool, chiark-utils-bi

 $xopts{ExtraPreseed}

-### END OF DEBIAN PRESEED BASE
+END
+
+    my $ntpserver = get_target_property($ho,'NtpServer');
+use Data::Dumper;
+print STDERR "PRESEED NTP ", Dumper($ntpserver);
+    $preseed .= <<"END" if $ntpserver;
+d-i clock-setup/ntp-server string $ntpserver
+END

+    $preseed .= <<"END";
+
+### END OF DEBIAN PRESEED BASE
 END
-}
+
+    return $preseed;
+}

 sub preseed_create ($$;@) {
     my ($ho, $sfx, %xopts) = @_;
diff --git a/README b/README
index 6e63e97..0a0242c 100644
--- a/README
+++ b/README
@@ -334,6 +334,11 @@ HostProp_<testbox>_TftpScope
    Defines the Tftp scope (i.e. subnet) where this host resides. See
    "TftpFoo_<scope> and TftpFoo" below.

+HostProp_<testbox>_NtpServer
+   NTP server to use.  You should probably have your own local
+   NTP server for production use; the default is to use the operating
+   system's default (normally, Debian's pool.ntp.org servers).
+
 HostFlags_<testbox>
    Defines a set of flags for the host. Flags is a list separated by
    whitespace, comma or semi-colon. A flag can be unset by prepending
@@ -357,9 +362,7 @@ HostGroupFlags_<group>
    merged with the host specific flags. Only used in standalone mode.

 DebianPreseed
-   Text to add to the debian-installer preseed file.  Optional
-   but you will need to set some NTP servers here if your firewall
-   doesn't permit NTP to Debian's pool.ntp.org servers.
+   Text to add to the debian-installer preseed file.  Optional.

 ========================================

diff --git a/production-config b/production-config
index 515bd98..5fbca50 100644
--- a/production-config
+++ b/production-config
@@ -77,8 +77,9 @@ XenUseUser osstest
 #DebianMirrorHost debian.uk.xensource.com
 DebianMirrorHost 10.80.16.196

+HostProp_NtpServer ntp.uk.xensource.com
+
 DebianPreseed= <<'END'
-d-i clock-setup/ntp-server string ntp.uk.xensource.com
 END

 HostProp_Serial sympathy woking

10 years agoDebian.pm: Slightly refactor preseed_base
Ian Jackson [Tue, 17 Feb 2015 17:40:47 +0000 (17:40 +0000)]
Debian.pm: Slightly refactor preseed_base

Arrange for preseed_base to accumulate its result in a variable.  This
is going to make it easier to add entries which are determined
programatically.

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
10 years agoDebian.pm: Pass $ho/$gho to preseed_base
Ian Jackson [Tue, 17 Feb 2015 17:20:53 +0000 (17:20 +0000)]
Debian.pm: Pass $ho/$gho to preseed_base

This is going to be useful soon.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
10 years agoTestSupport: Provide get_target_property
Ian Jackson [Tue, 17 Feb 2015 17:21:47 +0000 (17:21 +0000)]
TestSupport: Provide get_target_property

This looks in the supplied $ho, but if that's a $gho (ie it has a
$gho->{Host}) it also looks in its host.

This is going to be useful for a fair variety of host-specific or
infrastructure-determined properties.

It seems to me that whether a property ought to be looked up in the
host if not found in a particular guest depends mostly on the
property, and not on the way the guest is configured.  The easiest way
to represent that in the osstest codebase is probably to call
get_target_property instead of get_host_property in the appropriate
places.

The use of recursion will make this look through a series of nested
hosts if we have nested virtualisation going on.  Indeed, nested
virtualisation may benefit from replacement of get_host_property by
get_target_property in a number of cases.  (At the time of writing
there is no nested virt in osstest mainline, but it's on the way.)

Currently there are no callers of get_target_property.  One will
appear shortly.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Robert Hu <robert.hu@intel.com>
CC: LongtaoX Pang <longtaox.pang@intel.com>
10 years agoconfig: Tiny fixes
Ian Jackson [Tue, 17 Feb 2015 17:27:38 +0000 (17:27 +0000)]
config: Tiny fixes

* Default $c{DebianPreseed} to '' (previously, if it wasn't specified,
  there would be undefined variable warnings).

* Cope with empty <<END-notated config items in the configuration file
  parser.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
10 years agosg-report-job-history: Increase default history depth to 500
Ian Jackson [Tue, 17 Feb 2015 17:35:05 +0000 (17:35 +0000)]
sg-report-job-history: Increase default history depth to 500

We are putting through a lot more jobs and branches.  Older history is
still interesting.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
10 years agocs-adjust-flight: Add missing `use Data::Dumper'
Ian Jackson [Tue, 17 Feb 2015 17:34:25 +0000 (17:34 +0000)]
cs-adjust-flight: Add missing `use Data::Dumper'

Dumper is used in some of the error reporting so we need to `use' it.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
10 years agorump kernel tests: Repeat the xenstorels test 50 times
Ian Jackson [Fri, 6 Feb 2015 17:09:40 +0000 (17:09 +0000)]
rump kernel tests: Repeat the xenstorels test 50 times

Add a new step which uses repeat-ts to run
ts-rumpuserxen-demo-xenstorels many times.

We have to run ts-guest-destroy-hard after each time, to destroy the
guest which the demo script leaves lying about.

Strategically placed `+'s in the repeat-ts command line arrange that
the testid ends up being
   rumpuserxen-demo-xenstorels/xenstorels.repeat

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
v2: Run the test after, rather than before, the explicit
     ts-guest-destroy-hard.  That will avoid blocking the single
     destroy test if the repeat fails.

    No longer specify to tolerate failures of the post-run-demo
     destroy, as if the test passes so must the destroy.  Now by-hand
     testing may need a different ts-repeat-test rune, but in practice
     by-hand testing will probably involve a shell loop or something
     anyway.

10 years agorump kernel tests: Cancel unneeded edits of guest config
Ian Jackson [Fri, 6 Feb 2015 17:08:31 +0000 (17:08 +0000)]
rump kernel tests: Cancel unneeded edits of guest config

If the guest config is already set up to preserve, cancel the edit.
We are going to repeat this test, and this avoids creating many
identical copies of the same file in the log output.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbelL@citrix.com>
10 years agosg-run-job, etc.: Infrastructure for test script repetition
Ian Jackson [Fri, 6 Feb 2015 17:07:16 +0000 (17:07 +0000)]
sg-run-job, etc.: Infrastructure for test script repetition

Provide:
 * ts-repeat-test, a script to run multiple other test scripts in a loop
 * repeat-ts, a proc in sg-run-job which invokes it

No callers yet.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
10 years agosg-run-job: testid generation: Process ts more like rest of args
Ian Jackson [Fri, 6 Feb 2015 15:36:34 +0000 (15:36 +0000)]
sg-run-job: testid generation: Process ts more like rest of args

Remove ts as a separate parameter to spawn-ts.  The test script now
becomes the first entry in args.

We process it through the arg loop as before.  Currently there are no
calls where the first arg is `+' so the test script name ends up in
both real_args and testid_args.

We split it out of real_args into the ts variable with lshift.
We split it out of testid_args into the deftestid with lshift.

So afterwards in spawn-ts, all the variables (including real_args, ts,
deftestid and testid_args and hence host_testid_suffix) have the
values they would have had before.

Therefore there is no functional change for any existing calls.

However, because the first argument is not treated specially for the
`+' procesing loop, it is now possible to specify `+' as the first
entry in args to spawn-ts (ie where ts used to be) to arrange that the
deftestid (and hence, probably, the testid) is computed using later
arguments.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
10 years agosg-run-job: testid generation: Introduce $testid_args
Ian Jackson [Fri, 6 Feb 2015 15:30:38 +0000 (15:30 +0000)]
sg-run-job: testid generation: Introduce $testid_args

Rather than accumulating into host_testid_suffix directly, accumulate
into a list testid_args first.

No functional change: all we do is defer the construction of
host_testid_suffix, which is not used until later in this function.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
10 years agosg-run-job: testid generation: Move spawn-step-begin
Ian Jackson [Fri, 6 Feb 2015 15:24:31 +0000 (15:24 +0000)]
sg-run-job: testid generation: Move spawn-step-begin

Run spawn-step-begin until after the loop over $args, and after the
computation of the basic deftestid.

No functional change: nothing in that loop looks at stepno.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
10 years agotcl/osstestlib.tcl: Provide lshift
Ian Jackson [Fri, 6 Feb 2015 15:36:13 +0000 (15:36 +0000)]
tcl/osstestlib.tcl: Provide lshift

No callers yet.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agoTestSupport: Make next_unique_name count in decimal, not unary
Ian Jackson [Fri, 6 Feb 2015 16:59:26 +0000 (16:59 +0000)]
TestSupport: Make next_unique_name count in decimal, not unary

Ie, we add `+<counter>' rather than an ever-longer series of `+'s.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agoTestSupport: Introduce next_unique_name
Ian Jackson [Fri, 6 Feb 2015 16:55:52 +0000 (16:55 +0000)]
TestSupport: Introduce next_unique_name

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agoTestSupport: Provide target_editfile_cancel
Ian Jackson [Fri, 6 Feb 2015 13:57:31 +0000 (13:57 +0000)]
TestSupport: Provide target_editfile_cancel

This allows a caller of target_editfile to cancel the edit from within
their supplied code block.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agosg-report-job-history: Show which host test ran on
Ian Jackson [Mon, 9 Feb 2015 17:55:05 +0000 (17:55 +0000)]
sg-report-job-history: Show which host test ran on

Add a column listing the host(s) used.  We first find the relevant set
of host runvars (with a SELECT DISTINCT) and then look up each var for
each actual flight.

We do the pattern-matching on runvar names in perl to avoid giving the
postgresql optimiser a chance to turn this query into a full table
scan of the runvars table.  (A previous iteration of this patch
searched, in the per-flight loop, for all runvars whose name was
appropriately LIKE, with appalling performance.)

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agosg-report-job-history: Separate out $cond in queries
Ian Jackson [Mon, 9 Feb 2015 17:54:19 +0000 (17:54 +0000)]
sg-report-job-history: Separate out $cond in queries

We are going to want to reuse this, so separate out the computation of
$cond and @params.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agoallow.all: Do not regard libvirt guest start failures as regressions
Ian Jackson [Mon, 9 Feb 2015 14:22:50 +0000 (14:22 +0000)]
allow.all: Do not regard libvirt guest start failures as regressions

We have been experiencing some regressions in test-amd64-*-libvirt
guest-start.

These appear to be host-specific: for example, test-amd64-i386-libvirt
succeeded in 34278 on itch-mite but failed in 34234 on bush-cricket.
The only difference in osstest's records of the versions is a change
to linuxfirmware.

I booked out field-cricket and have repro'd some problems there.  It
appears that libvirtd can crash.  The symptoms are not the same as in
the push gate failures in osstest (34316, 34234) and linux-linus
(34299) but similar to those in linux-3.0 (34291) and linux-3.16
(34285).

When running libvirtd in the foreground we can get this:
  libvirtd: libxl_event.c:1791: libxl__ao_complete_check_progress_reports: Assertion `ao->in_initiator' failed.

So, it appears to be some kind of race.  The libvirt tests are new so
this is not a real regression in any of the trees gated by osstest.
So, permit this test for now.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
10 years agomg-debian-installer-update: workaround caching proxies
Ian Campbell [Sat, 10 Jan 2015 16:14:15 +0000 (16:14 +0000)]
mg-debian-installer-update: workaround caching proxies

Which otherwise interfere with updating d-i shortly after the upstream
update.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agoREADME.dev: Updates to commissioning process
Ian Campbell [Fri, 30 Jan 2015 10:55:03 +0000 (10:55 +0000)]
README.dev: Updates to commissioning process

- mkpxedir requires the resource to be allocated
- mention the need to bless the hosts for comissioning run, and to add
  proper blessings afterwards.
- run mg-execute-flight in screen

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agots-logs-capture: ensure captured log files are readable.
Ian Campbell [Wed, 4 Feb 2015 09:49:44 +0000 (09:49 +0000)]
ts-logs-capture: ensure captured log files are readable.

At least /var/log/libvirt/libvirtd.log is 0600 on the target machine
and this gets preserved in the captured logfile, eventually meaning
that apache on the log server cannot read the file to serve it ("You
don't have permission to access...").

Set all logfiles to 0666, modified by umask.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agots-rumpuserxen-build: Cope with rumprun-xen rename
Ian Jackson [Wed, 4 Feb 2015 14:39:12 +0000 (14:39 +0000)]
ts-rumpuserxen-build: Cope with rumprun-xen rename

rumpxen-app-* has been renamed to rumprun-xen-*.  We need to cope with
either, at least for the transition.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Martin Lucina <martin@lucina.net>
10 years agots-xen-build-prep: install nasm
Wei Liu [Sat, 31 Jan 2015 22:51:50 +0000 (22:51 +0000)]
ts-xen-build-prep: install nasm

OVMF requires nasm to build.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agoToolstack: Pass $gho to create method
Ian Campbell [Wed, 21 Jan 2015 16:12:21 +0000 (16:12 +0000)]
Toolstack: Pass $gho to create method

The cfg file can be obtained from $gho->{CfgPath}. This is more
consistent with other methods.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agots-guest-start: Use guest_create
Ian Campbell [Tue, 2 Dec 2014 12:53:26 +0000 (12:53 +0000)]
ts-guest-start: Use guest_create

This allows us to abolish CfgPathVar which was inconsistently used,
appears redundant with $gho->{CfgPath} and in any case never set to
anything other than 'cfgpath'.

This was intended to deal with toolstacks with a different cfg format
(such as very early versions of xl) but is no longer relevant.

I think if this need arises again in a future toolstack this
functionality could be reintroduced pretty trivially via the toolstack
abstraction which is added by this series.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agoToolstack: Remove Command field for all toolstacks.
Ian Campbell [Mon, 1 Dec 2014 16:36:01 +0000 (16:36 +0000)]
Toolstack: Remove Command field for all toolstacks.

Nothing in generic code uses this now, so remove.

xl+xend retain as _Command for internal use only.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agolibvirt: Implement shutdown_wait
Ian Campbell [Tue, 2 Dec 2014 12:11:47 +0000 (12:11 +0000)]
libvirt: Implement shutdown_wait

virsh does not include a --wait option to shutdown as xl and xm do, so
we implement it by hand.

Needs new guest_await_destroy helper. Note the guest_await_shutdown
requires on_shutdown='preserve'

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agolibvirt: Implement initscript restart which has some hope of working.
Ian Campbell [Mon, 1 Dec 2014 14:36:33 +0000 (14:36 +0000)]
libvirt: Implement initscript restart which has some hope of working.

... by refactoring start/stop actions into the functions which are
expected by restart.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agoToolstack: Refactor save/restore support
Ian Campbell [Mon, 1 Dec 2014 16:34:39 +0000 (16:34 +0000)]
Toolstack: Refactor save/restore support

Use $gho->{CfgPath} rather than constructing it again.

Still stubbed out for libvirt.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agoToolstack: Refactor migration support.
Ian Campbell [Fri, 28 Nov 2014 17:35:09 +0000 (17:35 +0000)]
Toolstack: Refactor migration support.

Note that since the previous patch arranges for
ts-migration-support-check to continue to fail for libvirt the libvirt
code is not actually called yet (and will die if it is). This patch is
mainly included to reduce the number of users of
toolstack()->{Command} closer to zero.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agoToolstack: Refactor migration support check.
Ian Campbell [Mon, 16 Jun 2014 16:41:38 +0000 (17:41 +0100)]
Toolstack: Refactor migration support check.

Not implemented for libvirt (the check itself that is, the hook is
present).

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agoToolstack: Refactor shutdown support
Ian Campbell [Mon, 16 Jun 2014 16:48:57 +0000 (17:48 +0100)]
Toolstack: Refactor shutdown support

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agoToolstack: Refactor consolecmd handling
Ian Campbell [Mon, 16 Jun 2014 16:46:32 +0000 (17:46 +0100)]
Toolstack: Refactor consolecmd handling

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agoToolstack: Refactor guest lifecycle.
Ian Campbell [Mon, 16 Jun 2014 15:46:40 +0000 (16:46 +0100)]
Toolstack: Refactor guest lifecycle.

Implement destory/create as per toolstack methods, including
implementing the libvirt version which previously didn't work. To do
this we use the virsh capability to convert an xl/xm style config file
into the correct XML.

xend basically calls into the xl helper since they are compatible.

xl/xm, uses ->{Command} which will eventually become private.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agoTestSupport: guest_create and guest_destroy take only a $gho.
Ian Campbell [Mon, 16 Jun 2014 16:30:48 +0000 (17:30 +0100)]
TestSupport: guest_create and guest_destroy take only a $gho.

The host can be looked up from $gho->{Host} and the toolstack can be
looked up from the host.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agoTestSupport: always use xl for generic operations.
Ian Campbell [Mon, 16 Jun 2014 12:29:13 +0000 (13:29 +0100)]
TestSupport: always use xl for generic operations.

Unless the toolstack is xend (for compatibility with pre-xl Xen
versions), when we use xm.

For several operations in TestSupport.pm the actual toolstack isn't
really relevant, since we want info straight from Xen. For simplicity
just use xl (or xm) in these cases, to avoid needing to implement the
following specially for each toolstack:
  - host_get_free_memory
  - guest_get_state
  - guest_find_domid
  - listing assignable pci devices

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agoToolstack: use get_host_method_object() to manage toolstack selection
Ian Campbell [Mon, 16 Jun 2014 08:18:35 +0000 (09:18 +0100)]
Toolstack: use get_host_method_object() to manage toolstack selection

This will allow us to more easily have per-toolstack methods etc.

The previous hash of toolstack parameters is now a blessed object. For
now the callers don't need to change but over the following patches we
will refactor things to use method calls. In particular we will be
aiming to remove Command from the hash and use method calls for
everything.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agots-rumpuserxen-demo-xenstorels: Use standard functions for things
Ian Campbell [Mon, 1 Dec 2014 16:26:34 +0000 (16:26 +0000)]
ts-rumpuserxen-demo-xenstorels: Use standard functions for things

Specifically guest_create and guest_find_domid.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agoPass host to toolstack()
Ian Campbell [Mon, 16 Jun 2014 12:00:14 +0000 (13:00 +0100)]
Pass host to toolstack()

This will be needed in a future patch.

Everywhere already has a $ho in hand. Also cache the answer as
$ho->{Toolstack}.

I scanned the source with:
    find -name \*.pm -exec perl -c {} \;
    for i in ts-* ; do perl -c $i; done
which reported "Not enough arguments for Osstest::TestSupport::toolstack"
for each callsite which needed changing.

Also don't pass the toolstack command name directly to
host_get_free_memory().  Look it up instead.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agots-logs-capture: Collect some libvirt logs and capabilities
Ian Campbell [Mon, 16 Jun 2014 16:15:43 +0000 (17:15 +0100)]
ts-logs-capture: Collect some libvirt logs and capabilities

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agoapt: lock osstest's usages of apt-get against each other
Ian Campbell [Tue, 15 Apr 2014 10:39:32 +0000 (11:39 +0100)]
apt: lock osstest's usages of apt-get against each other

Currently we rely on all apt-get invocations being in a single
ts-xen-build-prep job which can't run on a shared host.

That is a bit inflexible so instead use our own lock. We wait
indefinitely and rely on osstest's existing command timeout
infrastructure to catch problems.

target_install_packages*() previous estimated the time taken to
install the packages based on the number of packages. This no longer
applies because the install might get stuck behind some other large
install. Use a 3000s (nearly an hour) timeout instead (I expect
failures here to be unusual so erred on the big side)

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agoTestSupport: Add helper to wait for a guest to shutdown
Ian Campbell [Fri, 7 Feb 2014 12:41:28 +0000 (12:41 +0000)]
TestSupport: Add helper to wait for a guest to shutdown

Refactor the guts of guest_await_reboot into a helper and use for both
shutdown and reboot handling.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agots-hosts-allocate-Executive: Fix an undefined warning
Ian Jackson [Thu, 29 Jan 2015 12:49:48 +0000 (12:49 +0000)]
ts-hosts-allocate-Executive: Fix an undefined warning

$esrow is autovivified as { } by
            $candrow->{EquivMostRecentStatus} = $esrow->{status}
so use %$esrow which in scalar context is true iff the
hash is nonempty.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agolinux-3.16: New branch
Ian Jackson [Mon, 26 Jan 2015 18:05:11 +0000 (18:05 +0000)]
linux-3.16: New branch

Test this too.  We fetch this from the Canonical Kernel Team (ckt)
repo, but do not encode `ckt' in the branch name, in case this becomes
a proper stable tree.

(I have set up this branch on the osstest with the mg-branch-setup
script in this version of this tree.)

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agomg-branch-setup: New script
Ian Jackson [Mon, 26 Jan 2015 18:05:10 +0000 (18:05 +0000)]
mg-branch-setup: New script

Also, update the README.dev accordingly

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agoap-common: Have ap-push for linux trees use refs/heads/
Ian Jackson [Mon, 26 Jan 2015 18:05:09 +0000 (18:05 +0000)]
ap-common: Have ap-push for linux trees use refs/heads/

As per the docs in README.dev.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agoDebian: Handle systems where u-boot includes 0x on $filesize
Ian Campbell [Thu, 29 Jan 2015 11:37:39 +0000 (11:37 +0000)]
Debian: Handle systems where u-boot includes 0x on $filesize

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agoREADME.dev: Document the usage of stop files
Ian Campbell [Fri, 23 Jan 2015 15:34:51 +0000 (15:34 +0000)]
README.dev: Document the usage of stop files

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agoREADME.dev: Document how to do a force push.
Ian Campbell [Tue, 6 Jan 2015 13:51:17 +0000 (13:51 +0000)]
README.dev: Document how to do a force push.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agoAdd a flight to test OVMF master branch
Wei Liu [Mon, 12 Jan 2015 17:15:32 +0000 (17:15 +0000)]
Add a flight to test OVMF master branch

Do the usual stuffs for adding a new branch (ap-* cr-* etc).

Modify ts-xen-build so that it builds Xen with the specified ovmf tree
and revision.

Only build and test on x86 by modifying make-flight and mfi-common.

New branch is added to cr-daily-branch. It exports the tree and
changeset used for the test if set. Otherwise the values in Config.mk
are used.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agomake-flight: reorganize scheduling related test jobs
Dario Faggioli [Thu, 8 Jan 2015 17:47:02 +0000 (18:47 +0100)]
make-flight: reorganize scheduling related test jobs

Scheduling related tests are ok to run on ARM, so do
not cut them off. They also do not depend on a
particular Dom0 architecture.

The net effect is that the following tests are removed:
 test-amd64-i386-xl-credit2
 test-amd64-i386-xl-multivcpu

while the following new ones are created:
 test-amd64-amd64-xl-credit2
 test-amd64-amd64-xl-multivcpu
 test-armhf-armhf-xl-credit2
 test-armhf-armhf-xl-multivcpu
 test-armhf-armhf-xl-sedf
 test-armhf-armhf-xl-sedf-pin

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agoSwitch ARM testing back to linux-arm-xen branch.
Ian Campbell [Thu, 22 Jan 2015 15:53:35 +0000 (15:53 +0000)]
Switch ARM testing back to linux-arm-xen branch.

The cubietruck and arndale boards need a newer kernel than our current
baseline of 3.14. Therefore switch all ARM testing to the
linux-arm-kernel branch which has been moved up to test v3.16.

This effectively reverts commit 38b2fe2020883 "Switch armhf to use
common default Linux."

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
10 years agoDebian: create boot.scr.nat when installing Xen on u-boot.
Ian Campbell [Thu, 22 Jan 2015 11:05:07 +0000 (11:05 +0000)]
Debian: create boot.scr.nat when installing Xen on u-boot.

This boots the kernel we've build natively, where boot.xen boots Xen
and boot.deb boots the original Debian kernel.

Sometimes convenient when debugging issues.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agoTestSupport: replace power_cycle_timeout with power_cycle_sleep
Ian Campbell [Thu, 22 Jan 2015 11:05:06 +0000 (11:05 +0000)]
TestSupport: replace power_cycle_timeout with power_cycle_sleep

Which does the actual sleep and logs that it is doing so.

Otherwise on a machine which has a longish PowerCycleTime I keep
wondering why osstest has hung...

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agoDebian: Create boot.scr with a suffix and copy to boot.scr
Ian Campbell [Thu, 22 Jan 2015 11:05:05 +0000 (11:05 +0000)]
Debian: Create boot.scr with a suffix and copy to boot.scr

This ensures that we always have a boot script to boot at least the
native Debian kernel and Xen available, even after multiple iterations
of installation, which is handy when debugging a system.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agots-kernel-build: Adjust kernel .config to work on the arndale boards.
Ian Campbell [Thu, 22 Jan 2015 11:05:04 +0000 (11:05 +0000)]
ts-kernel-build: Adjust kernel .config to work on the arndale boards.

Various drivers are missing from multi_v7_defconfig in v3.16, also
some drivers which don't play nice are enabled by default, so remove
them.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agoOsstest/Debian: Add 0x prefix to $filesize
Ian Campbell [Thu, 22 Jan 2015 11:05:03 +0000 (11:05 +0000)]
Osstest/Debian: Add 0x prefix to $filesize

$filesize is an unprefixed hex number, but fdt set requires the 0x to
interpret it properly. See
http://lists.denx.de/pipermail/u-boot/2014-October/193622.html,
http://lists.denx.de/pipermail/u-boot/2014-November/194150.html and
http://lists.denx.de/pipermail/u-boot/2014-November/194150.html.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agoOsstest/Debian: Add "clk_ignore_unused" to default command line
Ian Campbell [Thu, 22 Jan 2015 11:05:02 +0000 (11:05 +0000)]
Osstest/Debian: Add "clk_ignore_unused" to default command line

dom0 is not aware that some clocks are actually in use (e.g. by the
hypervisor), so this stops the kernel from messing with (specifically,
disabling) those clocks. It's harmless even when not needed.

Really there ought to be some interface to communicate this from Xen
to dom0, or some other mechanism to gate things. See
http://bugs.xenproject.org/xen/bug/45

This bug is present in at least Wheezy and Jessie so apply this
workaround to those.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agoOsstest/Debian: Remove hardcoded addresses from boot.scr
Ian Campbell [Thu, 22 Jan 2015 11:05:01 +0000 (11:05 +0000)]
Osstest/Debian: Remove hardcoded addresses from boot.scr

Those are specific to the midway platform.

This depends on a change to the hostdb to add "0x01000000" as the
value of a new UBootSetXenAddrR property of the midway machines.

Most platforms will need something similar. For both cubietruck and
arndale 0x41000000.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agoOsstest/Debian: support adding a rootdelay property to bootargs
Ian Campbell [Thu, 22 Jan 2015 11:05:00 +0000 (11:05 +0000)]
Osstest/Debian: support adding a rootdelay property to bootargs

arndale appears to be quite slow (and asynchronous) at finding it's
scsi controller. rootdelay=3 seems to do the trick.

For the dom0 case this involved refactoring the existing provision of
the commandline to be less open-coded in the boot script here doc.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agoOsstest/Debian.pm: Refactor common kernel cmdline setup.
Ian Campbell [Thu, 22 Jan 2015 11:04:59 +0000 (11:04 +0000)]
Osstest/Debian.pm: Refactor common kernel cmdline setup.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agoOsstest/Debian: Refactor setting of dom0 kernel command line.
Ian Campbell [Thu, 22 Jan 2015 11:04:58 +0000 (11:04 +0000)]
Osstest/Debian: Refactor setting of dom0 kernel command line.

This will make it easier to make components optional in the future.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agoOsstest/Debian: Support for loading an FDT from u-boot script
Ian Campbell [Thu, 22 Jan 2015 11:04:57 +0000 (11:04 +0000)]
Osstest/Debian: Support for loading an FDT from u-boot script

The currently supported platform provides an FDT preloaded at 0x1000.
Replace this with ${fdt_addr} (which the current platform exposes) and
for platforms which do not provide an fdt arrange to load the relevant
file as named in the ${fdtfile} (which is conventionally provided by
u-boot for platforms which need this).

Drop some random memory clearing rune, I've no idea what the intended
purpose was, 0x800000 doesn't correspond to any $foo_addr_r on the
midway systems for example.

Also get rid of the scsi scan which must necessarily have already
happened (since the boot.scr itselfs lives on a scsi drive).

Lastly, add some echos to show progress through the script, as an aid
to debugging.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agoOsstest/Debian: Install dtbs into target filesystem in /boot/dtbs
Ian Campbell [Thu, 22 Jan 2015 11:04:56 +0000 (11:04 +0000)]
Osstest/Debian: Install dtbs into target filesystem in /boot/dtbs

This is done whenever dtbs.tar.gz exists. mg-debian-installer-update
produces the necessary inputs on the relevant platform (armhf).

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agoOsstest/PDU: Add eth008.pm method to control the ARM rack PDU
Ian Campbell [Thu, 22 Jan 2015 11:04:55 +0000 (11:04 +0000)]
Osstest/PDU: Add eth008.pm method to control the ARM rack PDU

This controls the eth008 relay board:
http://www.robot-electronics.co.uk/htm/eth008tech.htm

Due to the use of the CGI interface this requires firmware version 4+.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agomake-flight: Run a basic test on each arm platform
Ian Campbell [Thu, 22 Jan 2015 11:04:54 +0000 (11:04 +0000)]
make-flight: Run a basic test on each arm platform

Unlike x86 there is enough variation in the ARM platforms that it is
worth having a basic test on each as part of a standard run. This
relies on each host having an appropriate platform-$platform host
flag.

The existing test-ARCH-ARCH-xl test is retained as a floating test,
while a new variant is added for each distinct platform present in the
hostdb which is tied to that platform type. The intention is that only
arm platforms will have platforms at first, although perhaps
platform-intel and platform-amd could be added in the future too.

There are currently no platform-* flags in the hostdb, so tested with
s/platform-/equiv-/ and:

  ( set -ex ;
    source ./cri-getplatforms ;
    blessing=real ;
    export OSSTEST_CONFIG=production-config ;
    for p in '' `getplatforms "armhf"` ; do
      set +x ;
      echo PLATFORM: $p ;
    done
  )
which prints:
  PLATFORM:
  PLATFORM: marilith
and with s/armhf/amd64/:
  PLATFORM:
  PLATFORM: rackservers-s40670
  PLATFORM: r310-moth
  PLATFORM: rackservers-s40680
  PLATFORM: dell-r310
  PLATFORM: rackservers-s40679
  PLATFORM: rackservers-s40663
  PLATFORM: rackservers-q21011

Also tested in standalone mode with a ~/.xen-osstest/config
containing:

  PlatformsArmhf midway cubietruck arndale

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agoTftpDiVersion 2015-01-10
Ian Campbell [Sat, 10 Jan 2015 16:01:00 +0000 (16:01 +0000)]
TftpDiVersion 2015-01-10

Picks up updated kernel + installer from Debian 7.8 point release.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
10 years agomg-debian-installer-update: produce deterministic output
Ian Campbell [Sat, 10 Jan 2015 14:58:02 +0000 (14:58 +0000)]
mg-debian-installer-update: produce deterministic output

Currently rerunning mg-debian-install-update when the external files
have changed still produces differences in the local files produced
during post-processing.

Avoid these differences by:

  - Using gzip -n, which avoids storing a timestamp in the gzip
    header (as well as the name, which we don't need).
  - Using pax -M norm, which normalises all timestamps (among other
    things, such as the owner, which we don't care about)
  - Using tar --mtime, with a reference within the dpkg-deb created
    hierarchy (which has timestamps from the package and is therefore
    dependent only on the downloaded package revision)

With this the results of two invocations of
mg-debian-installer-update(-all) are identical (assuming no changes to
the downloaded files) as demonstrated by runnign this quick hack:

#!/bin/bash

set -ex

TMP=$HOME/tmp/mg-di
rm -rf $TMP
mkdir -p $TMP

cat >$TMP/config <<EOF
TftpPath $TMP
TftpDiBase debian-installer
EOF
cat $TMP/config

mkdir -p $TMP/debian-installer

export OSSTEST_CONFIG=production-config:$TMP/config

# ./mg-debian-installer-update wheezy armhf firmware-bnx2
./mg-debian-installer-update-all

find $TMP/debian-installer -type f -print0 | xargs -0x md5sum > $TMP/SUMS.BASE

#rm -rf $TMP/debian-installer/*
mv $TMP/debian-installer $TMP/debian-installer.org
mkdir -p $TMP/debian-installer

# ./mg-debian-installer-update wheezy armhf firmware-bnx2
./mg-debian-installer-update-all
md5sum --quiet -c $TMP/SUMS.BASE

exit 0

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
10 years agoEmpty commit to force push gate run
Ian Jackson [Tue, 6 Jan 2015 17:59:31 +0000 (17:59 +0000)]
Empty commit to force push gate run

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
10 years agocr-for-branches: Branches for Xen 4.5
Ian Jackson [Tue, 6 Jan 2015 15:46:32 +0000 (15:46 +0000)]
cr-for-branches: Branches for Xen 4.5

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
10 years agots-libvirt-build: use Osstest::BuildSupport::submodulefixup
Ian Campbell [Mon, 5 Jan 2015 12:57:08 +0000 (12:57 +0000)]
ts-libvirt-build: use Osstest::BuildSupport::submodulefixup

Instead of cloning gnulib manually which can break if upstream gnulib
gets ahead of libvirt.git (which applies patches on the fly etc). By
using submodulefixup we automatically DTRT and use the version of
gnulib specified by the libvirt.git submodule metadata, but with a
runvar override if necessary.

This also removes a whole bunch of faffing in ap-*, cr-daily-branch
and mfi-common to get the version of gnulib to use, which was always a
bit of a wart (ungated for one thing...).

We continue to use --no-git and GNULIB_SRCDIR because otherwise
autogen.sh (via bootstrap) will force its own version, overwriting
what submodulefixup has done. For this we need a way to get the hash
representing the module, so introduce submodule_find (and rework
submodule_have in terms of it).

Tested in standalone mode with build-amd64-libvirt and
build-amd64-rumpuserxen (because I touched submodule_have, AFAICT the
bodges were not run). The libvirt build was tested both with the
automatic revisions and with:
    revision_libvirt=2360fe5d24175835d3f5fd1c7e8e6e13addab629
    revision_libvirt_gnulib=16518d9ed8f25d3e53931dd1aa343072933e4604
(used in successful libvirt flight 32648), in both cases confirming
that the build used the desired versions.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@citrix.com>
---
v2: Honour revision_libvirt_gnulib.
v3: Fix submodule_have, defined(&sub) is always true because defined
    is special wrt &sub.

10 years agoTftpDiVersion 2014-12-14
Ian Campbell [Sun, 14 Dec 2014 19:18:38 +0000 (19:18 +0000)]
TftpDiVersion 2014-12-14

Picks up changes on armhf to include dtbs and more modules in the initrd
overlay.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
10 years agoAdd basic PVH flights.
Ian Campbell [Thu, 4 Dec 2014 09:58:34 +0000 (09:58 +0000)]
Add basic PVH flights.

These are the usual PV debian flights with pvh=1 added to the
configuration file.

A job is created for each of Intel and AMD, although obviously AMD is
expected to fail at the moment.

In my testing I got:
    (XEN) Attempt to create a PVH guest on a system without necessary hardware support
because my test box happens to be AMD.

I have confirmed that the pvh=1 option is correctly present in the
guest cfg for the new pvh job, and that no pvh= is present at all in
the existing test-amd64-amd64-xl job (which is expected and desired if
no pvh runvar is present).

Beyond that I've not tested this at all I fully expect even Intel to
fail in the first instance, due to issues such as lack of necessary
kernel options etc. I suggest to take this now and iterate on any
further changes.

For a xen-unstable flight this results in these runvars:
$ ./mg-show-flight-runvars pvh| grep -- -pvh | sort
test-amd64-amd64-xl-pvh-amd               all_hostflags               arch-amd64,arch-xen-amd64,suite-wheezy,purpose-test,hvm-amd
test-amd64-amd64-xl-pvh-amd               arch                        amd64
test-amd64-amd64-xl-pvh-amd               buildjob                    build-amd64
test-amd64-amd64-xl-pvh-amd               debian_arch                 amd64
test-amd64-amd64-xl-pvh-amd               debian_kernkind             pvops
test-amd64-amd64-xl-pvh-amd               debian_pvh                  1
test-amd64-amd64-xl-pvh-amd               kernbuildjob                build-amd64-pvops
test-amd64-amd64-xl-pvh-amd               kernkind                    pvops
test-amd64-amd64-xl-pvh-amd               toolstack                   xl
test-amd64-amd64-xl-pvh-amd               xenbuildjob                 build-amd64
test-amd64-amd64-xl-pvh-intel             all_hostflags               arch-amd64,arch-xen-amd64,suite-wheezy,purpose-test,hvm-intel
test-amd64-amd64-xl-pvh-intel             arch                        amd64
test-amd64-amd64-xl-pvh-intel             buildjob                    build-amd64
test-amd64-amd64-xl-pvh-intel             debian_arch                 amd64
test-amd64-amd64-xl-pvh-intel             debian_kernkind             pvops
test-amd64-amd64-xl-pvh-intel             debian_pvh                  1
test-amd64-amd64-xl-pvh-intel             kernbuildjob                build-amd64-pvops
test-amd64-amd64-xl-pvh-intel             kernkind                    pvops
test-amd64-amd64-xl-pvh-intel             toolstack                   xl
test-amd64-amd64-xl-pvh-intel             xenbuildjob                 build-amd64

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
v2: pvh\b.*.

10 years agoOsstest/Debian: Add support for "ExtraInitramfsModules" host property
Ian Campbell [Fri, 21 Nov 2014 13:16:58 +0000 (13:16 +0000)]
Osstest/Debian: Add support for "ExtraInitramfsModules" host property

The arndale platform needs a bunch of clk, phy and regulator stuff in order to
access its root filesystem. However mkinitramfs is not (currently?) able to
figure this out and therefore doesn't include them in the initrd. See
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=762042

Add a new host prop which can list these required additional module and
arranges for a suitable /etc/initramfs-tools/modules to be created on install.

Using the new HostGroupProp syntax the required modules are:

HostGroupProp_arndale_ExtraInitramfsModules clk-s2mps11 s5m8767 i2c-s3c2410 phy-exynos5250-sata

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agoOsstest/Debian: Refactor code to set bootargs in u-boot script
Ian Campbell [Fri, 21 Nov 2014 13:16:55 +0000 (13:16 +0000)]
Osstest/Debian: Refactor code to set bootargs in u-boot script

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agots-debian-install: rename cfg_xend to cfg
Wei Liu [Tue, 14 Oct 2014 21:50:08 +0000 (22:50 +0100)]
ts-debian-install: rename cfg_xend to cfg

... as this config file is just a config file in general, not strictly a
Xend format config file.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agogitignore: ignore images directory
Wei Liu [Tue, 14 Oct 2014 21:50:07 +0000 (22:50 +0100)]
gitignore: ignore images directory

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agoREADME: list chiark-utils-bin as requirement
Wei Liu [Tue, 14 Oct 2014 21:50:06 +0000 (22:50 +0100)]
README: list chiark-utils-bin as requirement

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agoTestSupport: allow overriding of on_* in prepareguest_part_xencfg
Ian Campbell [Mon, 1 Dec 2014 12:57:20 +0000 (12:57 +0000)]
TestSupport: allow overriding of on_* in prepareguest_part_xencfg

Currently only on_reboot can be overridden

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agoTestSupport: use timeout(1)
Ian Jackson [Mon, 8 Dec 2014 12:10:24 +0000 (12:10 +0000)]
TestSupport: use timeout(1)

If a command we run times out, the machinery in cmd() will arrange
for the ts-* script to spot the timeout, and stop waiting for it.

However it is also necessary for the command we ran to die.  It has a
copy of the owner daemon fd, so if it doesn't, our resources won't get
freed.  In sufficiently exciting bugs, our allocation might continue
indefinitely, while a subprocess of ours hangs on after we are long
gone.

timeout(1) does not print a message when the process times out (!)  So
we can't do away with the logic in cmd().  We set the timeout(1)
timeout to 30s more than our own timeout, so that cmd() will time
out first and print a message.

We could use alarm(1) as we do in Osstest/Serial/sympathy.pm but that
program isn't packaged and its unsophisticated approach is not really
appropriate for arbitrary nonconsenting programs.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
10 years agoAdd simple helper to update DI for all architectures.
Ian Campbell [Fri, 21 Nov 2014 13:16:52 +0000 (13:16 +0000)]
Add simple helper to update DI for all architectures.

Uses DebianNonfreeFirmware, even (especially) for production, so move
the README stanza out of standalone only section. The current default
matches what is in the current production versions of DI.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agots-kernel-build: enable CONFIG_IKCONFIG{_PROC}
Ian Campbell [Fri, 21 Nov 2014 13:16:51 +0000 (13:16 +0000)]
ts-kernel-build: enable CONFIG_IKCONFIG{_PROC}

This makes the kernel's .config available in /proc/config.gz and
embeds a copy which can be extracted with
linux/scripts/extract-ikconfig (which I've not tried, but have no
reason to doubt).

Having this around can be handy with an older osstest installed test
box and to confirm you've booted the kernel you think you have when
you are messing with .config options.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agostandalone: Introduce "HostGroups" for use in OSSTEST_CONFIG
Ian Campbell [Fri, 21 Nov 2014 13:16:50 +0000 (13:16 +0000)]
standalone: Introduce "HostGroups" for use in OSSTEST_CONFIG

This saves repeating identical HostProp and HostFlags for sets of
identical machines. e.g.

    HostGroupProp_cubietruck_LinuxSerialConsole ttyS0
    HostGroupProp_cubietruck_Build_Make_Flags -j12
    HostGroupProp_cubietruck_XenSerialConsole dtuart
    HostGroupProp_cubietruck_XenDTUARTPath /soc@01c00000/serial@01c28000
    HostGroupFlags_cubietruck suite-wheezy,equiv-cubietruck,need-kernel-deb-armmp,no-di-kernel,need-uboot-bootscr

    HostGroup_braque cubietruck
    HostProp_braque_Fqdn braque.uk.xensource.com

    HostGroup_picaso cubietruck
    HostProp_picaso_Fqdn picaso.uk.xensource.com

    HostGroup_metzinger cubietruck
    HostProp_metzinger metzinger.uk.xensource.com

    HostGroup_gleizes cubietruck
    HostProp_gleizes_Fqdn gleizes.uk.xensource.com

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agots-xen-build-prep: Install libxml-xpath-perl on build machines
Ian Campbell [Fri, 5 Dec 2014 14:54:08 +0000 (14:54 +0000)]
ts-xen-build-prep: Install libxml-xpath-perl on build machines

Required by latest libvirt, to build docs.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@citrix.com>
10 years agolinux-next tests: Use correct branch for baseline
Ian Jackson [Thu, 20 Nov 2014 13:48:56 +0000 (13:48 +0000)]
linux-next tests: Use correct branch for baseline

Make cr-daily-branch honour an environment or setting variable
EXTRA_SGR_ARGS.  In branch-settings.linux-next set it appropriately to
arrange that the linux-next test reports consider linux-linus tests as
interesting as well as just linux-next ones.

(We already use a flight from linux-linus for selecting the baseline
linux version.)

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>