* Fixes for cross-compiling with MinGW / compiling with MSYS2

* Enable cross-compiler builds in the Gitlab CI
 * Improvements / fixes for the crypto tests in the Gitlab CI
 * Fix for the "make check-acceptance" microblaze failure
   (required to get the Gitlab CI green again)
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAl9WIZMRHHRodXRoQHJl
 ZGhhdC5jb20ACgkQLtnXdP5wLbUaFg//T5/yuRz8TitZBJ7som5DgyhUHaFnOgA+
 uFeI3aDbqooRroAmElEMSzjas5oFVNaNUuk0OduYbXB8ZnQyZwD0ePfGvCHtNq1M
 YIYidNZQhf4D0m0r2WsjdnP2Yq1/J44WqyS2DmGWNgGp/80Ns4OVsm1sEgWowIsS
 3RmQi/u7G3KulNkuCD9f1raAXodYPqYuhnxK6wBeaf0QnScsoGSoYkirrgu3Vjp9
 mO78x5j6DrkCwwh2p3BP7rtORX3pZzjkBcqrL3buwLcuDiYMVtZbEf41uThlwLzd
 AyrQa1FoNJnQWafk6tZda52QhmVAUvoOhrxamzupWNPJeg2fkjKA3hfBSp+ic7yV
 5+1MmWaXlULNFjHSeSmsCZBhSh+i0Q3Lij7bLRQ5iuJcP/+pNWUIv7Csn07OBrg1
 aodc6APg510I6af3sf1VXRh20pqN2gBXEsYOODv/yuCmUR9k0dI9xecxSQEEntKk
 utY7HZGL1lQMU5kagR+VtZmRoBhloI3ie33wCaE0FzjLEdNDWMEr/xm3x/mB1eSn
 8qeqssdpvUT3cdxWGHWMpKUiE7bVsjsxEE4Ozx3rTLnzHHUMrgTAaBCpJHb7uzwi
 1XP5Scd0wPJmsoyFSfswIKQoeMdXqlGvUYTihk5Iin63lkDtlEP9wY8CVUrzYp4v
 3+y8hjkxWCg=
 =fpyA
 -----END PGP SIGNATURE-----

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

* Fixes for cross-compiling with MinGW / compiling with MSYS2
* Enable cross-compiler builds in the Gitlab CI
* Improvements / fixes for the crypto tests in the Gitlab CI
* Fix for the "make check-acceptance" microblaze failure
  (required to get the Gitlab CI green again)

# gpg: Signature made Mon 07 Sep 2020 13:03:31 BST
# 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-09-07:
  target/microblaze: Collected fixes for env->iflags
  tests/qtest: do not list ahci-test twice
  gitlab: expand test coverage for crypto builds
  crypto: fix build with gcrypt enabled
  gitlab-ci: Add cross-compiling build tests
  stubs: Move qemu_fd_register stub to util/main-loop.c
  stubs: Move qemu_timer_notify_cb() and remove qemu_notify_event() stub
  configure: Allow automatic WHPX detection
  dockerfiles/debian-win64-cross: Download WHPX MinGW headers
  tests/Makefile: test-image-locking needs CONFIG_POSIX
  tests: Fixes building test-util-filemonitor.c on msys2/mingw
  tests: fixes test-vmstate.c compile error on msys2
  tests: handling signal on win32 properly
  tests/docker: add python3-setuptools the docker images

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2020-09-07 16:51:00 +01:00
commit e11bd71f89
26 changed files with 285 additions and 44 deletions

View File

