aboutsummaryrefslogtreecommitdiff
path: root/tests/docker
AgeCommit message (Collapse)Author
2020-01-06dockerfiles: add dbus-daemon to some of latest distributionsMarc-André Lureau
To get dbus-vmstate test covered. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-12-19docker: gtester is no longer usedPaolo Bonzini
We are using tap-driver.pl, do not require anymore gtester to be installed to run the testsuite in docker-based tests. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <1576632611-55032-1-git-send-email-pbonzini@redhat.com>
2019-12-17Remove libbluetooth / bluez from the CI testsThomas Huth
Since the bluetooth code has been removed, we don't need to test with this library anymore. Message-Id: <20191120091014.16883-5-thuth@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2019-12-09docker: remove libcap development packagesPaolo Bonzini
Libcap was dropped from virtio-9p (commit 7e46261368d1), so remove it from the dockerfiles as well. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: Alex Bennée <alex.bennee@linaro.org> [groug, mention SHA1 that dropped libcap] Signed-off-by: Greg Kurz <groug@kaod.org>
2019-10-25tests/docker: update Travis image to a more current versionAlex Bennée
This isn't the latest one available on hub.docker.com but it does match the ID reported by the Xenial builds running on Travis: instance: ... travis-ci-sardonyx-xenial-1553530528-f909ac5 Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-10-25tests/docker: set HOST_ARCH if we don't have ARCHAlex Bennée
As the docker rules want to be able to be run on a virgin unconfigured checkout add a fallback and use it if we need to. Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-10-04tests/docker: only enable ubsan for test-clangPaolo Bonzini
-fsanitize=undefined is not the same thing as --enable-sanitizers. After commit 47c823e ("tests/docker: add sanitizers back to clang build", 2019-09-11) test-clang is almost duplicating the asan (test-debug) test, so partly revert commit 47c823e5b while leaving ubsan enabled. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-10-04docker: test-debug: disable LeakSanitizerPaolo Bonzini
There are just too many leaks in device-introspect-test (especially for the plethora of arm and aarch64 boards) to make LeakSanitizer useful; disable it for now. Whoever is interested in debugging leaks can also use valgrind like this: QTEST_QEMU_BINARY=aarch64-softmmu/qemu-system-aarch64 \ QTEST_QEMU_IMG=qemu-img \ valgrind --trace-children=yes --leak-check=full \ tests/device-introspect-test -p /aarch64/device/introspect/concrete/defaults/none Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-09-26tests/docker: remove debian-powerpc-user-crossAlex Bennée
Despite our attempts in 4d26c7fef4 to keep this going it still gets in the way of "make docker-test-build" completing because of course we can't build a modern QEMU with the image. Let's put the thing out of its misery and remove it. People who really care about building on powerpc can still use the binfmt_misc support to manually build an image (or just run the build from pre this commit). Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2019-09-26docker: move tests from python2 to python3John Snow
As part of the push to drop python2 support, replace any explicit python2 dependencies with python3 versions. For centos, python2 still exists as an implicit dependency, but by adding python3 we will be able to build even if the configure script begins to require python 3.5+. Tested with centos7, fedora, ubuntu, ubuntu1804, and debian 9 (amd64). Tested under a custom configure script that requires Python 3.5+. the travis dockerfile is also moved to using python3, which was tested by running `make docker-test-build@travis`, which I hope is sufficient. Signed-off-by: John Snow <jsnow@redhat.com> Message-Id: <20190923181140.7235-7-jsnow@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Cleber Rosa <crosa@redhat.com> Tested-by: Cleber Rosa <crosa@redhat.com>
2019-09-26docker: remove unused debian-sidJohn Snow
debian-sid is listed as a partial image, so we cannot run tests against it. Since it isn't used by any other testable image, remove it for now as it is prone to bitrot. Signed-off-by: John Snow <jsnow@redhat.com> Message-Id: <20190923181140.7235-6-jsnow@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-09-26docker: remove unused debian-portsJohn Snow
debian-ports is listed as a partial image, so we cannot run tests against it. Since it isn't used by any other testable image, remove it for now as it is prone to bitrot. Signed-off-by: John Snow <jsnow@redhat.com> Message-Id: <20190923181140.7235-5-jsnow@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-09-26docker: remove 'deprecated' image definitionsJohn Snow
There isn't a debian.dockerfile anymore, so perform some ghost-busting. Signed-off-by: John Snow <jsnow@redhat.com> Message-Id: <20190923181140.7235-4-jsnow@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-09-26docker: remove unused debian8 partial imageJohn Snow
debian8 partial base is also not consumed by any image, so remove it. For QEMU's development cycle, we only support debian9 (stretch) and debian10 (buster). Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190923181140.7235-3-jsnow@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-09-26docker: remove debian8-mxe definitionsJohn Snow
We don't have a debian8-mxe dockerfile anymore. Fixes: 67bd36beda1ae Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190923181140.7235-2-jsnow@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-09-26podman: fix command invocationJohn Snow
Oops; there's no argv here. Signed-off-by: John Snow <jsnow@redhat.com> Message-Id: <20190913193821.17756-1-jsnow@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Cleber Rosa <crosa@redhat.com> Tested-by: Cleber Rosa <crosa@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Tested-by: Thomas Huth <thuth@redhat.com>
2019-09-26tests/docker: reduce scary warnings by cleaning up clean upAlex Bennée
There was in the clean-up code caused by attempting to inspect images which finished before we got there. Clean up the clean up code by: - only track the one instance at a time - use --filter for docker ps instead of doing it by hand - just call docker rm -f to be done with it - use uuid.uuid4() for a random uid Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
2019-09-26tests/docker: remove python2.7 from debian9-mxeJohn Snow
When it was based on debian8 which uses python-minimal, it needed this. It no longer does. Goodbye, python2.7. Signed-off-by: John Snow <jsnow@redhat.com> Message-Id: <20190918222546.11696-1-jsnow@redhat.com> [AJB: fixed up commit message] Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-09-26tests/docker: fix DOCKER_PARTIAL_IMAGESAlex Bennée
Finger trouble in a previous clean-up inadvertently set DEBIAN_PARTIAL_IMAGES instead of DOCKER_PARTIAL_IMAGES. Also fix the typo to debian-9-mxe. Fixes: 44d5a8bf5d2 Signed-off-by: John Snow <jsnow@redhat.com> [AJB: merged fix from Message-Id: <20190917185537.25417-1-jsnow@redhat.com>] Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Cleber Rosa <crosa@redhat.com>
2019-09-26tests/docker: add sanitizers back to clang buildJohn Snow
Fedora23 is but a distant twinkle. The sanitizer works again, and even if not, we have --enable-sanitizers now. Signed-off-by: John Snow <jsnow@redhat.com> Message-Id: <20190912014442.5757-1-jsnow@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-09-10tests/docker: --disable-libssh on ubuntu1804 buildsAlex Bennée
Currently this stops the mega: make docker-test-build from working. Once the source is patched to deal with the case this workaround can be removed. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-09-10tests/docker: add more images to PARTIAL_IMAGES when not on x86_64Alex Bennée
This prevents us trying to do builds which we can't complete. Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-09-10tests/docker: use --arch-only for installing depsAlex Bennée
The Debian QEMU packages require a bunch of cross compilers for building firmware which aren't available on all host architectures. Using --arch-only skips this particular requirement and allows us to install just the dependencies we need. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-09-10tests/docker: add debian-amd64-cross for non-x86 hostsAlex Bennée
When building on a non-x86 host we need to setup the x86 build like any other cross compiler. Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-09-10tests/docker: avoid $SHELL invoke bash directlyAlex Bennée
On some images SHELL is pointing at a limited /bin/sh which doesn't understand noprofile/norc. Given the run script is running bash just invoke it directly. This fixes: $ make docker-test-build@IMAGE DEBUG=1 [...] + echo ' ./test-build' ./test-build + echo '* Hit Ctrl-D to continue, or type '\''exit 1'\'' to abort' * Hit Ctrl-D to continue, or type 'exit 1' to abort + echo + /bin/sh --noprofile --norc /bin/sh: 0: Illegal option -- Fixes: 2b0c4fa13f3 Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-09-10tests/docker: add debian9-mxe to DEBIAN_PARTIAL_IMAGESAlex Bennée
Another image that can't be used directly to build QEMU. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-09-10tests/docker: add debian-xtensa-cross to DEBIAN_PARTIAL_IMAGESAlex Bennée
This should have been marked when the docker recipe was added to prevent it being used for cross compiling QEMU. Sort the DEBIAN_PARTIAL_IMAGE list while we are at it. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-09-10tests/docker: pin powerpc-user-cross to a snapshotAlex Bennée
Now Jessie has entered LTS the powerpc architecture has been dropped so we can no longer build the image from scratch. However we can use the snapshot archive to build the last working version. This now only lives on an example of setting up a user-cross image as at least on x86-64 we can use the Buster packaged cross compiler for building test images. Suggested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Cc: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-09-10tests/docker: update Debian Sid imageAlex Bennée
While we are not currently using it we might as well keep the image for later usage. So: - update to a more recent snapshot - clean up verbiage in commentary - remove duplicate shell from a merge failure Suggested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-09-10tests/docker: move our ppc64 cross compile to BusterAlex Bennée
Now Buster is released we can stop relying on the movable feast that is Sid for our cross-compiler for building tests. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-09-10tests/docker: move our riscv64 cross compile to BusterAlex Bennée
Now Buster is released we can stop relying on the movable feast that is Sid for our cross-compiler for building tests. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-09-10tests/docker: move our mips64 cross compile to BusterAlex Bennée
Now Buster is released we can stop relying on the movable feast that is Sid for our cross-compiler for building tests. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-09-10tests/docker: move our sh4 cross compile to BusterAlex Bennée
Now Buster is released we can stop relying on the movable feast that is Sid for our cross-compiler for building tests. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-09-10tests/docker: move our sparc64 cross compile to BusterAlex Bennée
Now Buster is released we can stop relying on the movable feast that is Sid for our cross-compiler for building tests. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-09-10tests/docker: move our m68k cross compile to BusterAlex Bennée
Now Buster is released we can stop relying on the movable feast that is Sid for our cross-compiler for building tests. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-09-10tests/docker: move our HPPA cross compile to BusterAlex Bennée
Now Buster is released we can stop relying on the movable feast that is Sid for our cross-compiler for building tests. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-09-10tests/docker: move our Alpha cross compile to BusterAlex Bennée
Now Buster is released we can stop relying on the movable feast that is Sid for our cross-compiler for building tests. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-09-10tests/docker: move our powerpc cross compile to BusterAlex Bennée
Now Buster is released we can stop relying on the movable feast that is Sid for our cross-compiler for building tests. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-09-10tests/docker: move our arm64 cross compile to BusterAlex Bennée
Now Buster is released we can unify our cross build images for both QEMU and tests. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-09-10tests/docker: add Buster to DOCKER_PARTIAL_IMAGESAlex Bennée
We need to add additional packages to the base images to be able to build QEMU so lets avoid building with it. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-09-10tests/docker: set DEF_TARGET_LIST for some containersAlex Bennée
You can assume the failures most people are interested in are the cross-compile failures that are specific to the cross compile target. Set DEF_TARGET_LIST based on what we use for shippable, the user can always override by calling with TARGET_LIST set. Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-09-10tests/docker: move DEF_TARGET_LIST setting to common.rcAlex Bennée
We might as well not repeat ourselves. At the same time allow it to be overridden which we will use later from docker targets. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-09-10tests/docker: fix final missing .encode when parsing solibsAlex Bennée
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-09-10tests/docker: handle missing encoding keyword for subprocess.check_outputAlex Bennée
This was only added in Python 3.6 and not all the build hosts have that recent a python3. However we still need to ensure everything is returns as a unicode string so checks higher up the call chain don't barf. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> fixup! tests/docker: handle missing encoding keyword for subprocess.check_output
2019-09-10tests/docker: fix "cc" command to work with podmanAlex Bennée
Podman requires a little bit of additional magic to the uid mapping which was already done for the normal RunCommand. We simplify the logic by pushing it directly into the Docker::run method to avoid instantiating an extra Docker() object and ensure the CC command always runs as the current user. Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-09-10tests/docker: Use --userns=keep-id for podmanJohn Snow
The workaround that attempts to accomplish the same result as --userns=keep-id does not appear to work well with UIDs much above 1000 (like mine, which is above 20000.) Since we have official support for this "trick" now, use the supported method. Signed-off-by: John Snow <jsnow@redhat.com> Message-Id: <20190904232451.26466-1-jsnow@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-09-10configure: clean-up container cross compile detectAlex Bennée
The introduction of podman support inadvertently broke configure's detect of the container support as the configure probe didn't specify an engine type. To fix this in docker.py: - only (re)set USE_ENGINE if --engine is specified - enhance the output so docker is no longer just yes In the configure script we can at least start cleaning up the detecting and naming of variables. To avoid too much churn the conversion of the various make DOCKER_foo variables has been left for future clean-ups. Fixes: 9459f754134b Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Tested-by: David Hildenbrand <david@redhat.com>
2019-09-02tests/docker: upgrade docker.py to python3Alex Bennée
The recent podman changes (9459f754134bb) imported enum which is part of the python3 standard library but only available as an external library for python2. This causes problems on the fairly restricted environment such as shippable. Lets bite the bullet and make the script a fully python3 one. To that end: - drop the from __future__ import (we are there now ;-) - avoid the StringIO import hack - be consistent with the mode we read/write dockerfiles - s/iteritems/items/ - ensure check_output returns strings for processing Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
2019-08-22tests/docker: add podman supportMarc-André Lureau
Allow to specify the container engine to run with ENGINE variable. By default, ENGINE=auto and will select either podman or docker. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-08-22docker.py: add podman supportMarc-André Lureau
Add a --engine option to select either docker, podman or auto. Among other advantages, podman allows to run rootless & daemonless containers, fortunately sharing compatible CLI with docker. With current podman, we have to use a uidmap trick in order to be able to rw-share the ccache directory with the container user. With a user 1000, the default mapping is: 1000 (host) -> 0 (container). So write access to /var/tmp/ccache ends will end with permission denied error. With "--uidmap 1000:0:1 --uidmap 0:1:1000", the mapping is: 1000 (host) -> 0 (container, 1st namespace) -> 1000 (container, 2nd namespace). (the rest is mumbo jumbo to avoid holes in the range of UIDs) A future podman version may have an option such as --userns-keep-uid. Thanks to Debarshi Ray <rishi@redhat.com> for the help! Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>