Commit Graph
57 Commits
Author SHA1 Message Date
Olaf Hering 4905c2da20 automation: avoid globbering the docker run args
containerize bash -c './configure && make' fails due to shell expansion.

Collect all arguments for the script and pass them verbatim to the
docker run command.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Andrew Cooper <andew.cooper3@citrix.com>
2021-07-09 13:28:52 +01:00
Olaf Hering d213e85cb1 automation: dump contents of /etc/os-release
To aid debugging build failures, dump /etc/os-release during build.
This helps with rolling releases such as Tumbleweed to understand the
state of the build container.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2021-07-08 12:36:21 +01:00
Anthony PERARD ed939ef084 automation: Check if ninja is available before building QEMU
ninja is now required to build the latest version of QEMU, and not all
distros have a suitable version.  Skip the QEMU build when ninja is not
available.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2021-07-08 12:36:21 +01:00
Connor Davis 3092006fc4 automation: Add container for riscv64 builds
Add a container for cross-compiling xen to riscv64.
This just includes the cross-compiler and necessary packages for
building xen itself (packages for tools, stubdoms, etc., can be
added later).

Signed-off-by: Connor Davis <connojdavis@gmail.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2021-05-25 10:25:39 +01:00
Wei Liu b066bd195c automation: save xen config before building
It is reported that failed randconfig runs are missing the config file
which makes debugging impossible. Fix this by moving the line that
copies the config file before the build is executed.

Signed-off-by: Wei Liu <wl@xen.org>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
2021-05-05 14:23:01 +00:00
Stefano Stabellini aaa3eafb3b automation: add arm32 cross-build tests for Xen
Add a debian build container with cross-gcc for arm32 installed.
Add build jobs to cross-compile Xen-only for arm32.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
Acked-by: Wei Liu <wl@xen.org>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2021-04-20 12:54:03 -07:00
Roger Pau Monne 893103e286 automation: allow doing hypervisor only builds
For things like randconfig there's no need to do a full Xen build, a
hypervisor build only will be much faster and will achieve the same
level of testing, as randconfig only changes the hypervisor build
options.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
Acked-by: Doug Goldstein <cardoe@cardoe.com>
2021-03-11 15:39:37 +00:00
Roger Pau Monne 4e01c48886 automation: enable rombios build on Alpine
It's now safe to enable the build of rombios on Alpine systems, as
hvmloader already builds fine there.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Wei Liu <wl@xen.org>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
2021-03-10 13:15:13 +00:00
Andrew Cooper 75b0505547 automation: Fix containerize to understand the Alpine container
This was missing from the work to add the alpine container.