@ -0,0 +1,113 @@
.cross_system_build_job_template: &cross_system_build_job_definition
stage: build
image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest
script:
- mkdir build
- cd build
- PKG_CONFIG_PATH=$PKG_CONFIG_PATH
../configure --enable-werror $QEMU_CONFIGURE_OPTS --disable-user
--target-list-exclude="aarch64-softmmu i386-softmmu microblaze-softmmu
mips-softmmu mipsel-softmmu mips64-softmmu ppc64-softmmu sh4-softmmu
xtensa-softmmu"
- make -j$(expr $(nproc) + 1) all check-build
.cross_user_build_job_template: &cross_user_build_job_definition
stage: build
image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest
script:
- mkdir build
- cd build
- PKG_CONFIG_PATH=$PKG_CONFIG_PATH
../configure --enable-werror $QEMU_CONFIGURE_OPTS --disable-system
- make -j$(expr $(nproc) + 1) all check-build
cross-armel-system:
<<: *cross_system_build_job_definition
variables:
IMAGE: debian-armel-cross
cross-armel-user:
<<: *cross_user_build_job_definition
variables:
IMAGE: debian-armel-cross
cross-armhf-system:
<<: *cross_system_build_job_definition
variables:
IMAGE: debian-armhf-cross
cross-armhf-user:
<<: *cross_user_build_job_definition
variables:
IMAGE: debian-armhf-cross
cross-arm64-system:
<<: *cross_system_build_job_definition
variables:
IMAGE: debian-arm64-cross
cross-arm64-user:
<<: *cross_user_build_job_definition
variables:
IMAGE: debian-arm64-cross
cross-mips-system:
<<: *cross_system_build_job_definition
variables:
IMAGE: debian-mips-cross
cross-mips-user:
<<: *cross_user_build_job_definition
variables:
IMAGE: debian-mips-cross
cross-mipsel-system:
<<: *cross_system_build_job_definition
variables:
IMAGE: debian-mipsel-cross
cross-mipsel-user:
<<: *cross_user_build_job_definition
variables:
IMAGE: debian-mipsel-cross
cross-mips64el-system:
<<: *cross_system_build_job_definition
variables:
IMAGE: debian-mips64el-cross
cross-mips64el-user:
<<: *cross_user_build_job_definition
variables:
IMAGE: debian-mips64el-cross
cross-ppc64el-system:
<<: *cross_system_build_job_definition
variables:
IMAGE: debian-ppc64el-cross
cross-ppc64el-user:
<<: *cross_user_build_job_definition
variables:
IMAGE: debian-ppc64el-cross
cross-s390x-system:
<<: *cross_system_build_job_definition
variables:
IMAGE: debian-s390x-cross
cross-s390x-user:
<<: *cross_user_build_job_definition
variables:
IMAGE: debian-s390x-cross
cross-win32-system:
<<: *cross_system_build_job_definition
variables:
IMAGE: debian-win32-cross
cross-win64-system:
<<: *cross_system_build_job_definition
variables:
IMAGE: debian-win64-cross

View File

