From 37b6fd6658ff79dd8e3ef0d3bc0d13866d077b53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Mon, 7 Dec 2020 14:14:59 +0100 Subject: [PATCH 01/13] gitlab-ci: Document 'build-tcg-disabled' is a KVM X86 job MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Document what this job cover (build X86 targets with KVM being the single accelerator available). Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20201207131503.3858889-2-philmd@redhat.com> Signed-off-by: Thomas Huth --- .gitlab-ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d0173e82b1..ee31b1020f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -220,6 +220,11 @@ build-disabled: s390x-softmmu i386-linux-user MAKE_CHECK_ARGS: check-qtest SPEED=slow +# This jobs explicitly disable TCG (--disable-tcg), KVM is detected by +# the configure script. The container doesn't contain Xen headers so +# Xen accelerator is not detected / selected. As result it build the +# i386-softmmu and x86_64-softmmu with KVM being the single accelerator +# available. build-tcg-disabled: <<: *native_build_job_definition variables: From b62ea746487a15813575873e1cb93631671c8b03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Mon, 7 Dec 2020 14:15:00 +0100 Subject: [PATCH 02/13] gitlab-ci: Replace YAML anchors by extends (cross_system_build_job) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 'extends' is an alternative to using YAML anchors and is a little more flexible and readable. See: https://docs.gitlab.com/ee/ci/yaml/#extends More importantly it allows exploding YAML jobs. Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20201207131503.3858889-3-philmd@redhat.com> Signed-off-by: Thomas Huth --- .gitlab-ci.d/crossbuilds.yml | 40 ++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.gitlab-ci.d/crossbuilds.yml b/.gitlab-ci.d/crossbuilds.yml index 03ebfabb3f..099949aaef 100644 --- a/.gitlab-ci.d/crossbuilds.yml +++ b/.gitlab-ci.d/crossbuilds.yml @@ -1,5 +1,5 @@ -.cross_system_build_job_template: &cross_system_build_job_definition +.cross_system_build_job: stage: build image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest timeout: 80m @@ -13,7 +13,7 @@ xtensa-softmmu" - make -j$(expr $(nproc) + 1) all check-build -.cross_user_build_job_template: &cross_user_build_job_definition +.cross_user_build_job: stage: build image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest script: @@ -24,91 +24,91 @@ - make -j$(expr $(nproc) + 1) all check-build cross-armel-system: - <<: *cross_system_build_job_definition + extends: .cross_system_build_job variables: IMAGE: debian-armel-cross cross-armel-user: - <<: *cross_user_build_job_definition + extends: .cross_user_build_job variables: IMAGE: debian-armel-cross cross-armhf-system: - <<: *cross_system_build_job_definition + extends: .cross_system_build_job variables: IMAGE: debian-armhf-cross cross-armhf-user: - <<: *cross_user_build_job_definition + extends: .cross_user_build_job variables: IMAGE: debian-armhf-cross cross-arm64-system: - <<: *cross_system_build_job_definition + extends: .cross_system_build_job variables: IMAGE: debian-arm64-cross cross-arm64-user: - <<: *cross_user_build_job_definition + extends: .cross_user_build_job variables: IMAGE: debian-arm64-cross cross-mips-system: - <<: *cross_system_build_job_definition + extends: .cross_system_build_job variables: IMAGE: debian-mips-cross cross-mips-user: - <<: *cross_user_build_job_definition + extends: .cross_user_build_job variables: IMAGE: debian-mips-cross cross-mipsel-system: - <<: *cross_system_build_job_definition + extends: .cross_system_build_job variables: IMAGE: debian-mipsel-cross cross-mipsel-user: - <<: *cross_user_build_job_definition + extends: .cross_user_build_job variables: IMAGE: debian-mipsel-cross cross-mips64el-system: - <<: *cross_system_build_job_definition + extends: .cross_system_build_job variables: IMAGE: debian-mips64el-cross cross-mips64el-user: - <<: *cross_user_build_job_definition + extends: .cross_user_build_job variables: IMAGE: debian-mips64el-cross cross-ppc64el-system: - <<: *cross_system_build_job_definition + extends: .cross_system_build_job variables: IMAGE: debian-ppc64el-cross cross-ppc64el-user: - <<: *cross_user_build_job_definition + extends: .cross_user_build_job variables: IMAGE: debian-ppc64el-cross cross-s390x-system: - <<: *cross_system_build_job_definition + extends: .cross_system_build_job variables: IMAGE: debian-s390x-cross cross-s390x-user: - <<: *cross_user_build_job_definition + extends: .cross_user_build_job variables: IMAGE: debian-s390x-cross cross-win32-system: - <<: *cross_system_build_job_definition + extends: .cross_system_build_job variables: IMAGE: fedora-win32-cross cross-win64-system: - <<: *cross_system_build_job_definition + extends: .cross_system_build_job variables: IMAGE: fedora-win64-cross From 0cdd3b0aa4186cad81f316a9d48968f0baf84b2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Mon, 7 Dec 2020 14:15:01 +0100 Subject: [PATCH 03/13] gitlab-ci: Introduce 'cross_accel_build_job' template MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Introduce a job template to cross-build accelerator specific jobs (enable a specific accelerator, disabling the others). The specific accelerator is selected by the $ACCEL environment variable (default to KVM). Extra options such disabling other accelerators are passed via the $ACCEL_CONFIGURE_OPTS environment variable. Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20201207131503.3858889-4-philmd@redhat.com> Signed-off-by: Thomas Huth --- .gitlab-ci.d/crossbuilds.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.gitlab-ci.d/crossbuilds.yml b/.gitlab-ci.d/crossbuilds.yml index 099949aaef..b59516301f 100644 --- a/.gitlab-ci.d/crossbuilds.yml +++ b/.gitlab-ci.d/crossbuilds.yml @@ -13,6 +13,23 @@ xtensa-softmmu" - make -j$(expr $(nproc) + 1) all check-build +# Job to cross-build specific accelerators. +# +# Set the $ACCEL variable to select the specific accelerator (default to +# KVM), and set extra options (such disabling other accelerators) via the +# $ACCEL_CONFIGURE_OPTS variable. +.cross_accel_build_job: + stage: build + image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest + timeout: 30m + script: + - mkdir build + - cd build + - PKG_CONFIG_PATH=$PKG_CONFIG_PATH + ../configure --enable-werror $QEMU_CONFIGURE_OPTS --disable-tools + --enable-${ACCEL:-kvm} $ACCEL_CONFIGURE_OPTS + - make -j$(expr $(nproc) + 1) all check-build + .cross_user_build_job: stage: build image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest From b16999a32c1ac6b99b1ab1e4183cfb7972e13bf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Mon, 7 Dec 2020 14:15:02 +0100 Subject: [PATCH 04/13] gitlab-ci: Add KVM s390x cross-build jobs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cross-build s390x target with only KVM accelerator enabled. Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20201207131503.3858889-5-philmd@redhat.com> Signed-off-by: Thomas Huth --- .gitlab-ci.d/crossbuilds.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.d/crossbuilds.yml b/.gitlab-ci.d/crossbuilds.yml index b59516301f..51896bbc9f 100644 --- a/.gitlab-ci.d/crossbuilds.yml +++ b/.gitlab-ci.d/crossbuilds.yml @@ -1,4 +1,3 @@ - .cross_system_build_job: stage: build image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest @@ -120,6 +119,12 @@ cross-s390x-user: variables: IMAGE: debian-s390x-cross +cross-s390x-kvm-only: + extends: .cross_accel_build_job + variables: + IMAGE: debian-s390x-cross + ACCEL_CONFIGURE_OPTS: --disable-tcg + cross-win32-system: extends: .cross_system_build_job variables: From 84eda1107920c92eaae74510760d5c975ba895d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Mon, 7 Dec 2020 14:15:03 +0100 Subject: [PATCH 05/13] gitlab-ci: Add Xen cross-build jobs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cross-build ARM and X86 targets with only Xen accelerator enabled. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20201207131503.3858889-6-philmd@redhat.com> Reviewed-by: Thomas Huth Signed-off-by: Thomas Huth --- .gitlab-ci.d/crossbuilds.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.gitlab-ci.d/crossbuilds.yml b/.gitlab-ci.d/crossbuilds.yml index 51896bbc9f..bd6473a75a 100644 --- a/.gitlab-ci.d/crossbuilds.yml +++ b/.gitlab-ci.d/crossbuilds.yml @@ -134,3 +134,17 @@ cross-win64-system: extends: .cross_system_build_job variables: IMAGE: fedora-win64-cross + +cross-amd64-xen-only: + extends: .cross_accel_build_job + variables: + IMAGE: debian-amd64-cross + ACCEL: xen + ACCEL_CONFIGURE_OPTS: --disable-tcg --disable-kvm + +cross-arm64-xen-only: + extends: .cross_accel_build_job + variables: + IMAGE: debian-arm64-cross + ACCEL: xen + ACCEL_CONFIGURE_OPTS: --disable-tcg --disable-kvm From 43d1da7cb99ea66008583f531b584235d36fd0a3 Mon Sep 17 00:00:00 2001 From: Alex Chen Date: Wed, 25 Nov 2020 10:24:03 +0000 Subject: [PATCH 06/13] test-qga: fix a resource leak in test_qga_guest_get_osinfo() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The fixture->fd is created in fixture_setup() and, likewise, needs to be closed in fixture_tear_down(). Reported-by: Euler Robot Signed-off-by: Alex Chen Reviewed-by: Li Qiang Reviewed-by: Marc-André Lureau Message-Id: <20201125102403.57709-1-alex.chen@huawei.com> Signed-off-by: Thomas Huth --- tests/test-qga.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test-qga.c b/tests/test-qga.c index c1b173b3cb..eb33264e8e 100644 --- a/tests/test-qga.c +++ b/tests/test-qga.c @@ -111,6 +111,7 @@ fixture_tear_down(TestFixture *fixture, gconstpointer data) g_rmdir(fixture->test_dir); g_free(fixture->test_dir); + close(fixture->fd); } static void qmp_assertion_message_error(const char *domain, From 6536c9e0ebc40342a879b503040e7b0502524972 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Tue, 1 Dec 2020 20:10:23 +0100 Subject: [PATCH 07/13] tests/qtest/fuzz-test: Quit test_lp1878642 once done MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Missed in fd250172842 ("qtest: add a reproducer for LP#1878642"). Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20201201191026.4149955-2-philmd@redhat.com> Reviewed-by: Li Qiang Signed-off-by: Thomas Huth --- tests/qtest/fuzz-test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qtest/fuzz-test.c b/tests/qtest/fuzz-test.c index 9cb4c42bde..87b72307a5 100644 --- a/tests/qtest/fuzz-test.c +++ b/tests/qtest/fuzz-test.c @@ -45,6 +45,7 @@ static void test_lp1878642_pci_bus_get_irq_level_assert(void) qtest_outl(s, 0xcf8, 0x8400f841); qtest_outl(s, 0xcfc, 0xebed205d); qtest_outl(s, 0x5d02, 0xebed205d); + qtest_quit(s); } int main(int argc, char **argv) From b98b9fdef00e2383f63f939e079fe2c9eba87ca1 Mon Sep 17 00:00:00 2001 From: Alexander Bulekov Date: Wed, 2 Dec 2020 11:42:14 -0500 Subject: [PATCH 08/13] fuzz: avoid double-fetches by default The generic fuzzer can find double-fetch bugs. However: * We currently have no good way of producing qemu-system reproducers for double-fetch bugs. Even if we can get developers to run the binary-blob reproducers with the qemu-fuzz builds, we currently don't have a minimizer for these reproducers, so they are usually not easy to follow. * Often times the fuzzer will provide a reproducer containing a double-fetch for a bug that can be reproduced without double-fetching. Until we find a way to build nice double-fetch reproducers that developers are willing to look at, lets tell OSS-Fuzz to avoid double-fetches. Signed-off-by: Alexander Bulekov Reviewed-by: Darren Kenny Message-Id: <20201202164214.93867-1-alxndr@bu.edu> Signed-off-by: Thomas Huth --- tests/qtest/fuzz/generic_fuzz.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qtest/fuzz/generic_fuzz.c b/tests/qtest/fuzz/generic_fuzz.c index 262a963d2e..07ad690683 100644 --- a/tests/qtest/fuzz/generic_fuzz.c +++ b/tests/qtest/fuzz/generic_fuzz.c @@ -916,6 +916,7 @@ static GString *generic_fuzz_predefined_config_cmdline(FuzzTarget *t) g_assert(t->opaque); config = t->opaque; + setenv("QEMU_AVOID_DOUBLE_FETCH", "1", 1); setenv("QEMU_FUZZ_ARGS", config->args, 1); setenv("QEMU_FUZZ_OBJECTS", config->objects, 1); return generic_fuzz_cmdline(t); From 94a4f8167dd9dde35b27e1d82bdf6c2fa5071364 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Sun, 8 Nov 2020 21:45:23 +0100 Subject: [PATCH 09/13] gitlab-ci: Split CONFIGURE_ARGS one argument per line for build-disabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We will keep adding/removing options to our 'configure' script, so for easier maintainability it makes sense to have CONFIGURE_ARGS declared as one option per line. This way we can review diff easily (or rebase/cherry-pick). No logical change. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20201108204535.2319870-6-philmd@redhat.com> Reviewed-by: Wainer dos Santos Moschetta Signed-off-by: Thomas Huth --- .gitlab-ci.yml | 80 +++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 63 insertions(+), 17 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ee31b1020f..d2cd5d9386 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -199,23 +199,69 @@ build-disabled: <<: *native_build_job_definition variables: IMAGE: fedora - CONFIGURE_ARGS: --disable-attr --disable-avx2 --disable-bochs - --disable-brlapi --disable-bzip2 --disable-cap-ng --disable-capstone - --disable-cloop --disable-coroutine-pool --disable-curl --disable-curses - --disable-dmg --disable-docs --disable-glusterfs --disable-gnutls - --disable-gtk --disable-guest-agent --disable-iconv --disable-kvm - --disable-libiscsi --disable-libpmem --disable-libssh --disable-libusb - --disable-libxml2 --disable-linux-aio --disable-live-block-migration - --disable-lzo --disable-malloc-trim --disable-mpath --disable-nettle - --disable-numa --disable-parallels --disable-pie --disable-qcow1 - --disable-qed --disable-qom-cast-debug --disable-rbd --disable-rdma - --disable-replication --disable-sdl --disable-seccomp --disable-sheepdog - --disable-slirp --disable-smartcard --disable-snappy --disable-spice - --disable-strip --disable-tpm --disable-usb-redir --disable-vdi - --disable-vhost-crypto --disable-vhost-net --disable-vhost-scsi - --disable-vhost-user --disable-vhost-vdpa --disable-vhost-vsock - --disable-virglrenderer --disable-vnc --disable-vte --disable-vvfat - --disable-xen --disable-zstd + CONFIGURE_ARGS: + --disable-attr + --disable-avx2 + --disable-bochs + --disable-brlapi + --disable-bzip2 + --disable-cap-ng + --disable-capstone + --disable-cloop + --disable-coroutine-pool + --disable-curl + --disable-curses + --disable-dmg + --disable-docs + --disable-glusterfs + --disable-gnutls + --disable-gtk + --disable-guest-agent + --disable-iconv + --disable-kvm + --disable-libiscsi + --disable-libpmem + --disable-libssh + --disable-libusb + --disable-libxml2 + --disable-linux-aio + --disable-live-block-migration + --disable-lzo + --disable-malloc-trim + --disable-mpath + --disable-nettle + --disable-numa + --disable-parallels + --disable-pie + --disable-qcow1 + --disable-qed + --disable-qom-cast-debug + --disable-rbd + --disable-rdma + --disable-replication + --disable-sdl + --disable-seccomp + --disable-sheepdog + --disable-slirp + --disable-smartcard + --disable-snappy + --disable-spice + --disable-strip + --disable-tpm + --disable-usb-redir + --disable-vdi + --disable-vhost-crypto + --disable-vhost-net + --disable-vhost-scsi + --disable-vhost-user + --disable-vhost-vdpa + --disable-vhost-vsock + --disable-virglrenderer + --disable-vnc + --disable-vte + --disable-vvfat + --disable-xen + --disable-zstd TARGETS: arm-softmmu i386-softmmu ppc64-softmmu mips64-softmmu s390x-softmmu i386-linux-user MAKE_CHECK_ARGS: check-qtest SPEED=slow From 0c4d885f08485de1a4a51b31a7b5af66e181667e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Sun, 8 Nov 2020 21:45:24 +0100 Subject: [PATCH 10/13] gitlab-ci: Update 'build-disabled' to cover all configurable options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add these missing options to the 'build-disabled' job: --disable-auth-pam (commit 8953caf3cd38) --disable-gcrypt (commit 91bfcdb01d48) --disable-keyring (commit 54e7aac05624) --disable-libudev (commit 5c53015a480b) --disable-opengl (commit da076ffed6b9) --disable-sparse (commit 03b4fe7de226) Signed-off-by: Philippe Mathieu-Daudé [thuth: Dropped the unnecessary hunk with --disable-vhost-user-blk-server] Message-Id: <20201108204535.2319870-7-philmd@redhat.com> Signed-off-by: Thomas Huth --- .gitlab-ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d2cd5d9386..8f72a2630d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -201,6 +201,7 @@ build-disabled: IMAGE: fedora CONFIGURE_ARGS: --disable-attr + --disable-auth-pam --disable-avx2 --disable-bochs --disable-brlapi @@ -213,15 +214,18 @@ build-disabled: --disable-curses --disable-dmg --disable-docs + --disable-gcrypt --disable-glusterfs --disable-gnutls --disable-gtk --disable-guest-agent --disable-iconv + --disable-keyring --disable-kvm --disable-libiscsi --disable-libpmem --disable-libssh + --disable-libudev --disable-libusb --disable-libxml2 --disable-linux-aio @@ -231,6 +235,7 @@ build-disabled: --disable-mpath --disable-nettle --disable-numa + --disable-opengl --disable-parallels --disable-pie --disable-qcow1 @@ -245,6 +250,7 @@ build-disabled: --disable-slirp --disable-smartcard --disable-snappy + --disable-sparse --disable-spice --disable-strip --disable-tpm From d01bc2531c4055ca8b5c3a0cacb9e26d321550c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Sun, 8 Nov 2020 21:45:28 +0100 Subject: [PATCH 11/13] gitlab-ci: Move user-static test across to gitlab MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Similarly to commit 8cdb2cef3f1, move the user-static test to GitLab. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20201108204535.2319870-11-philmd@redhat.com> Reviewed-by: Wainer dos Santos Moschetta Signed-off-by: Thomas Huth --- .gitlab-ci.yml | 7 +++++++ .travis.yml | 5 ----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8f72a2630d..7381c7858d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -304,6 +304,13 @@ build-user: CONFIGURE_ARGS: --disable-tools --disable-system MAKE_CHECK_ARGS: check-tcg +build-user-static: + <<: *native_build_job_definition + variables: + IMAGE: debian-all-test-cross + CONFIGURE_ARGS: --disable-tools --disable-system --static + MAKE_CHECK_ARGS: check-tcg + # Only build the softmmu targets we have check-tcg tests for build-some-softmmu: <<: *native_build_job_definition diff --git a/.travis.yml b/.travis.yml index 1f80bdb624..12828f351c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -119,11 +119,6 @@ after_script: jobs: include: - - name: "GCC static (user)" - env: - - CONFIG="--disable-system --static" - - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default" - # Just build tools and run minimal unit and softfloat checks - name: "GCC check-unit and check-softfloat" env: From d1a8b308a4ceb1071683bfcee22bd646b251f4a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Sun, 8 Nov 2020 21:45:30 +0100 Subject: [PATCH 12/13] gitlab-ci: Move coroutine tests across to gitlab MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Similarly to commit 8cdb2cef3f1, move the coroutine tests to GitLab. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20201108204535.2319870-13-philmd@redhat.com> Reviewed-by: Wainer dos Santos Moschetta [thuth: Replaced Travis by Gitlab-CI in comment] Signed-off-by: Thomas Huth --- .gitlab-ci.yml | 16 ++++++++++++++++ .travis.yml | 14 -------------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7381c7858d..873ed19fcf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -413,6 +413,22 @@ build-tci: - QTEST_QEMU_BINARY="./qemu-system-x86_64" ./tests/qtest/pxe-test - QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow +# Alternate coroutines implementations are only really of interest to KVM users +# However we can't test against KVM on Gitlab-CI so we can only run unit tests +build-coroutine-ucontext: + <<: *native_build_job_definition + variables: + IMAGE: ubuntu2004 + CONFIGURE_ARGS: --with-coroutine=ucontext --disable-tcg + MAKE_CHECK_ARGS: check-unit + +build-coroutine-sigaltstack: + <<: *native_build_job_definition + variables: + IMAGE: ubuntu2004 + CONFIGURE_ARGS: --with-coroutine=sigaltstack --disable-tcg + MAKE_CHECK_ARGS: check-unit + # Most jobs test latest gcrypt or nettle builds # # These jobs test old gcrypt and nettle from RHEL7 diff --git a/.travis.yml b/.travis.yml index 12828f351c..d01714a5ae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -148,20 +148,6 @@ jobs: - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default" - # Alternate coroutines implementations are only really of interest to KVM users - # However we can't test against KVM on Travis so we can only run unit tests - - name: "check-unit coroutine=ucontext" - env: - - CONFIG="--with-coroutine=ucontext --disable-tcg" - - TEST_CMD="make check-unit -j${JOBS} V=1" - - - - name: "check-unit coroutine=sigaltstack" - env: - - CONFIG="--with-coroutine=sigaltstack --disable-tcg" - - TEST_CMD="make check-unit -j${JOBS} V=1" - - # Check we can build docs and tools (out of tree) - name: "tools and docs (bionic)" dist: bionic From b0bed2c916286326b248da05b2ca5f6d152aba44 Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Fri, 20 Nov 2020 17:23:14 +0000 Subject: [PATCH 13/13] hw/m68k/mcf5206: Don't leak IRQs in mcf5206_mbar_realize() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Coverity points out that the realize function for the TYPE_MCF5206_MBAR device leaks the IRQ array it allocates with qemu_allocate_irqs(). Keep a pointer to it in the device state struct to avoid the leak. (Since it needs to stay around for the life of the simulation there is no need to actually free it, and the leak was harmless.) Fixes: Coverity CID 1432412 Signed-off-by: Peter Maydell Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20201120172314.14725-1-peter.maydell@linaro.org> Signed-off-by: Thomas Huth --- hw/m68k/mcf5206.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/m68k/mcf5206.c b/hw/m68k/mcf5206.c index 51d2e0da1c..92a194dbc4 100644 --- a/hw/m68k/mcf5206.c +++ b/hw/m68k/mcf5206.c @@ -164,6 +164,7 @@ typedef struct { M68kCPU *cpu; MemoryRegion iomem; + qemu_irq *pic; m5206_timer_state *timer[2]; void *uart[2]; uint8_t scr; @@ -588,17 +589,16 @@ static const MemoryRegionOps m5206_mbar_ops = { static void mcf5206_mbar_realize(DeviceState *dev, Error **errp) { m5206_mbar_state *s = MCF5206_MBAR(dev); - qemu_irq *pic; memory_region_init_io(&s->iomem, NULL, &m5206_mbar_ops, s, "mbar", 0x00001000); sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->iomem); - pic = qemu_allocate_irqs(m5206_mbar_set_irq, s, 14); - s->timer[0] = m5206_timer_init(pic[9]); - s->timer[1] = m5206_timer_init(pic[10]); - s->uart[0] = mcf_uart_init(pic[12], serial_hd(0)); - s->uart[1] = mcf_uart_init(pic[13], serial_hd(1)); + s->pic = qemu_allocate_irqs(m5206_mbar_set_irq, s, 14); + s->timer[0] = m5206_timer_init(s->pic[9]); + s->timer[1] = m5206_timer_init(s->pic[10]); + s->uart[0] = mcf_uart_init(s->pic[12], serial_hd(0)); + s->uart[1] = mcf_uart_init(s->pic[13], serial_hd(1)); s->cpu = M68K_CPU(qemu_get_cpu(0)); }