Fixes: a9afe7768b ("automation: add alpine linux 3.12 x86 build container")
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
2021-02-25 15:22:40 +00:00
Stefano Stabellini b470737229 automation: fix qemu-alpine-arm64.sh
Remove copy/paste error introduced by f58976544f ("automation: use
test-artifacts/qemu-system-aarch64 instead of Debian's")

Fixes: f58976544f ("automation: use test-artifacts/qemu-system-aarch64 instead of Debian's")
Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2021-01-22 16:30:32 -08:00
Edwin Török eb52442d7f automation: Add Ubuntu:focal container
Signed-off-by: Edwin Török <edvin.torok@citrix.com>
Acked-by: Doug Goldstein <cardoe@cardoe.com>
2021-01-22 14:39:36 +00:00
Stefano Stabellini f58976544f automation: use test-artifacts/qemu-system-aarch64 instead of Debian's
Instead apt-get'ing Debian's qemu-system-aarch64, simply use the
provided QEMU binary under binaries.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
Acked-by: Wei Liu <wl@xen.org>
2021-01-14 18:14:58 -08:00
Stefano Stabellini 7a3b691a8f automation: add domU creation to dom0 alpine linux test
Add a trivial Busybox based domU.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
Acked-by: Wei Liu <wl@xen.org>
2020-12-17 14:56:43 -08:00
Stefano Stabellini fccaa4d35c automation: use the tests-artifacts kernel for qemu-smoke-arm64-gcc
Use the tests-artifacts kernel, instead of the Debian kernel, for the
qemu-smoke-arm64-gcc job.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
Acked-by: Wei Liu <wl@xen.org>
2020-12-17 14:56:43 -08:00
Stefano Stabellini b44eb6daa9 automation: create an alpine linux arm64 test job
Create a test job that starts Xen and Dom0 on QEMU based on the alpine
linux rootfs. Use the Linux kernel and rootfs from the tests-artifacts
containers. Add the Xen tools binaries from the Alpine Linux build job.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
Acked-by: Wei Liu <wl@xen.org>
2020-12-17 14:56:43 -08:00
Stefano Stabellini 3a51115ab5 automation: special configure flags for musl-based systems
QEMU upstream builds with warnings when libc is musl:

  #warning redirecting incorrect #include <sys/signal.h> to <signal.h>

Disable -Werror by passing --disable-werror to the QEMUU config script
if libc is musl.

hvmloader doesn't build on musl systems today. Disable any guest
firmware build.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
Acked-by: Wei Liu <wl@xen.org>
2020-12-17 14:56:43 -08:00
Stefano Stabellini 8c5e5e85aa automation: add dom0less to the QEMU aarch64 smoke test
Add a trivial dom0less test:
- fetch the Debian arm64 kernel and use it ad dom0/U kernel
- use busybox-static to create a trivial dom0/U ramdisk
- use ImageBuilder to generate the uboot boot script automatically
- install and use u-boot from the Debian package to start the test
- binaries are loaded from uboot via tftp

Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
Acked-by: Wei Liu <wl@xen.org>
2020-12-17 14:56:43 -08:00
Stefano Stabellini dbc1e724bb automation: add a QEMU aarch64 smoke test
Use QEMU to start Xen (just the hypervisor) up until it stops because
there is no dom0 kernel to boot.

It is based on the existing build job unstable-arm64v8.

Also use make -j$(nproc) to build Xen.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
Acked-by: Wei Liu <wl@xen.org>
2020-12-17 14:56:43 -08:00
Edwin Török 415f904254 automation/scripts/containerize: fix DOCKER_CMD=podman
On CentOS 8 with SELinux containerize doesn't work at all:

Make sure that the source code and SSH agent directories are passed on
with SELinux relabeling enabled.
(`-security-opt label=disabled` would be another option)

Signed-off-by: Edwin Török <edvin.torok@citrix.com>
Acked-by: Doug Goldstein <cardoe@cardoe.com>
2020-11-18 16:55:30 +00:00
Doug Goldstein 7872b493f9 ci: drop CentOS 6
CentOS 6 is no longer supported by upstream so we cannot test against it
for future Xen releases.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2020-11-18 16:55:30 +00:00
Dario Faggioli 753ba5b37d automation: implement (rootless) podman support in containerize
Right now only docker is supported, when using the containerize script
for building inside containers. Enable podman as well.

Note that podman can be use in rootless mode too, but for that to work
the files /etc/subuid and /etc/subgid must be properly configured.

For instance:

dario@localhost> cat /etc/subuid
dario:100000:65536

dario@localhost:> cat /etc/subgid
dario:100000:65536

Signed-off-by: Dario Faggioli <dfaggioli@suse.com>
Acked-by: Wei Liu <wl@xen.org>
Release-acked-by: Paul Durrant <paul@xen.org>
2020-06-02 12:01:51 +00:00
Dario Faggioli 177b81e464 automation: openSUSE distro names helpers for containerize
Signed-off-by: Dario Faggioli <dfaggioli@suse.com>
Acked-by: Wei Liu <wl@xen.org>
Release-acked-by: Paul Durrant <paul@xen.org>
2020-06-02 12:01:51 +00:00
George Dunlap 1497e78068 automation/containerize: Add a shortcut for Debian unstable
Signed-off-by: George Dunlap <george.dunlap@citrix.com>
Acked-by: Wei Liu <wl@xen.org>
2020-05-28 12:20:57 +01:00
Anthony PERARD d25b3ef3f9 automation: Only build QEMU if Python >= 3.5
Recent version of QEMU will not build anymore if Python < 3.5.
That is, QEMU 4.3 not released yet.

That check would also prevent the GitLab CI from building QEMU if
python3 binary isn't present.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Doug Goldstein <cardoe@cardoe.com>
2020-01-27 14:44:07 +00:00
Roger Pau Monne d7c3e6c9e9 automation: increase tests maximum time from 10s to 30s
10s is too low for the clang tests, this is the output from a clang
test:

  (XEN) [    6.512748] ***************************************************
  (XEN) [    6.513323] SELFTEST FAILURE: CORRECT BEHAVIOR CANNOT BE GUARANTEED
  (XEN) [    6.513891] ***************************************************
  (XEN) [    6.514469] 3... 2... 1...
  (XEN) [    9.520011] *** Serial input to DOM0 (type 'CTRL-a' three times to switch input)
  (XEN) [    9.544319] Freed 488kB init memory
  --- Xen Test Framework ---
  Environment: HVM 32bit (PAE 3 levels)
  Hello World
  Test result: SUCCESS
  (XEN) [    9.610977] Hardware Dom0 halted: halting machine

As can be seen from the output above booting Xen and the XTF test
takes ~10s, without accounting for the time it takes for QEMU to
initialize.

Increase the timeout to 30s to be on the safe side.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Wei Liu <wl@xen.org>
Release-acked-by: Juergen Gross <jgross@suse.com>
2019-12-03 13:54:23 +00:00
Roger Pau Monne 2ed19eaccf automation: add timestamps to Xen tests
Enable Xen timestamps in the automated Xen tests, this is helpful in
order to figure out if Xen is stuck or just slow in the automated
tests.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Wei Liu <wl@xen.org>
Release-acked-by: Juergen Gross <jgross@suse.com>
2019-12-03 13:53:59 +00:00
Roger Pau Monne 508908fd44 automation: fix typo in comment
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Wei Liu <wl@xen.org>
2019-06-16 21:54:47 +01:00
Andrew Cooper f093199132 automation: Fix CI with the fedora container
A recent rebuild of the CI contaniers switched from Fedora 29 to 30 because
the dockerfile is targetting latest.

Unfortunately, the version of iPXE in master doesn't build with the default
GCC in Fedora 30, which is blocking all CI activity.

Switch from latest to an explicit version, to avoid future breakage.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Doug Goldstein <cardoe@cardoe.com>
2019-06-11 17:42:52 +01:00
Roger Pau Monne 6325f70e77 automation: add clang and lld 8 tests to gitlab
Using clang and lld 8 requires installing the packages from the
official llvm apt repositories, so modify the Debian Docker files for
stretch and unstable to add the llvm repo and install clang and lld
from it.

Also add some jobs to test building Xen with clang 8 and lld.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Doug Goldstein <cardoe@cardoe.com>
2019-06-11 11:06:52 +01:00
Wei Liu 78798fb431 automation: set ret for potential error in build-test.sh
`git rev-list` can fail if the base..tip range contains invalid
commit(s). If that happens ret never gets a chance to be set.

Set ret before hand to fix the issue.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Doug Goldstein <cardoe@cardoe.com>
2019-04-05 11:14:57 +01:00
Wei Liu f21a359a30 automation: allow build-test.sh to run in detached HEAD state
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Doug Goldstein <cardoe@cardoe.com>
2019-04-05 11:14:57 +01:00
Wei Liu 460837f800 automation: add Fedora image to containerize script
At the same time sort the list alphabetically.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Doug Goldstein <cardoe@cardoe.com>
2019-04-04 14:20:25 +01:00
Anthony PERARD 7f6658d9cb automation: Add Arch Linux container and build jobs
One particularity of Arch Linux, /usr/bin/python is python3.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Doug Goldstein <cardoe@cardoe.com>
2019-04-04 10:57:35 +01:00
Andrew Cooper 8eed571409 CI: Add a CentOS 6 container and build jobs
CentOS 6 is probably the most frequently broken build, so adding it to CI
would be a very good move.

One problem is that CentOS 6 comes with Python 2.6, and Qemu requires 2.7.
There appear to be no sensible ways to get Python 2.7 into a CentOS 6
environments, so modify the build script to skip the Qemu upstream build
instead.  Additionally, SeaBIOS requires GCC 4.6 or later, so skip it as well.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
2019-03-26 15:36:19 +00:00
Andrew Cooper 1316369dca CI: Fix indentation in containerize script
The script is mostly indented with spaces, but there are three tabs.  Fix them
up to be consistent.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
2019-03-25 11:34:48 +00:00
Wei Liu 75e383fa93 automation: enable building rombios with clang
Previously it is disabled because the embedded ipxe can't be built
with clang. Now that ipxe is split out we can use --with-system-ipxe
to work around the issue.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
2019-03-15 12:40:24 +00:00
Wei Liu 755eb6403e automation: introduce a QEMU smoke test for PVH Dom0
Make qemu-smoke-x86-64.sh take a variant argument. Make two new tests
in test.yaml.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Doug Goldstein <cardoe@cardoe.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
2019-02-01 15:13:25 +00:00
Wei Liu 568653e01b automation: make clean between builds
Currently randconfig tests are more likely to fail than to succeed
because of a bug in xen's build system: symbols-dummy.o's dependency
is wrong, which causes it to not get rebuild between runs, which
eventually causes linking to fail. There may also be other corner
cases we haven't discovered.

The fix is not straightforward. For now, make sure the tree is cleaned
properly between builds so we don't see random failures in Gitlab CI.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Doug Goldstein <cardoe@cardoe.com>
2018-11-21 18:34:27 +00:00
Wei Liu 29e284512f automation: add qemu smoke test
This patch introduces a new test stage into the pipeline and provides
a simple QEMU based smoke test.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Doug Goldstein <cardoe@cardoe.com>
2018-11-20 18:15:46 +00:00
Wei Liu 3c21dba189 automation: also specify xen binary as artifact on x86_64
... so that it can be passed on to test stage.

Note that xen is only extracted for x86_64 build since others may not
have that. Use a directory to account for possibly different file
names on Arm.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Doug Goldstein <cardoe@cardoe.com>
2018-11-20 18:15:39 +00:00
Wei Liu b9fb402ec3 automation: stash default config file for artifact extraction
This aids troubleshooting when we notice a failure in the default
configuration.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Doug Goldstein <cardoe@cardoe.com>
2018-11-20 16:55:10 +00:00
Wei Liu 102a437d59 automation: introduce CONTAINER_NO_PULL for containerize
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Doug Goldstein <cardoe@cardoe.com>
2018-11-20 16:54:55 +00:00
Wei Liu 15410d8fc8 automation: lift tools build restriction in build script
The restrictions are mostly from Travis CI days when cross-compilation
was not feasible. Now we will be building natively on Arm, remove
those lines.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Doug Goldstein <cardoe@cardoe.com>
2018-11-13 13:48:46 +00:00
Wei Liu 7ef789d79f automation: build some customised configs
Introduce a new directory to put in configs we care about. Modify
build script to build with those configs.

While we only introduce x86 configs initially, provision for non-x86
configs.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Doug Goldstein <cardoe@cardoe.com>
2018-11-08 16:40:20 +00:00
Wei Liu 17fbe6504d automation: introduce a new variable to control container user
Sometimes it is handy to create a container and play with its setup
manually as root.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Doug Goldstein <cardoe@cardoe.com>
2018-09-26 09:50:17 +01:00
Wei Liu 583037acab automation: specify -j$(nproc) in build script
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Doug Goldstein <cardoe@cardoe.com>
2018-09-07 08:39:10 +01:00
Doug Goldstein 5a5b8bfec3 automation: ensure created are not owned as root
By default the container runs as the root user and since the source tree
is bind mounted into the container, any file is created and owned by the
root user which harms ergonomics when working outside of the container
environment. This maps the root user within the container to the uid of
the user outside of the container so files are not owned by root.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
2018-08-03 16:11:22 +01:00
Doug Goldstein 92ff8f0979 automation: remove dead code from containerize
This is more dead code.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
2018-08-03 16:11:22 +01:00
Doug Goldstein f437ac101f automation: drop container name from containerize
This was something that existed for some scripting support for a totally
unrelated project and when I copied this script I failed to remove it so
this removes it. Build containers for Xen are best as ephemeral
environments and should just utilizes Docker's default container naming
behavior.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
2018-08-03 16:11:22 +01:00
Doug Goldstein 7d217430d6 automation: standardize containerize env names
Standardized all the environment variable names that the containerize
script uses to start with CONTAINER_

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
2018-08-03 16:11:18 +01:00