* Gitlab-CI improvement patches by Philippe

* Some small fixes for tests
 * Fix coverity warning in the mcf5206 code
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAl/QeQgRHHRodXRoQHJl
 ZGhhdC5jb20ACgkQLtnXdP5wLbUOEw//cXJLkryLTagOaKMlm74V5WYEhqTe5kU7
 R1X9gZOVwNMSBYZ2hS1DuNvNzdOKBAnTJ79sGCFgEJL3HQ8o/anZE5BXWM+HzeBv
 FL7UrmS5gAIk7NxTWkG7fLU8dB8FIANtS+8FMQTZo5QdEM9G6xXKubfiN1cUfo8S
 2S8oJHEX/8vzlrECXaTTP6SBuYZaAFlNKggE3VxZcduC+V4zKMZGYRK4KrWWg9WX
 nN8BR+SvrkGxJR0tBmYB48yYn5fxiU/zWMHCTr+c4LVEFuVUwIFOiD21WAiziM6w
 FtuhImaXZPp0mlc3a38iwKMIF9nDCuYsvUIycxpceMWO79prwHaBnMhcvVe0UMkC
 nJo3nl+pkmdfs/PFCNJ0YqOa2bsYQDtuk8RKGIpqcd65/FKDbTS55dNWkrB0pDBj
 vv0EPE+BO7fL25lZHZJSNRCcaUA3ha0FRq+xyam4bfMJdW3FKydxT1vsLbFedhsS
 NoL5HsAj8EvHwpFVGT8+5DOAAXaEtsZC3DCDX+0mR/grHXCaSwo0hlH9VBMrKZ4J
 iAAFW6TglbXT1SBP96ACukpBg2O1qySGMD3iZkU3amXGaTK6fqVxFB2Ow69PgH1U
 tRh//NbkauXZrPpZkFn42CLpHTSn1NiBd5kOcIp5ChCs+QFmDXLnrt7UfIPFOGG3
 wCXFO/eOzVI=
 =ffy/
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2020-12-09' into staging

* Gitlab-CI improvement patches by Philippe
* Some small fixes for tests
* Fix coverity warning in the mcf5206 code

# gpg: Signature made Wed 09 Dec 2020 07:13:12 GMT
# gpg:                using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg:                issuer "thuth@redhat.com"
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full]
# gpg:                 aka "Thomas Huth <thuth@redhat.com>" [full]
# gpg:                 aka "Thomas Huth <huth@tuxfamily.org>" [full]
# gpg:                 aka "Thomas Huth <th.huth@posteo.de>" [unknown]
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3  EAB9 2ED9 D774 FE70 2DB5

* remotes/huth-gitlab/tags/pull-request-2020-12-09:
  hw/m68k/mcf5206: Don't leak IRQs in mcf5206_mbar_realize()
  gitlab-ci: Move coroutine tests across to gitlab
  gitlab-ci: Move user-static test across to gitlab
  gitlab-ci: Update 'build-disabled' to cover all configurable options
  gitlab-ci: Split CONFIGURE_ARGS one argument per line for build-disabled
  fuzz: avoid double-fetches by default
  tests/qtest/fuzz-test: Quit test_lp1878642 once done
  test-qga: fix a resource leak in test_qga_guest_get_osinfo()
  gitlab-ci: Add Xen cross-build jobs
  gitlab-ci: Add KVM s390x cross-build jobs
  gitlab-ci: Introduce 'cross_accel_build_job' template
  gitlab-ci: Replace YAML anchors by extends (cross_system_build_job)
  gitlab-ci: Document 'build-tcg-disabled' is a KVM X86 job

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2020-12-09 14:38:18 +00:00
commit 28db503fd7
7 changed files with 163 additions and 63 deletions

View File

@ -1,5 +1,4 @@
.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 +12,24 @@
xtensa-softmmu"
- make -j$(expr $(nproc) + 1) all check-build
.cross_user_build_job_template: &cross_user_build_job_definition
# 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
script:
@ -24,91 +40,111 @@
- 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-s390x-kvm-only:
extends: .cross_accel_build_job
variables:
IMAGE: debian-s390x-cross
ACCEL_CONFIGURE_OPTS: --disable-tcg
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
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

View File

@ -199,27 +199,84 @@ 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-auth-pam
--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-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
--disable-live-block-migration
--disable-lzo
--disable-malloc-trim
--disable-mpath
--disable-nettle
--disable-numa
--disable-opengl
--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-sparse
--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
# 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:
@ -247,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
@ -349,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

View File

@ -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:
@ -153,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

View File

@ -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));
}

View File

@ -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)

View File

@ -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);

View File

@ -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,