@ -18,6 +18,7 @@ include:
- local: '/.gitlab-ci.d/edk2.yml'
- local: '/.gitlab-ci.d/opensbi.yml'
- local: '/.gitlab-ci.d/containers.yml'
- local: '/.gitlab-ci.d/crossbuilds.yml'
.native_build_job_template: &native_build_job_definition
stage: build
@ -132,6 +133,7 @@ build-system-fedora:
<<: *native_build_job_definition
variables:
IMAGE: fedora
CONFIGURE_ARGS: --disable-gcrypt --enable-nettle
TARGETS: tricore-softmmu unicore32-softmmu microblaze-softmmu mips-softmmu
xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmu
MAKE_CHECK_ARGS: check-build
@ -163,6 +165,7 @@ build-system-centos:
<<: *native_build_job_definition
variables:
IMAGE: centos8
CONFIGURE_ARGS: --disable-nettle --enable-gcrypt
TARGETS: ppc64-softmmu lm32-softmmu or1k-softmmu s390x-softmmu
x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu
MAKE_CHECK_ARGS: check-build
@ -289,3 +292,69 @@ build-tci:
done
- QTEST_QEMU_BINARY="./qemu-system-x86_64" ./tests/qtest/pxe-test
- QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow
# Most jobs test latest gcrypt or nettle builds
#
# These jobs test old gcrypt and nettle from RHEL7
# which had some API differences.
build-crypto-old-nettle:
<<: *native_build_job_definition
variables:
IMAGE: centos7
TARGETS: x86_64-softmmu x86_64-linux-user
CONFIGURE_ARGS: --disable-gcrypt --enable-nettle
MAKE_CHECK_ARGS: check-build
artifacts:
paths:
- build
check-crypto-old-nettle:
<<: *native_test_job_definition
needs:
- job: build-crypto-old-nettle
artifacts: true
variables:
IMAGE: centos7
MAKE_CHECK_ARGS: check
build-crypto-old-gcrypt:
<<: *native_build_job_definition
variables:
IMAGE: centos7
TARGETS: x86_64-softmmu x86_64-linux-user
CONFIGURE_ARGS: --disable-nettle --enable-gcrypt
MAKE_CHECK_ARGS: check-build
artifacts:
paths:
- build
check-crypto-old-gcrypt:
<<: *native_test_job_definition
needs:
- job: build-crypto-old-gcrypt
artifacts: true
variables:
IMAGE: centos7
MAKE_CHECK_ARGS: check
build-crypto-only-gnutls:
<<: *native_build_job_definition
variables:
IMAGE: centos7
TARGETS: x86_64-softmmu x86_64-linux-user
CONFIGURE_ARGS: --disable-nettle --disable-gcrypt --enable-gnutls
MAKE_CHECK_ARGS: check-build
artifacts:
paths:
- build
check-crypto-only-gnutls:
<<: *native_test_job_definition
needs:
- job: build-crypto-only-gnutls
artifacts: true
variables:
IMAGE: centos7
MAKE_CHECK_ARGS: check

View File

@ -3071,6 +3071,7 @@ M: Alex Bennée <alex.bennee@linaro.org>
R: Wainer dos Santos Moschetta <wainersm@redhat.com>
S: Maintained
F: .gitlab-ci.yml
F: .gitlab-ci.d/crossbuilds.yml
Guest Test Compilation Support
M: Alex Bennée <alex.bennee@linaro.org>

3
configure vendored
View File

@ -849,6 +849,7 @@ case $targetos in
MINGW32*)
mingw32="yes"
hax="yes"
whpx=""
vhost_user="no"
audio_possible_drivers="dsound sdl"
if check_include dsound.h; then
@ -6962,6 +6963,8 @@ if test "$gcrypt" = "yes" ; then
if test "$gcrypt_hmac" = "yes" ; then
echo "CONFIG_GCRYPT_HMAC=y" >> $config_host_mak
fi
echo "GCRYPT_CFLAGS=$gcrypt_cflags" >> $config_host_mak
echo "GCRYPT_LIBS=$gcrypt_libs" >> $config_host_mak
fi
if test "$nettle" = "yes" ; then
echo "CONFIG_NETTLE=y" >> $config_host_mak

View File

