diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2019-01-14 19:28:12 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2019-01-14 19:28:12 +0000 |
commit | eb0667fe7f1b6d40dfb7172f17ab4db975acbbd6 (patch) | |
tree | b2852d4d3304a2a06bfe1fd01382e8a0c18af9c0 | |
parent | 89bd861c2b470e3fb45596945509079c72af3ac2 (diff) | |
parent | a36270a4d1589b1ed309065fc8b3fe0ac8d6869d (diff) |
Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-next-140119-1' into staging
A bunch of fixes for testing:
- Various Travis updates
- "stable" SID snapshot for docker
- avoid :latest docker tags
- g_usleep fix for some tests
# gpg: Signature made Mon 14 Jan 2019 14:59:35 GMT
# gpg: using RSA key FBD0DB095A9E2A44
# gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>"
# Primary key fingerprint: 6685 AE99 E751 67BC AFC8 DF35 FBD0 DB09 5A9E 2A44
* remotes/stsquad/tags/pull-testing-next-140119-1: (21 commits)
Revert "tests: Disable qht-bench parallel test when using gprof"
tests: use g_usleep instead of rem = sleep(time)
tests/docker: remove SID_AGE test hack
tests/docker: update our Travis image
travis: bump to Xenial baseline
docker: Use a stable snapshot for Debian Sid
travis: remove matrix settings that duplicate global settings
travis: run tests in verbose mode
travis: stop using container based envs
travis: stop redefining the script commands
travis: use homebrew addon for MacOSX
travis: don't clone git submodules upfront
travis: standardize the syntax used for env variables
travis: define all the build matrix entries in one place
travis: add whitespace between each major section & matrix entry
tests: use in-place sed magic for enabling deb-src in travis image
tests: update Fedora i386 cross image to Fedora 29
tests: update Fedora dockerfile to use Fedora 29
tests: remove obsolete 'debian' dockerfile
tests: run ldconfig after installing extra software
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | .travis.yml | 172 | ||||
-rwxr-xr-x | configure | 1 | ||||
-rw-r--r-- | tests/Makefile.include | 3 | ||||
-rw-r--r-- | tests/atomic64-bench.c | 6 | ||||
-rw-r--r-- | tests/atomic_add-bench.c | 6 | ||||
-rw-r--r-- | tests/docker/Makefile.include | 13 | ||||
-rw-r--r-- | tests/docker/dockerfiles/debian-amd64.docker | 5 | ||||
-rw-r--r-- | tests/docker/dockerfiles/debian-sid.docker | 7 | ||||
-rw-r--r-- | tests/docker/dockerfiles/debian.docker | 13 | ||||
-rw-r--r-- | tests/docker/dockerfiles/fedora-i386-cross.docker | 2 | ||||
-rw-r--r-- | tests/docker/dockerfiles/fedora.docker | 4 | ||||
-rw-r--r-- | tests/docker/dockerfiles/travis.docker | 4 | ||||
-rw-r--r-- | tests/qht-bench.c | 6 |
13 files changed, 138 insertions, 104 deletions
diff --git a/.travis.yml b/.travis.yml index d472fd650b..93fd0164a0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,13 @@ -# The current Travis default is a container based 14.04 Trust on EC2 +# The current Travis default is a VM based 16.04 Xenial on GCE # Additional builds with specific requirements for a full VM need to # be added as additional matrix: entries later on -sudo: false -dist: trusty +dist: xenial language: c -python: - - "2.6" compiler: - gcc cache: ccache + + addons: apt: packages: @@ -35,10 +34,17 @@ addons: - libssh2-1-dev - liburcu-dev - libusb-1.0-0-dev - - libvte-2.90-dev + - libvte-2.91-dev - sparse - uuid-dev - gcovr + homebrew: + packages: + - libffi + - gettext + - glib + - pixman + # The channel name "irc.oftc.net#qemu" is encrypted against qemu/qemu # to prevent IRC notifications from forks. This was created using: @@ -49,88 +55,145 @@ notifications: - secure: "F7GDRgjuOo5IUyRLqSkmDL7kvdU4UcH3Lm/W2db2JnDHTGCqgEdaYEYKciyCLZ57vOTsTsOgesN8iUT7hNHBd1KWKjZe9KDTZWppWRYVwAwQMzVeSOsbbU4tRoJ6Pp+3qhH1Z0eGYR9ZgKYAoTumDFgSAYRp4IscKS8jkoedOqM=" on_success: change on_failure: always + + env: global: - SRC_DIR="." - BUILD_DIR="." - - TEST_CMD="make check" - - MAKEFLAGS="-j3" - matrix: - - CONFIG="--disable-system" - - CONFIG="--disable-user" - - CONFIG="--enable-debug --enable-debug-tcg" - - CONFIG="--disable-linux-aio --disable-cap-ng --disable-attr --disable-brlapi --disable-uuid --disable-libusb --disable-user" - - CONFIG="--enable-modules --disable-linux-user" - - CONFIG="--with-coroutine=ucontext --disable-linux-user" - - CONFIG="--with-coroutine=sigaltstack --disable-linux-user" + - TEST_CMD="make check -j3 V=1" + + git: # we want to do this ourselves submodules: false -before_install: - - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update ; fi - - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install libffi gettext glib pixman ; fi - - git submodule update --init --recursive capstone dtc ui/keycodemapdb + + before_script: - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR} - ${SRC_DIR}/configure ${CONFIG} || { cat config.log && exit 1; } script: - - make ${MAKEFLAGS} && ${TEST_CMD} + - make -j3 && ${TEST_CMD} + + matrix: include: + - env: + - CONFIG="--disable-system" + + + - env: + - CONFIG="--disable-user" + + + - env: + - CONFIG="--enable-debug --enable-debug-tcg" + + + - env: + - CONFIG="--disable-linux-aio --disable-cap-ng --disable-attr --disable-brlapi --disable-uuid --disable-libusb --disable-user" + + + - env: + - CONFIG="--enable-modules --disable-linux-user" + + + - env: + - CONFIG="--with-coroutine=ucontext --disable-linux-user" + + + - env: + - CONFIG="--with-coroutine=sigaltstack --disable-linux-user" + + # Test out-of-tree builds - - env: CONFIG="--enable-debug --enable-debug-tcg" - BUILD_DIR="out-of-tree/build/dir" SRC_DIR="../../.." + - env: + - CONFIG="--enable-debug --enable-debug-tcg" + - BUILD_DIR="out-of-tree/build/dir" SRC_DIR="../../.." + + # Test with Clang for compile portability (Travis uses clang-5.0) - - env: CONFIG="--disable-system" + - env: + - CONFIG="--disable-system" compiler: clang - - env: CONFIG="--disable-user" + + + - env: + - CONFIG="--disable-user" compiler: clang + + # gprof/gcov are GCC features - - env: CONFIG="--enable-gprof --enable-gcov --disable-pie --target-list=aarch64-softmmu,arm-softmmu,i386-softmmu,mips-softmmu,mips64-softmmu,ppc64-softmmu,riscv64-softmmu,s390x-softmmu,x86_64-softmmu" + - env: + - CONFIG="--enable-gprof --enable-gcov --disable-pie --target-list=aarch64-softmmu,arm-softmmu,i386-softmmu,mips-softmmu,mips64-softmmu,ppc64-softmmu,riscv64-softmmu,s390x-softmmu,x86_64-softmmu" after_success: - ${SRC_DIR}/scripts/travis/coverage-summary.sh - compiler: gcc + + # We manually include builds which we disable "make check" for - - env: CONFIG="--enable-debug --enable-tcg-interpreter" - TEST_CMD="" - compiler: gcc + - env: + - CONFIG="--enable-debug --enable-tcg-interpreter" + - TEST_CMD="" + + # We don't need to exercise every backend with every front-end - - env: CONFIG="--enable-trace-backends=log,simple,syslog --disable-system" - TEST_CMD="" - compiler: gcc - - env: CONFIG="--enable-trace-backends=ftrace --target-list=x86_64-softmmu" - TEST_CMD="" - compiler: gcc - - env: CONFIG="--enable-trace-backends=ust --target-list=x86_64-softmmu" - TEST_CMD="" - compiler: gcc - - env: CONFIG="--disable-tcg" - TEST_CMD="" - compiler: gcc + - env: + - CONFIG="--enable-trace-backends=log,simple,syslog --disable-system" + - TEST_CMD="" + + + - env: + - CONFIG="--enable-trace-backends=ftrace --target-list=x86_64-softmmu" + - TEST_CMD="" + + + - env: + - CONFIG="--enable-trace-backends=ust --target-list=x86_64-softmmu" + - TEST_CMD="" + + + - env: + - CONFIG="--disable-tcg" + - TEST_CMD="" + + # MacOSX builds - - env: CONFIG="--target-list=aarch64-softmmu,arm-softmmu,i386-softmmu,mips-softmmu,mips64-softmmu,ppc64-softmmu,riscv64-softmmu,s390x-softmmu,x86_64-softmmu" + - env: + - CONFIG="--target-list=aarch64-softmmu,arm-softmmu,i386-softmmu,mips-softmmu,mips64-softmmu,ppc64-softmmu,riscv64-softmmu,s390x-softmmu,x86_64-softmmu" os: osx osx_image: xcode9.4 compiler: clang - - env: CONFIG="--target-list=i386-softmmu,ppc-softmmu,ppc64-softmmu,m68k-softmmu,x86_64-softmmu" + + + - env: + - CONFIG="--target-list=i386-softmmu,ppc-softmmu,ppc64-softmmu,m68k-softmmu,x86_64-softmmu" os: osx osx_image: xcode10 compiler: clang + + # Python builds - - env: CONFIG="--target-list=x86_64-softmmu" + - env: + - CONFIG="--target-list=x86_64-softmmu" python: - "3.0" - - env: CONFIG="--target-list=x86_64-softmmu" + + + - env: + - CONFIG="--target-list=x86_64-softmmu" python: - "3.6" + + # Acceptance (Functional) tests - - env: CONFIG="--python=/usr/bin/python3 --target-list=x86_64-softmmu" - TEST_CMD="make AVOCADO_SHOW=app check-acceptance" + - env: + - CONFIG="--python=/usr/bin/python3 --target-list=x86_64-softmmu" + - TEST_CMD="make AVOCADO_SHOW=app check-acceptance" addons: apt: packages: - python3-pip - - python3.4-venv + - python3.5-venv # Using newer GCC with sanitizers - addons: apt: @@ -164,7 +227,7 @@ matrix: - libssh2-1-dev - liburcu-dev - libusb-1.0-0-dev - - libvte-2.90-dev + - libvte-2.91-dev - sparse - uuid-dev language: generic @@ -175,11 +238,8 @@ matrix: - TEST_CMD="" before_script: - ./configure ${CONFIG} --extra-cflags="-g3 -O0 -fsanitize=thread -fuse-ld=gold" || { cat config.log && exit 1; } + + - env: - CONFIG="--disable-system --disable-docs" - - TEST_CMD="make check-tcg" - script: - - make ${MAKEFLAGS} && ${TEST_CMD} ${MAKEFLAGS} - sudo: required - dist: trusty - compiler: gcc + - TEST_CMD="make -j3 check-tcg V=1" @@ -7470,7 +7470,6 @@ alpha) esac if test "$gprof" = "yes" ; then - echo "CONFIG_GPROF=y" >> $config_host_mak echo "TARGET_GPROF=y" >> $config_target_mak if test "$target_linux_user" = "yes" ; then cflags="-p $cflags" diff --git a/tests/Makefile.include b/tests/Makefile.include index 601ef4f64c..f403a6571d 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -88,8 +88,7 @@ check-unit-y += tests/test-rcu-simpleq$(EXESUF) check-unit-y += tests/test-rcu-tailq$(EXESUF) check-unit-y += tests/test-qdist$(EXESUF) check-unit-y += tests/test-qht$(EXESUF) -# FIXME: {test-qht-par + gprof} often break on Travis CI -check-unit-$(call lnot,$(CONFIG_GPROF)) += tests/test-qht-par$(EXESUF) +check-unit-y += tests/test-qht-par$(EXESUF) check-unit-y += tests/test-bitops$(EXESUF) check-unit-y += tests/test-bitcnt$(EXESUF) check-unit-y += tests/test-qdev-global-props$(EXESUF) diff --git a/tests/atomic64-bench.c b/tests/atomic64-bench.c index 71692560ed..121a8c14f4 100644 --- a/tests/atomic64-bench.c +++ b/tests/atomic64-bench.c @@ -74,16 +74,14 @@ static void *thread_func(void *arg) static void run_test(void) { - unsigned int remaining; unsigned int i; while (atomic_read(&n_ready_threads) != n_threads) { cpu_relax(); } + atomic_set(&test_start, true); - do { - remaining = sleep(duration); - } while (remaining); + g_usleep(duration * G_USEC_PER_SEC); atomic_set(&test_stop, true); for (i = 0; i < n_threads; i++) { diff --git a/tests/atomic_add-bench.c b/tests/atomic_add-bench.c index 2f6c72f63a..5666f6bbff 100644 --- a/tests/atomic_add-bench.c +++ b/tests/atomic_add-bench.c @@ -76,16 +76,14 @@ static void *thread_func(void *arg) static void run_test(void) { - unsigned int remaining; unsigned int i; while (atomic_read(&n_ready_threads) != n_threads) { cpu_relax(); } + atomic_set(&test_start, true); - do { - remaining = sleep(duration); - } while (remaining); + g_usleep(duration * G_USEC_PER_SEC); atomic_set(&test_stop, true); for (i = 0; i < n_threads; i++) { diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 9467e9d088..7032c68895 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -98,19 +98,6 @@ docker-image-debian-s390x-cross: docker-image-debian9 docker-image-debian-win32-cross: docker-image-debian8-mxe docker-image-debian-win64-cross: docker-image-debian8-mxe -# Debian SID images - we are tracking a rolling distro so we want to -# force a re-build of the base image if we ever need to build one of -# its children. -ifndef SKIP_DOCKER_BUILD -ifeq ($(HAVE_USER_DOCKER),y) -SID_AGE=$(shell $(DOCKER_SCRIPT) check --checktype=age --olderthan=180 --quiet qemu:debian-sid) -ifeq ($(SID_AGE),) -else -docker-image-debian-sid: NOCACHE=1 -endif -endif -endif - docker-image-debian-alpha-cross: docker-image-debian-sid docker-image-debian-hppa-cross: docker-image-debian-sid docker-image-debian-m68k-cross: docker-image-debian-sid diff --git a/tests/docker/dockerfiles/debian-amd64.docker b/tests/docker/dockerfiles/debian-amd64.docker index 24b113b76f..954fcf9606 100644 --- a/tests/docker/dockerfiles/debian-amd64.docker +++ b/tests/docker/dockerfiles/debian-amd64.docker @@ -24,7 +24,8 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \ libegl1-mesa-dev \ libepoxy-dev \ libgbm-dev -RUN git clone https://anongit.freedesktop.org/git/virglrenderer.git /usr/src/virglrenderer +RUN git clone https://anongit.freedesktop.org/git/virglrenderer.git /usr/src/virglrenderer && \ + cd /usr/src/virglrenderer && git checkout virglrenderer-0.7.0 RUN cd /usr/src/virglrenderer && ./autogen.sh && ./configure --with-glx --disable-tests && make install # netmap @@ -35,5 +36,7 @@ RUN git clone https://github.com/luigirizzo/netmap.git /usr/src/netmap RUN cd /usr/src/netmap/LINUX && ./configure --no-drivers --no-apps --kernel-dir=$(ls -d /usr/src/linux-headers-*-amd64) && make install ENV QEMU_CONFIGURE_OPTS --enable-netmap +RUN ldconfig + # gcrypt ENV QEMU_CONFIGURE_OPTS $QEMU_CONFIGURE_OPTS --enable-gcrypt diff --git a/tests/docker/dockerfiles/debian-sid.docker b/tests/docker/dockerfiles/debian-sid.docker index 4e4cda0ba5..676941cb32 100644 --- a/tests/docker/dockerfiles/debian-sid.docker +++ b/tests/docker/dockerfiles/debian-sid.docker @@ -11,7 +11,12 @@ # updated and trigger a re-build. # -FROM debian:sid-slim +# This must be earlier than the snapshot date we are aiming for +FROM debian:sid-20181011-slim + +# Use a snapshot known to work (see http://snapshot.debian.org/#Usage) +ENV DEBIAN_SNAPSHOT_DATE "20181030" +RUN sed -i "s%^deb \(https\?://\)deb.debian.org/debian/\? \(.*\)%deb [check-valid-until=no] \1snapshot.debian.org/archive/debian/${DEBIAN_SNAPSHOT_DATE} \2%" /etc/apt/sources.list # Use a snapshot known to work (see http://snapshot.debian.org/#Usage) ENV DEBIAN_SNAPSHOT_DATE "20181030" diff --git a/tests/docker/dockerfiles/debian.docker b/tests/docker/dockerfiles/debian.docker deleted file mode 100644 index fd32e71b79..0000000000 --- a/tests/docker/dockerfiles/debian.docker +++ /dev/null @@ -1,13 +0,0 @@ -# This template is deprecated and was previously based on Jessie on QEMU 2.9. -# Now than Stretch is out, please use qemu:debian8 as base for Jessie, -# and qemu:debian9 for Stretch. -# -FROM qemu:debian9 - -MAINTAINER Philippe Mathieu-Daudé <f4bug@amsat.org> - -RUN for n in $(seq 8); do echo; done && \ - echo "\n\t\tThis image is deprecated." && echo && \ - echo "\tUse 'FROM qemu:debian9' to use the stable Debian Stretch image" && \ - echo "\tor 'FROM qemu:debian8' to use old Debian Jessie." && \ - for n in $(seq 8); do echo; done diff --git a/tests/docker/dockerfiles/fedora-i386-cross.docker b/tests/docker/dockerfiles/fedora-i386-cross.docker index a4fd895b07..eb8108d118 100644 --- a/tests/docker/dockerfiles/fedora-i386-cross.docker +++ b/tests/docker/dockerfiles/fedora-i386-cross.docker @@ -1,4 +1,4 @@ -FROM fedora:latest +FROM fedora:29 ENV PACKAGES \ gcc \ glib2-devel.i686 \ diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker index 1d0e3dc4ec..69d4a7f5d7 100644 --- a/tests/docker/dockerfiles/fedora.docker +++ b/tests/docker/dockerfiles/fedora.docker @@ -1,4 +1,4 @@ -FROM fedora:28 +FROM fedora:29 ENV PACKAGES \ bc \ bison \ @@ -82,7 +82,7 @@ ENV PACKAGES \ tar \ usbredir-devel \ virglrenderer-devel \ - vte3-devel \ + vte291-devel \ which \ xen-devel \ zlib-devel diff --git a/tests/docker/dockerfiles/travis.docker b/tests/docker/dockerfiles/travis.docker index 03ebfb0ef2..e72dc85ca7 100644 --- a/tests/docker/dockerfiles/travis.docker +++ b/tests/docker/dockerfiles/travis.docker @@ -1,8 +1,8 @@ -FROM travisci/ci-garnet:packer-1512502276-986baf0 +FROM travisci/ci-sardonyx:packer-1546978056-2c98a19 ENV DEBIAN_FRONTEND noninteractive ENV LANG en_US.UTF-8 ENV LC_ALL en_US.UTF-8 -RUN cat /etc/apt/sources.list | sed "s/# deb-src/deb-src/" >> /etc/apt/sources.list +RUN sed -i "s/# deb-src/deb-src/" /etc/apt/sources.list RUN apt-get update RUN apt-get -y build-dep qemu RUN apt-get -y install device-tree-compiler python2.7 python-yaml dh-autoreconf gdb strace lsof net-tools gcovr diff --git a/tests/qht-bench.c b/tests/qht-bench.c index ab4e708180..e3b512f26f 100644 --- a/tests/qht-bench.c +++ b/tests/qht-bench.c @@ -398,16 +398,14 @@ static void pr_stats(void) static void run_test(void) { - unsigned int remaining; int i; while (atomic_read(&n_ready_threads) != n_rw_threads + n_rz_threads) { cpu_relax(); } + atomic_set(&test_start, true); - do { - remaining = sleep(duration); - } while (remaining); + g_usleep(duration * G_USEC_PER_SEC); atomic_set(&test_stop, true); for (i = 0; i < n_rw_threads; i++) { |