diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2021-01-06 15:55:29 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2021-01-06 15:55:29 +0000 |
commit | aadac5b3d9fdce28030495f80fc76a4336e97328 (patch) | |
tree | 4ddddf4811bb9e9bb8aecdba57f6bf3730e3a790 /tests | |
parent | 30918661c17f90ae25a559a91603142f2bcfa34b (diff) | |
parent | c8b2b7fed9850356f5d88bc7da2f1cefe57289bf (diff) | |
download | qemu-aadac5b3d9fdce28030495f80fc76a4336e97328.zip qemu-aadac5b3d9fdce28030495f80fc76a4336e97328.tar.gz qemu-aadac5b3d9fdce28030495f80fc76a4336e97328.tar.bz2 |
Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging
From Alex's pull request:
* improve cross-build KVM coverage
* new --without-default-features configure flag
* add __repr__ for ConsoleSocket for debugging
* build tcg tests with -Werror
* test 32 bit builds with fedora
* remove last traces of debian9
* hotfix for centos8 powertools repo
* Move lots of feature detection code to meson (Alex, myself)
* CFI and LTO support (Daniele)
* test-char dangling pointer (Eduardo)
* Build system and win32 fixes (Marc-André)
* Initialization fixes (myself)
* TCG include cleanup (Richard, myself)
* x86 'int N' fix (Peter)
# gpg: Signature made Wed 06 Jan 2021 09:21:25 GMT
# gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg: issuer "pbonzini@redhat.com"
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full]
# gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full]
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1
# Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83
* remotes/bonzini-gitlab/tags/for-upstream: (52 commits)
win32: drop fd registration to the main-loop on setting non-block
configure: move tests/qemu-iotests/common.env generation to meson
meson.build: convert --with-default-devices to meson
libattr: convert to meson
cap_ng: convert to meson
virtfs: convert to meson
seccomp: convert to meson
zstd: convert to meson
lzfse: convert to meson
snappy: convert to meson
lzo: convert to meson
rbd: convert to meson
libnfs: convert to meson
libiscsi: convert to meson
bzip2: convert to meson
glusterfs: convert to meson
curl: convert to meson
curl: remove compatibility code, require 7.29.0
brlapi: convert to meson
configure: remove CONFIG_FILEVERSION and CONFIG_PRODUCTVERSION
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
# Conflicts:
# trace/meson.build
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/check-block.sh | 18 | ||||
-rw-r--r-- | tests/docker/Makefile.include | 6 | ||||
-rw-r--r-- | tests/docker/dockerfiles/centos8.docker | 5 | ||||
-rw-r--r-- | tests/docker/dockerfiles/fedora-i386-cross.docker | 18 | ||||
-rw-r--r-- | tests/qemu-iotests/common.env.in | 3 | ||||
-rw-r--r-- | tests/qemu-iotests/meson.build | 3 | ||||
-rw-r--r-- | tests/tcg/Makefile.target | 2 | ||||
-rw-r--r-- | tests/test-char.c | 2 |
8 files changed, 38 insertions, 19 deletions
diff --git a/tests/check-block.sh b/tests/check-block.sh index f6b1bda..fb4c1ba 100755 --- a/tests/check-block.sh +++ b/tests/check-block.sh @@ -21,14 +21,18 @@ if grep -q "CONFIG_GPROF=y" config-host.mak 2>/dev/null ; then exit 0 fi -# Disable tests with any sanitizer except for SafeStack -CFLAGS=$( grep "CFLAGS.*-fsanitize" config-host.mak 2>/dev/null ) -SANITIZE_FLAGS="" -#Remove all occurrencies of -fsanitize=safe-stack -for i in ${CFLAGS}; do - if [ "${i}" != "-fsanitize=safe-stack" ]; then - SANITIZE_FLAGS="${SANITIZE_FLAGS} ${i}" +# Disable tests with any sanitizer except for specific ones +SANITIZE_FLAGS=$( grep "CFLAGS.*-fsanitize" config-host.mak 2>/dev/null ) +ALLOWED_SANITIZE_FLAGS="safe-stack cfi-icall" +#Remove all occurrencies of allowed Sanitize flags +for j in ${ALLOWED_SANITIZE_FLAGS}; do + TMP_FLAGS=${SANITIZE_FLAGS} + SANITIZE_FLAGS="" + for i in ${TMP_FLAGS}; do + if ! echo ${i} | grep -q "${j}" 2>/dev/null; then + SANITIZE_FLAGS="${SANITIZE_FLAGS} ${i}" fi + done done if echo ${SANITIZE_FLAGS} | grep -q "\-fsanitize" 2>/dev/null; then # Have a sanitize flag that is not allowed, stop diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 02ec928..c254ac3 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -11,8 +11,7 @@ HOST_ARCH = $(if $(ARCH),$(ARCH),$(shell uname -m)) DOCKER_SUFFIX := .docker DOCKER_FILES_DIR := $(SRC_PATH)/tests/docker/dockerfiles # we don't run tests on intermediate images (used as base by another image) -DOCKER_PARTIAL_IMAGES := debian9 debian10 debian11 -DOCKER_PARTIAL_IMAGES += debian9-mxe debian-bootstrap +DOCKER_PARTIAL_IMAGES := debian10 debian11 debian-bootstrap DOCKER_IMAGES := $(sort $(notdir $(basename $(wildcard $(DOCKER_FILES_DIR)/*.docker)))) DOCKER_TARGETS := $(patsubst %,docker-image-%,$(DOCKER_IMAGES)) # Use a global constant ccache directory to speed up repetitive builds @@ -96,7 +95,6 @@ docker-binfmt-image-debian-%: $(DOCKER_FILES_DIR)/debian-bootstrap.docker endif # Enforce dependencies for composite images -docker-image-debian9-mxe: docker-image-debian9 ifeq ($(HOST_ARCH),x86_64) docker-image-debian-amd64: docker-image-debian10 DOCKER_PARTIAL_IMAGES += debian-amd64-cross @@ -104,8 +102,6 @@ else docker-image-debian-amd64-cross: docker-image-debian10 DOCKER_PARTIAL_IMAGES += debian-amd64 endif -docker-image-debian-win32-cross: docker-image-debian9-mxe -docker-image-debian-win64-cross: docker-image-debian9-mxe # For non-x86 hosts not all cross-compilers have been packaged ifneq ($(HOST_ARCH),x86_64) diff --git a/tests/docker/dockerfiles/centos8.docker b/tests/docker/dockerfiles/centos8.docker index 54bc6d5..64cb7a6 100644 --- a/tests/docker/dockerfiles/centos8.docker +++ b/tests/docker/dockerfiles/centos8.docker @@ -1,4 +1,4 @@ -FROM centos:8.1.1911 +FROM centos:8.3.2011 RUN dnf -y update ENV PACKAGES \ @@ -6,6 +6,7 @@ ENV PACKAGES \ bzip2 \ bzip2-devel \ dbus-daemon \ + diffutils \ gcc \ gcc-c++ \ genisoimage \ @@ -31,6 +32,6 @@ ENV PACKAGES \ zlib-devel RUN dnf install -y dnf-plugins-core && \ - dnf config-manager --set-enabled PowerTools && \ + dnf config-manager --set-enabled powertools && \ dnf install -y $PACKAGES RUN rpm -q $PACKAGES | sort > /packages.txt diff --git a/tests/docker/dockerfiles/fedora-i386-cross.docker b/tests/docker/dockerfiles/fedora-i386-cross.docker index cd16cd1..a6e4112 100644 --- a/tests/docker/dockerfiles/fedora-i386-cross.docker +++ b/tests/docker/dockerfiles/fedora-i386-cross.docker @@ -1,14 +1,26 @@ -FROM fedora:30 +FROM fedora:31 ENV PACKAGES \ + bzip2 \ + diffutils \ + findutils \ gcc \ + git \ + libtasn1-devel.i686 \ + libzstd-devel.i686 \ + make \ + meson \ + ninja-build \ glib2-devel.i686 \ glibc-devel.i686 \ glibc-static.i686 \ gnutls-devel.i686 \ nettle-devel.i686 \ + perl-Test-Harness \ pixman-devel.i686 \ - zlib-devel.i686 \ - libzstd-devel.i686 + zlib-devel.i686 + +ENV QEMU_CONFIGURE_OPTS --extra-cflags=-m32 --disable-vhost-user +ENV PKG_CONFIG_PATH /usr/lib/pkgconfig RUN dnf install -y $PACKAGES RUN rpm -q $PACKAGES | sort > /packages.txt diff --git a/tests/qemu-iotests/common.env.in b/tests/qemu-iotests/common.env.in new file mode 100644 index 0000000..e565cdf --- /dev/null +++ b/tests/qemu-iotests/common.env.in @@ -0,0 +1,3 @@ +# Automatically generated by configure - do not modify + +export PYTHON='@PYTHON@' diff --git a/tests/qemu-iotests/meson.build b/tests/qemu-iotests/meson.build index 67aed1e..26658ce 100644 --- a/tests/qemu-iotests/meson.build +++ b/tests/qemu-iotests/meson.build @@ -3,3 +3,6 @@ if 'CONFIG_LINUX' in config_host else socket_scm_helper = [] endif +configure_file(output: 'common.env', + input: files('common.env.in'), + configuration: {'PYTHON': python.full_path()}) diff --git a/tests/tcg/Makefile.target b/tests/tcg/Makefile.target index 2ae8677..24d75a5 100644 --- a/tests/tcg/Makefile.target +++ b/tests/tcg/Makefile.target @@ -94,7 +94,7 @@ ifdef CONFIG_USER_ONLY -include $(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.target # Add the common build options -CFLAGS+=-Wall -O0 -g -fno-strict-aliasing +CFLAGS+=-Wall -Werror -O0 -g -fno-strict-aliasing ifeq ($(BUILD_STATIC),y) LDFLAGS+=-static endif diff --git a/tests/test-char.c b/tests/test-char.c index 953e0d1..0610297 100644 --- a/tests/test-char.c +++ b/tests/test-char.c @@ -1298,7 +1298,7 @@ static void char_file_test_internal(Chardev *ext_chr, const char *filepath) g_assert(strncmp(contents, "hello!", 6) == 0); if (!ext_chr) { - object_unref(OBJECT(chr)); + object_unparent(OBJECT(chr)); g_unlink(out); } g_free(contents); |