@ -23,24 +23,35 @@ crypto_ss.add(files(
'tlssession.c',
))
if 'CONFIG_GCRYPT' in config_host
wo_nettle = files('hash-gcrypt.c', 'pbkdf-gcrypt.c')
if 'CONFIG_NETTLE' in config_host
crypto_ss.add(files('hash-nettle.c', 'hmac-nettle.c', 'pbkdf-nettle.c'))
elif 'CONFIG_GCRYPT' in config_host
crypto_ss.add(files('hash-gcrypt.c', 'pbkdf-gcrypt.c'))
if 'CONFIG_GCRYPT_HMAC' in config_host
crypto_ss.add(files('hmac-gcrypt.c'))
else
crypto_ss.add(files('hmac-glib.c'))
endif
else
wo_nettle = files('hash-glib.c', 'pbkdf-stub.c')
crypto_ss.add(files('hash-glib.c', 'hmac-glib.c', 'pbkdf-stub.c'))
endif
if 'CONFIG_GCRYPT_HMAC' not in config_host
wo_nettle += files('hmac-glib.c')
endif
crypto_ss.add(when: [nettle, 'CONFIG_NETTLE'],
if_true: files('hash-nettle.c', 'hmac-nettle.c', 'pbkdf-nettle.c'),
if_false: wo_nettle)
crypto_ss.add(when: 'CONFIG_SECRET_KEYRING', if_true: files('secret_keyring.c'))
crypto_ss.add(when: 'CONFIG_QEMU_PRIVATE_XTS', if_true: files('xts.c'))
crypto_ss.add(when: 'CONFIG_GCRYPT_HMAC', if_true: files('hmac-gcrypt.c'))
crypto_ss.add(when: 'CONFIG_AF_ALG', if_true: files('afalg.c', 'cipher-afalg.c', 'hash-afalg.c'))
crypto_ss.add(when: 'CONFIG_GNUTLS', if_true: files('tls-cipher-suites.c'))
if 'CONFIG_NETTLE' in config_host
crypto_ss.add(nettle)
elif 'CONFIG_GCRYPT' in config_host
crypto_ss.add(gcrypt)
endif
if 'CONFIG_GNUTLS' in config_host
crypto_ss.add(gnutls)
endif
crypto_ss = crypto_ss.apply(config_host, strict: false)
libcrypto = static_library('crypto', crypto_ss.sources() + genh,
dependencies: [crypto_ss.dependencies()],
@ -52,12 +63,21 @@ crypto = declare_dependency(link_whole: libcrypto,
util_ss.add(files('aes.c'))
util_ss.add(files('init.c'))
if 'CONFIG_GCRYPT' in config_host
util_ss.add(files('random-gcrypt.c'))
elif 'CONFIG_GNUTLS' in config_host
util_ss.add(files('random-gnutls.c'), gnutls)
util_ss.add(files('random-gnutls.c'))
elif 'CONFIG_RNG_NONE' in config_host
util_ss.add(files('random-none.c'))
else
util_ss.add(files('random-platform.c'))
endif
if 'CONFIG_GCRYPT' in config_host
util_ss.add(gcrypt)
endif
if 'CONFIG_GNUTLS' in config_host
util_ss.add(gnutls)
endif

View File

@ -116,6 +116,11 @@ urcubp = not_found
if 'CONFIG_TRACE_UST' in config_host
urcubp = declare_dependency(link_args: config_host['URCU_BP_LIBS'].split())
endif
gcrypt = not_found
if 'CONFIG_GCRYPT' in config_host
gcrypt = declare_dependency(compile_args: config_host['GCRYPT_CFLAGS'].split(),
link_args: config_host['GCRYPT_LIBS'].split())
endif
nettle = not_found
if 'CONFIG_NETTLE' in config_host
nettle = declare_dependency(compile_args: config_host['NETTLE_CFLAGS'].split(),

View File

@ -14,8 +14,3 @@ int64_t cpu_get_icount_raw(void)
{
abort();
}
void qemu_timer_notify_cb(void *opaque, QEMUClockType type)
{
qemu_notify_event();
}

View File

@ -1,6 +0,0 @@
#include "qemu/osdep.h"
#include "qemu/main-loop.h"
void qemu_fd_register(int fd)
{
}

View File

@ -9,7 +9,6 @@ stub_ss.add(files('cpu-get-clock.c'))
stub_ss.add(files('cpu-get-icount.c'))
stub_ss.add(files('dump.c'))
stub_ss.add(files('error-printf.c'))
stub_ss.add(files('fd-register.c'))
stub_ss.add(files('fdset.c'))
stub_ss.add(files('fw_cfg.c'))
stub_ss.add(files('gdbstub.c'))
@ -24,9 +23,9 @@ stub_ss.add(files('machine-init-done.c'))
stub_ss.add(files('migr-blocker.c'))
stub_ss.add(files('monitor.c'))
stub_ss.add(files('monitor-core.c'))
stub_ss.add(files('notify-event.c'))
stub_ss.add(files('pci-bus.c'))
stub_ss.add(files('pci-host-piix.c'))
stub_ss.add(files('qemu-timer-notify-cb.c'))
stub_ss.add(files('qmp_memory_device.c'))
stub_ss.add(files('qtest.c'))
stub_ss.add(files('ram-block.c'))

View File

@ -1,6 +0,0 @@
#include "qemu/osdep.h"
#include "qemu/main-loop.h"
void qemu_notify_event(void)
{
}

View File

@ -0,0 +1,8 @@
#include "qemu/osdep.h"
#include "sysemu/cpus.h"
#include "qemu/main-loop.h"
void qemu_timer_notify_cb(void *opaque, QEMUClockType type)
{
qemu_notify_event();
}

View File

@ -80,6 +80,16 @@ static void mb_cpu_set_pc(CPUState *cs, vaddr value)
MicroBlazeCPU *cpu = MICROBLAZE_CPU(cs);
cpu->env.pc = value;
/* Ensure D_FLAG and IMM_FLAG are clear for the new PC */
cpu->env.iflags = 0;
}
static void mb_cpu_synchronize_from_tb(CPUState *cs, TranslationBlock *tb)
{
MicroBlazeCPU *cpu = MICROBLAZE_CPU(cs);
cpu->env.pc = tb->pc;
cpu->env.iflags = tb->flags & IFLAGS_TB_MASK;
}
static bool mb_cpu_has_work(CPUState *cs)
@ -321,6 +331,7 @@ static void mb_cpu_class_init(ObjectClass *oc, void *data)
cc->cpu_exec_interrupt = mb_cpu_exec_interrupt;
cc->dump_state = mb_cpu_dump_state;
cc->set_pc = mb_cpu_set_pc;
cc->synchronize_from_tb = mb_cpu_synchronize_from_tb;
cc->gdb_read_register = mb_cpu_gdb_read_register;
cc->gdb_write_register = mb_cpu_gdb_write_register;
cc->tlb_fill = mb_cpu_tlb_fill;

View File

@ -270,7 +270,8 @@ struct CPUMBState {
#define D_FLAG (1 << 19) /* Bit in ESR. */
/* TB dependent CPUMBState. */
#define IFLAGS_TB_MASK (D_FLAG | IMM_FLAG | DRTI_FLAG | DRTE_FLAG | DRTB_FLAG)
#define IFLAGS_TB_MASK (D_FLAG | BIMM_FLAG | IMM_FLAG | \
DRTI_FLAG | DRTE_FLAG | DRTB_FLAG)
#define MSR_TB_MASK (MSR_UM | MSR_VM | MSR_EE)
uint32_t iflags;

View File

@ -113,7 +113,10 @@ void mb_cpu_do_interrupt(CPUState *cs)
uint32_t t, msr = mb_cpu_read_msr(env);
/* IMM flag cannot propagate across a branch and into the dslot. */
assert(!((env->iflags & D_FLAG) && (env->iflags & IMM_FLAG)));
assert((env->iflags & (D_FLAG | IMM_FLAG)) != (D_FLAG | IMM_FLAG));
/* BIMM flag cannot be set without D_FLAG. */
assert((env->iflags & (D_FLAG | BIMM_FLAG)) != BIMM_FLAG);
/* RTI flags are private to translate. */
assert(!(env->iflags & (DRTI_FLAG | DRTE_FLAG | DRTB_FLAG)));
env->res_addr = RES_ADDR_NONE;
switch (cs->exception_index) {
@ -146,7 +149,7 @@ void mb_cpu_do_interrupt(CPUState *cs)
env->pc, env->ear,
env->esr, env->iflags);
log_cpu_state_mask(CPU_LOG_INT, cs, 0);
env->iflags &= ~(IMM_FLAG | D_FLAG);
env->iflags = 0;
env->pc = cpu->cfg.base_vectors + 0x20;
break;
@ -186,14 +189,14 @@ void mb_cpu_do_interrupt(CPUState *cs)
"exception at pc=%x ear=%" PRIx64 " iflags=%x\n",
env->pc, env->ear, env->iflags);
log_cpu_state_mask(CPU_LOG_INT, cs, 0);
env->iflags &= ~(IMM_FLAG | D_FLAG);
env->iflags = 0;
env->pc = cpu->cfg.base_vectors + 0x20;
break;
case EXCP_IRQ:
assert(!(msr & (MSR_EIP | MSR_BIP)));
assert(msr & MSR_IE);
assert(!(env->iflags & D_FLAG));
assert(!(env->iflags & (D_FLAG | IMM_FLAG)));
t = (msr & (MSR_VM | MSR_UM)) << 1;
@ -226,13 +229,14 @@ void mb_cpu_do_interrupt(CPUState *cs)
mb_cpu_write_msr(env, msr);
env->regs[14] = env->pc;
env->iflags = 0;
env->pc = cpu->cfg.base_vectors + 0x10;
//log_cpu_state_mask(CPU_LOG_INT, cs, 0);
break;
case EXCP_HW_BREAK:
assert(!(env->iflags & IMM_FLAG));
assert(!(env->iflags & D_FLAG));
assert(!(env->iflags & (D_FLAG | IMM_FLAG)));
t = (msr & (MSR_VM | MSR_UM)) << 1;
qemu_log_mask(CPU_LOG_INT,
"break at pc=%x msr=%x %x iflags=%x\n",
@ -242,6 +246,7 @@ void mb_cpu_do_interrupt(CPUState *cs)
msr |= t;
msr |= MSR_BIP;
env->regs[16] = env->pc;
env->iflags = 0;
env->pc = cpu->cfg.base_vectors + 0x18;
mb_cpu_write_msr(env, msr);
break;

View File

@ -91,8 +91,8 @@ static int typeb_imm(DisasContext *dc, int x)
static void t_sync_flags(DisasContext *dc)
{
/* Synch the tb dependent flags between translator and runtime. */
if ((dc->tb_flags ^ dc->base.tb->flags) & ~MSR_TB_MASK) {
tcg_gen_movi_i32(cpu_iflags, dc->tb_flags & ~MSR_TB_MASK);
if ((dc->tb_flags ^ dc->base.tb->flags) & IFLAGS_TB_MASK) {
tcg_gen_movi_i32(cpu_iflags, dc->tb_flags & IFLAGS_TB_MASK);
}
}

View File

@ -87,7 +87,9 @@ check-unit-$(CONFIG_BLOCK) += tests/test-blockjob$(EXESUF)
check-unit-$(CONFIG_BLOCK) += tests/test-blockjob-txn$(EXESUF)
check-unit-$(CONFIG_BLOCK) += tests/test-block-backend$(EXESUF)
check-unit-$(CONFIG_BLOCK) += tests/test-block-iothread$(EXESUF)
ifeq ($(CONFIG_POSIX),y)
check-unit-$(CONFIG_BLOCK) += tests/test-image-locking$(EXESUF)
endif
check-unit-y += tests/test-x86-cpuid$(EXESUF)
# all code tested by test-x86-cpuid is inside topology.h
ifeq ($(CONFIG_SOFTMMU),y)

View File

@ -15,9 +15,11 @@ ENV PACKAGES \
gettext \
git \
glib2-devel \
gnutls-devel \
libaio-devel \
libepoxy-devel \
libfdt-devel \
libgcrypt-devel \
librdmacm-devel \
libzstd-devel \
lzo-devel \

View File

@ -13,6 +13,7 @@ ENV PACKAGES \
glib2-devel \
libaio-devel \
libepoxy-devel \
libgcrypt-devel \
lzo-devel \
make \
mesa-libEGL-devel \

View File

@ -32,7 +32,14 @@ RUN apt-get update && \
mxe-$TARGET-w64-mingw32.shared-sdl2 \
mxe-$TARGET-w64-mingw32.shared-sdl2-mixer \
mxe-$TARGET-w64-mingw32.shared-sdl2-gfx \
mxe-$TARGET-w64-mingw32.shared-zlib
mxe-$TARGET-w64-mingw32.shared-zlib \
curl && \
curl -s -S -o /usr/lib/mxe/usr/x86_64-w64-mingw32.shared/include/WinHvEmulation.h \
"https://sourceforge.net/p/mingw-w64/mingw-w64/ci/master/tree/mingw-w64-headers/include/winhvemulation.h?format=raw" && \
curl -s -S -o /usr/lib/mxe/usr/x86_64-w64-mingw32.shared/include/WinHvPlatform.h \
"https://sourceforge.net/p/mingw-w64/mingw-w64/ci/master/tree/mingw-w64-headers/include/winhvplatform.h?format=raw" && \
curl -s -S -o /usr/lib/mxe/usr/x86_64-w64-mingw32.shared/include/winhvplatformdefs.h \
"https://sourceforge.net/p/mingw-w64/mingw-w64/ci/master/tree/mingw-w64-headers/include/winhvplatformdefs.h?format=raw"
# Specify the cross prefix for this image (see tests/docker/common.rc)
ENV QEMU_CONFIGURE_OPTS --cross-prefix=x86_64-w64-mingw32.shared-

View File

@ -29,6 +29,7 @@ RUN apt update && \
pkg-config \
psmisc \
python3 \
python3-setuptools \
python3-sphinx \
texinfo \
$(apt-get -s build-dep qemu | egrep ^Inst | fgrep '[all]' | cut -d\ -f2)

View File

@ -28,4 +28,5 @@ RUN apt update && \
pkg-config \
psmisc \
python3 \
python3-setuptools \
$(apt-get -s build-dep qemu | egrep ^Inst | fgrep '[all]' | cut -d\ -f2)

View File

@ -49,7 +49,6 @@ qtests_i386 = \
qtests_pci + \
['fdc-test',
'ide-test',
'ahci-test',
'hd-geo-test',
'boot-order-test',
'bios-tables-test',

View File

@ -554,6 +554,9 @@ static void sigabrt_handler(int signo)
static void setup_sigabrt_handler(void)
{
#ifdef _WIN32
signal(SIGABRT, sigabrt_handler);
#else
struct sigaction sigact;
sigact = (struct sigaction) {
@ -562,6 +565,7 @@ static void setup_sigabrt_handler(void)
};
sigemptyset(&sigact.sa_mask);
sigaction(SIGABRT, &sigact, NULL);
#endif
}
int main(int argc, char **argv)

View File

@ -23,6 +23,8 @@
#include "qapi/error.h"
#include "qemu/filemonitor.h"
#include <glib/gstdio.h>
#include <utime.h>
enum {
@ -617,7 +619,7 @@ test_file_monitor_events(void)
if (debug) {
g_printerr("Mkdir %s\n", pathsrc);
}
if (mkdir(pathsrc, 0700) < 0) {
if (g_mkdir_with_parents(pathsrc, 0700) < 0) {
g_printerr("Unable to mkdir %s: %s",
pathsrc, strerror(errno));
goto cleanup;

View File

@ -881,8 +881,8 @@ static gint interval_cmp(gconstpointer a, gconstpointer b, gpointer user_data)
/* ID comparison function */
static gint int_cmp(gconstpointer a, gconstpointer b, gpointer user_data)
{
uint ua = GPOINTER_TO_UINT(a);
uint ub = GPOINTER_TO_UINT(b);
guint ua = GPOINTER_TO_UINT(a);
guint ub = GPOINTER_TO_UINT(b);
return (ua > ub) - (ua < ub);
}

View File

@ -179,6 +179,10 @@ static int max_priority;
static int glib_pollfds_idx;
static int glib_n_poll_fds;
void qemu_fd_register(int fd)
{
}
static void glib_pollfds_fill(int64_t *cur_timeout)
{
GMainContext *context = g_main_context_default();