* [PULL v2 00/15] Cirrus-CI improvements, and other CI-related fixes, m68k
@ 2020-09-02 15:49 Thomas Huth
2020-09-02 15:49 ` [PULL v2 01/15] configure: Fix atomic64 test for --enable-werror on macOS Thomas Huth
` (15 more replies)
0 siblings, 16 replies; 21+ messages in thread
From: Thomas Huth @ 2020-09-02 15:49 UTC (permalink / raw)
To: qemu-devel, Peter Maydell
Hi Peter,
the following changes since commit 887adde81d1f1f3897f1688d37ec6851b4fdad86:
Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging (2020-09-01 22:50:23 +0100)
are available in the Git repository at:
https://gitlab.com/huth/qemu.git tags/pull-request-2020-09-02
for you to fetch changes up to 5e560e07ca396e16150740ae3c46b35a85f59ba7:
gitlab-ci.yml: Set artifacts expiration time (2020-09-02 16:23:55 +0200)
----------------------------------------------------------------
* Cirrus-CI improvements and fixes (compile with -Werror & fix for 1h problem)
* Two build system fixes to fix some failures the CI
* One m68k QOMification patch
* Some trivial qtest patches
* Some small improvements for the Gitlab CI
----------------------------------------------------------------
Gerd Hoffmann (1):
meson: fix keymaps without qemu-keymap
Markus Armbruster (1):
libqtest: Rename qmp_assert_error_class() to qmp_expect_error_and_unref()
Philippe Mathieu-Daudé (3):
tests/qtest/ahci: Improve error handling (NEGATIVE_RETURNS)
tests/qtest/tpm: Declare input buffers const and static
tests/qtest/ipmi-kcs: Fix assert side-effect
Thomas Huth (10):
configure: Fix atomic64 test for --enable-werror on macOS
cirrus.yml: Compile FreeBSD with -Werror
cirrus.yml: Compile macOS with -Werror
cirrus.yml: Update the macOS jobs to Catalina
cirrus.yml: Split FreeBSD job into two parts
configure: Add system = 'linux' for meson when cross-compiling
hw/m68k: QOMify the mcf5206 system integration module
gitlab/travis: Rework the disabled features tests
gitlab-ci.yml: Run check-qtest and check-unit at the end of the fuzzer job
gitlab-ci.yml: Set artifacts expiration time
.cirrus.yml | 43 ++++++++++++++++++++++++++++++++----------
.gitlab-ci.yml | 36 ++++++++++++++++++++++++++---------
.travis.yml | 6 ------
configure | 13 ++++++++-----
hw/m68k/an5206.c | 14 ++++++++++++--
hw/m68k/mcf5206.c | 44 ++++++++++++++++++++++++++++++++++---------
include/hw/m68k/mcf.h | 3 +--
pc-bios/keymaps/meson.build | 28 ++++++++++++++++++---------
tests/qtest/ahci-test.c | 1 +
tests/qtest/drive_del-test.c | 2 +-
tests/qtest/ipmi-kcs-test.c | 3 ++-
tests/qtest/libqos/libqtest.h | 4 ++--
tests/qtest/libqtest.c | 2 +-
tests/qtest/qmp-cmd-test.c | 16 ++++++++--------
tests/qtest/qmp-test.c | 32 +++++++++++++++----------------
tests/qtest/tpm-tests.c | 4 ++--
tests/qtest/tpm-util.c | 10 +++++-----
tests/test-qga.c | 2 +-
18 files changed, 174 insertions(+), 89 deletions(-)
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PULL v2 01/15] configure: Fix atomic64 test for --enable-werror on macOS
2020-09-02 15:49 [PULL v2 00/15] Cirrus-CI improvements, and other CI-related fixes, m68k Thomas Huth
@ 2020-09-02 15:49 ` Thomas Huth
2020-09-02 15:49 ` [PULL v2 02/15] cirrus.yml: Compile FreeBSD with -Werror Thomas Huth
` (14 subsequent siblings)
15 siblings, 0 replies; 21+ messages in thread
From: Thomas Huth @ 2020-09-02 15:49 UTC (permalink / raw)
To: qemu-devel, Peter Maydell
When using --enable-werror for the macOS builders in the Cirrus-CI,
the atomic64 test is currently failing, and config.log shows a bunch
of error messages like this:
config-temp/qemu-conf.c:6:7: error: implicit declaration of function
'__atomic_load_8' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
y = __atomic_load_8(&x, 0);
^
config-temp/qemu-conf.c:6:7: error: this function declaration is not a
prototype [-Werror,-Wstrict-prototypes]
Seems like these __atomic_*_8 functions are available in one of the
libraries there, so that the test links and passes there when not
using --enable-werror. But there does not seem to be a valid prototype
for them in any of the header files, so that the test fails when using
--enable-werror.
Fix it by using the "official" built-in functions instead (see e.g.
https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html).
We are not using the *_8 variants in QEMU anyway.
Suggested-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Reviewed-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20200728074405.13118-2-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
configure | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/configure b/configure
index 8a3acef89d..5645575688 100755
--- a/configure
+++ b/configure
@@ -5755,11 +5755,11 @@ int main(void)
{
uint64_t x = 0, y = 0;
#ifdef __ATOMIC_RELAXED
- y = __atomic_load_8(&x, 0);
- __atomic_store_8(&x, y, 0);
- __atomic_compare_exchange_8(&x, &y, x, 0, 0, 0);
- __atomic_exchange_8(&x, y, 0);
- __atomic_fetch_add_8(&x, y, 0);
+ y = __atomic_load_n(&x, __ATOMIC_RELAXED);
+ __atomic_store_n(&x, y, __ATOMIC_RELAXED);
+ __atomic_compare_exchange_n(&x, &y, x, 0, __ATOMIC_RELAXED, __ATOMIC_RELAXED);
+ __atomic_exchange_n(&x, y, __ATOMIC_RELAXED);
+ __atomic_fetch_add(&x, y, __ATOMIC_RELAXED);
#else
typedef char is_host64[sizeof(void *) >= sizeof(uint64_t) ? 1 : -1];
__sync_lock_test_and_set(&x, y);
--
2.18.2
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PULL v2 02/15] cirrus.yml: Compile FreeBSD with -Werror
2020-09-02 15:49 [PULL v2 00/15] Cirrus-CI improvements, and other CI-related fixes, m68k Thomas Huth
2020-09-02 15:49 ` [PULL v2 01/15] configure: Fix atomic64 test for --enable-werror on macOS Thomas Huth
@ 2020-09-02 15:49 ` Thomas Huth
2020-09-02 15:49 ` [PULL v2 03/15] cirrus.yml: Compile macOS " Thomas Huth
` (13 subsequent siblings)
15 siblings, 0 replies; 21+ messages in thread
From: Thomas Huth @ 2020-09-02 15:49 UTC (permalink / raw)
To: qemu-devel, Peter Maydell
Compiler warnings currently go unnoticed in our FreeBSD builds, since
-Werror is only enabled for Linux and MinGW builds by default. So let's
enable them here now, too.
Reviewed-by: Ed Maste <emaste@freebsd.org>
Message-Id: <20200728074405.13118-3-thuth@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
.cirrus.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.cirrus.yml b/.cirrus.yml
index f287d23c5b..b50da72eec 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -12,7 +12,7 @@ freebsd_12_task:
script:
- mkdir build
- cd build
- - ../configure || { cat config.log; exit 1; }
+ - ../configure --enable-werror || { cat config.log; exit 1; }
- gmake -j8
- gmake V=1 check
--
2.18.2
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PULL v2 03/15] cirrus.yml: Compile macOS with -Werror
2020-09-02 15:49 [PULL v2 00/15] Cirrus-CI improvements, and other CI-related fixes, m68k Thomas Huth
2020-09-02 15:49 ` [PULL v2 01/15] configure: Fix atomic64 test for --enable-werror on macOS Thomas Huth
2020-09-02 15:49 ` [PULL v2 02/15] cirrus.yml: Compile FreeBSD with -Werror Thomas Huth
@ 2020-09-02 15:49 ` Thomas Huth
2020-09-02 15:49 ` [PULL v2 04/15] cirrus.yml: Update the macOS jobs to Catalina Thomas Huth
` (12 subsequent siblings)
15 siblings, 0 replies; 21+ messages in thread
From: Thomas Huth @ 2020-09-02 15:49 UTC (permalink / raw)
To: qemu-devel, Peter Maydell
Compiler warnings currently go unnoticed in our macOS builds, since -Werror
is only enabled for Linux and MinGW builds by default. So let's enable them
here now, too.
Unfortunately, the sasl header is marked as deprecated in the macOS headers
and thus generates a lot of deprecation warnings. Thus we have to also use
-Wno-error=deprecated-declarations to be able to compile the code here.
Message-Id: <20200728074405.13118-4-thuth@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
.cirrus.yml | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/.cirrus.yml b/.cirrus.yml
index b50da72eec..86a059c12f 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -24,7 +24,9 @@ macos_task:
script:
- mkdir build
- cd build
- - ../configure --python=/usr/local/bin/python3 || { cat config.log; exit 1; }
+ - ../configure --python=/usr/local/bin/python3 --enable-werror
+ --extra-cflags='-Wno-error=deprecated-declarations'
+ || { cat config.log; exit 1; }
- gmake -j$(sysctl -n hw.ncpu)
- gmake check
@@ -37,6 +39,7 @@ macos_xcode_task:
script:
- mkdir build
- cd build
- - ../configure --cc=clang || { cat config.log; exit 1; }
+ - ../configure --extra-cflags='-Wno-error=deprecated-declarations'
+ --enable-werror --cc=clang || { cat config.log; exit 1; }
- gmake -j$(sysctl -n hw.ncpu)
- gmake check
--
2.18.2
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PULL v2 04/15] cirrus.yml: Update the macOS jobs to Catalina
2020-09-02 15:49 [PULL v2 00/15] Cirrus-CI improvements, and other CI-related fixes, m68k Thomas Huth
` (2 preceding siblings ...)
2020-09-02 15:49 ` [PULL v2 03/15] cirrus.yml: Compile macOS " Thomas Huth
@ 2020-09-02 15:49 ` Thomas Huth
2020-09-02 15:49 ` [PULL v2 05/15] cirrus.yml: Split FreeBSD job into two parts Thomas Huth
` (11 subsequent siblings)
15 siblings, 0 replies; 21+ messages in thread
From: Thomas Huth @ 2020-09-02 15:49 UTC (permalink / raw)
To: qemu-devel, Peter Maydell
When looking at the CI jobs on cirrus-ci.com, it seems like the mojave-based
images have been decomissioned a while ago already, since apparently all our
jobs get automatically upgraded to catalina. So let's update our YML script
accordingly to avoid confusion.
Reviewed-by: Ed Maste <emaste@freebsd.org>
Message-Id: <20200728074405.13118-5-thuth@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
.cirrus.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.cirrus.yml b/.cirrus.yml
index 86a059c12f..0742aaf8a3 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -18,7 +18,7 @@ freebsd_12_task:
macos_task:
osx_instance:
- image: mojave-base
+ image: catalina-base
install_script:
- brew install pkg-config python gnu-sed glib pixman make sdl2 bash
script:
@@ -33,7 +33,7 @@ macos_task:
macos_xcode_task:
osx_instance:
# this is an alias for the latest Xcode
- image: mojave-xcode
+ image: catalina-xcode
install_script:
- brew install pkg-config gnu-sed glib pixman make sdl2 bash
script:
--
2.18.2
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PULL v2 05/15] cirrus.yml: Split FreeBSD job into two parts
2020-09-02 15:49 [PULL v2 00/15] Cirrus-CI improvements, and other CI-related fixes, m68k Thomas Huth
` (3 preceding siblings ...)
2020-09-02 15:49 ` [PULL v2 04/15] cirrus.yml: Update the macOS jobs to Catalina Thomas Huth
@ 2020-09-02 15:49 ` Thomas Huth
2020-09-02 15:49 ` [PULL v2 06/15] meson: fix keymaps without qemu-keymap Thomas Huth
` (10 subsequent siblings)
15 siblings, 0 replies; 21+ messages in thread
From: Thomas Huth @ 2020-09-02 15:49 UTC (permalink / raw)
To: qemu-devel, Peter Maydell
The FreeBSD jobs currently hit the 1h time limit in the Cirrus-CI.
We have to split the build targets here to make sure that the job
finishes in time again. According to the Cirrus-CI docs and some
tests that I did, it also seems like the total amount of CPUs that
can be used for FreeBSD jobs is limited to 8, so each job now only
gets 4 CPUs. That increases the compilation time of each job a little
bit, but it still seems to be better to run two jobs with 4 CPUs each
in parallel than to run two jobs with 8 CPUs sequentially.
Message-Id: <20200831154405.229706-1-thuth@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
.cirrus.yml | 32 ++++++++++++++++++++++++++------
1 file changed, 26 insertions(+), 6 deletions(-)
diff --git a/.cirrus.yml b/.cirrus.yml
index 0742aaf8a3..3dd9fcff7f 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -1,20 +1,40 @@
env:
CIRRUS_CLONE_DEPTH: 1
-freebsd_12_task:
+freebsd_1st_task:
freebsd_instance:
image_family: freebsd-12-1
- cpu: 8
- memory: 8G
+ cpu: 4
+ memory: 4G
install_script: ASSUME_ALWAYS_YES=yes pkg bootstrap -f ; pkg install -y
bash curl cyrus-sasl git glib gmake gnutls gsed
nettle perl5 pixman pkgconf png usbredir
script:
- mkdir build
- cd build
- - ../configure --enable-werror || { cat config.log; exit 1; }
- - gmake -j8
- - gmake V=1 check
+ - ../configure --disable-user --target-list-exclude='alpha-softmmu
+ ppc64-softmmu ppc-softmmu riscv32-softmmu riscv64-softmmu s390x-softmmu
+ sparc64-softmmu sparc-softmmu x86_64-softmmu i386-softmmu'
+ --enable-werror || { cat config.log; exit 1; }
+ - gmake -j$(sysctl -n hw.ncpu)
+ - gmake -j$(sysctl -n hw.ncpu) check
+
+freebsd_2nd_task:
+ freebsd_instance:
+ image_family: freebsd-12-1
+ cpu: 4
+ memory: 4G
+ install_script: ASSUME_ALWAYS_YES=yes pkg bootstrap -f ; pkg install -y
+ bash curl cyrus-sasl git glib gmake gnutls gtk3 gsed libepoxy mesa-libs
+ nettle perl5 pixman pkgconf png SDL2 usbredir
+ script:
+ - ./configure --enable-werror --target-list='alpha-softmmu ppc64-softmmu
+ ppc-softmmu riscv32-softmmu riscv64-softmmu s390x-softmmu
+ sparc64-softmmu sparc-softmmu x86_64-softmmu i386-softmmu
+ sparc-bsd-user sparc64-bsd-user x86_64-bsd-user i386-bsd-user'
+ || { cat config.log; exit 1; }
+ - gmake -j$(sysctl -n hw.ncpu)
+ - gmake -j$(sysctl -n hw.ncpu) check
macos_task:
osx_instance:
--
2.18.2
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PULL v2 06/15] meson: fix keymaps without qemu-keymap
2020-09-02 15:49 [PULL v2 00/15] Cirrus-CI improvements, and other CI-related fixes, m68k Thomas Huth
` (4 preceding siblings ...)
2020-09-02 15:49 ` [PULL v2 05/15] cirrus.yml: Split FreeBSD job into two parts Thomas Huth
@ 2020-09-02 15:49 ` Thomas Huth
2020-09-02 15:49 ` [PULL v2 07/15] configure: Add system = 'linux' for meson when cross-compiling Thomas Huth
` (9 subsequent siblings)
15 siblings, 0 replies; 21+ messages in thread
From: Thomas Huth @ 2020-09-02 15:49 UTC (permalink / raw)
To: qemu-devel, Peter Maydell
From: Gerd Hoffmann <kraxel@redhat.com>
In case the qemu-keymap tool generating them is neither installed on the
system nor built from sources (due to xkbcommon not being available)
qemu will not find the keymaps when started directly from the build
tree,
This happens because commit ddcf607fa3d6 ("meson: drop keymaps symlink")
removed the symlink to the source tree, and the special handling for
install doesn't help in case we do not install qemu.
Lets fix that by simply copying over the file from the source tree as
fallback.
Reported-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20200827102617.14448-1-kraxel@redhat.com>
[thuth: Rebased, changed "config_host['qemu_datadir']" to "qemu_datadir"]
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
pc-bios/keymaps/meson.build | 28 +++++++++++++++++++---------
1 file changed, 19 insertions(+), 9 deletions(-)
diff --git a/pc-bios/keymaps/meson.build b/pc-bios/keymaps/meson.build
index bbac83ece3..2e2e0dfa3b 100644
--- a/pc-bios/keymaps/meson.build
+++ b/pc-bios/keymaps/meson.build
@@ -38,19 +38,29 @@ if meson.is_cross_build() or 'CONFIG_XKBCOMMON' not in config_host
else
native_qemu_keymap = qemu_keymap
endif
+
t = []
foreach km, args: keymaps
- t += custom_target(km,
- build_by_default: true,
- output: km,
- command: [native_qemu_keymap, '-f', '@OUTPUT@', args.split()],
- install_dir: qemu_datadir / 'keymaps')
+ if native_qemu_keymap.found()
+ # generate with qemu-kvm
+ t += custom_target(km,
+ build_by_default: true,
+ output: km,
+ command: [native_qemu_keymap, '-f', '@OUTPUT@', args.split()],
+ install_dir: qemu_datadir / 'keymaps')
+ else
+ # copy from source tree
+ t += custom_target(km,
+ build_by_default: true,
+ input: km,
+ output: km,
+ command: ['cp', '@INPUT@', '@OUTPUT@'],
+ install_dir: qemu_datadir / 'keymaps')
+ endif
endforeach
-if t.length() > 0
+
+if native_qemu_keymap.found()
alias_target('update-keymaps', t)
-else
- # install from the source tree
- install_data(keymaps.keys(), install_dir: qemu_datadir / 'keymaps')
endif
install_data(['sl', 'sv'], install_dir: qemu_datadir / 'keymaps')
--
2.18.2
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PULL v2 07/15] configure: Add system = 'linux' for meson when cross-compiling
2020-09-02 15:49 [PULL v2 00/15] Cirrus-CI improvements, and other CI-related fixes, m68k Thomas Huth
` (5 preceding siblings ...)
2020-09-02 15:49 ` [PULL v2 06/15] meson: fix keymaps without qemu-keymap Thomas Huth
@ 2020-09-02 15:49 ` Thomas Huth
2020-09-02 15:49 ` [PULL v2 08/15] hw/m68k: QOMify the mcf5206 system integration module Thomas Huth
` (8 subsequent siblings)
15 siblings, 0 replies; 21+ messages in thread
From: Thomas Huth @ 2020-09-02 15:49 UTC (permalink / raw)
To: qemu-devel, Peter Maydell
Meson needs the "system = xyz" line when cross-compiling. We are already
adding a "system = 'windows'" for the MinGW cross-compilation case here,
so let's add a "system = 'linux'" now for Linux hosts, too.
Message-Id: <20200823111757.72002-2-thuth@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
configure | 3 +++
1 file changed, 3 insertions(+)
diff --git a/configure b/configure
index 5645575688..cc9af72358 100755
--- a/configure
+++ b/configure
@@ -8163,6 +8163,9 @@ if test -n "$cross_prefix"; then
?:*) pre_prefix=/ ;;
esac
fi
+ if test "$linux" = "yes" ; then
+ echo "system = 'linux'" >> $cross
+ fi
case "$ARCH" in
i386|x86_64)
echo "cpu_family = 'x86'" >> $cross
--
2.18.2
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PULL v2 08/15] hw/m68k: QOMify the mcf5206 system integration module
2020-09-02 15:49 [PULL v2 00/15] Cirrus-CI improvements, and other CI-related fixes, m68k Thomas Huth
` (6 preceding siblings ...)
2020-09-02 15:49 ` [PULL v2 07/15] configure: Add system = 'linux' for meson when cross-compiling Thomas Huth
@ 2020-09-02 15:49 ` Thomas Huth
2020-09-02 15:49 ` [PULL v2 09/15] tests/qtest/ahci: Improve error handling (NEGATIVE_RETURNS) Thomas Huth
` (7 subsequent siblings)
15 siblings, 0 replies; 21+ messages in thread
From: Thomas Huth @ 2020-09-02 15:49 UTC (permalink / raw)
To: qemu-devel, Peter Maydell
From: Thomas Huth <huth@tuxfamily.org>
The mcf5206 system integration module should be a proper device.
Let's finally QOMify it.
Signed-off-by: Thomas Huth <huth@tuxfamily.org>
Message-Id: <20200819065201.4045-1-huth@tuxfamily.org>
---
hw/m68k/an5206.c | 14 ++++++++++++--
hw/m68k/mcf5206.c | 44 ++++++++++++++++++++++++++++++++++---------
include/hw/m68k/mcf.h | 3 +--
3 files changed, 48 insertions(+), 13 deletions(-)
diff --git a/hw/m68k/an5206.c b/hw/m68k/an5206.c
index 846f4e40c6..673898b0ea 100644
--- a/hw/m68k/an5206.c
+++ b/hw/m68k/an5206.c
@@ -21,7 +21,17 @@
#define AN5206_MBAR_ADDR 0x10000000
#define AN5206_RAMBAR_ADDR 0x20000000
-/* Board init. */
+static void mcf5206_init(MemoryRegion *sysmem, uint32_t base)
+{
+ DeviceState *dev;
+ SysBusDevice *s;
+
+ dev = qdev_new(TYPE_MCF5206_MBAR);
+ s = SYS_BUS_DEVICE(dev);
+ sysbus_realize_and_unref(s, &error_fatal);
+
+ memory_region_add_subregion(sysmem, base, sysbus_mmio_get_region(s, 0));
+}
static void an5206_init(MachineState *machine)
{
@@ -51,7 +61,7 @@ static void an5206_init(MachineState *machine)
memory_region_init_ram(sram, NULL, "an5206.sram", 512, &error_fatal);
memory_region_add_subregion(address_space_mem, AN5206_RAMBAR_ADDR, sram);
- mcf5206_init(address_space_mem, AN5206_MBAR_ADDR, cpu);
+ mcf5206_init(address_space_mem, AN5206_MBAR_ADDR);
/* Load kernel. */
if (!kernel_filename) {
diff --git a/hw/m68k/mcf5206.c b/hw/m68k/mcf5206.c
index 94a37a1a46..51d2e0da1c 100644
--- a/hw/m68k/mcf5206.c
+++ b/hw/m68k/mcf5206.c
@@ -15,6 +15,7 @@
#include "qemu/timer.h"
#include "hw/ptimer.h"
#include "sysemu/sysemu.h"
+#include "hw/sysbus.h"
/* General purpose timer module. */
typedef struct {
@@ -159,6 +160,8 @@ static m5206_timer_state *m5206_timer_init(qemu_irq irq)
/* System Integration Module. */
typedef struct {
+ SysBusDevice parent_obj;
+
M68kCPU *cpu;
MemoryRegion iomem;
m5206_timer_state *timer[2];
@@ -174,6 +177,8 @@ typedef struct {
uint8_t uivr[2];
} m5206_mbar_state;
+#define MCF5206_MBAR(obj) OBJECT_CHECK(m5206_mbar_state, (obj), TYPE_MCF5206_MBAR)
+
/* Interrupt controller. */
static int m5206_find_pending_irq(m5206_mbar_state *s)
@@ -257,8 +262,10 @@ static void m5206_mbar_set_irq(void *opaque, int irq, int level)
/* System Integration Module. */
-static void m5206_mbar_reset(m5206_mbar_state *s)
+static void m5206_mbar_reset(DeviceState *dev)
{
+ m5206_mbar_state *s = MCF5206_MBAR(dev);
+
s->scr = 0xc0;
s->icr[1] = 0x04;
s->icr[2] = 0x08;
@@ -578,24 +585,43 @@ static const MemoryRegionOps m5206_mbar_ops = {
.endianness = DEVICE_NATIVE_ENDIAN,
};
-qemu_irq *mcf5206_init(MemoryRegion *sysmem, uint32_t base, M68kCPU *cpu)
+static void mcf5206_mbar_realize(DeviceState *dev, Error **errp)
{
- m5206_mbar_state *s;
+ m5206_mbar_state *s = MCF5206_MBAR(dev);
qemu_irq *pic;
- s = g_new0(m5206_mbar_state, 1);
-
memory_region_init_io(&s->iomem, NULL, &m5206_mbar_ops, s,
"mbar", 0x00001000);
- memory_region_add_subregion(sysmem, base, &s->iomem);
+ 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->cpu = cpu;
+ s->cpu = M68K_CPU(qemu_get_cpu(0));
+}
+
+static void mcf5206_mbar_class_init(ObjectClass *oc, void *data)
+{
+ DeviceClass *dc = DEVICE_CLASS(oc);
- m5206_mbar_reset(s);
- return pic;
+ set_bit(DEVICE_CATEGORY_MISC, dc->categories);
+ dc->desc = "MCF5206 system integration module";
+ dc->realize = mcf5206_mbar_realize;
+ dc->reset = m5206_mbar_reset;
}
+
+static const TypeInfo mcf5206_mbar_info = {
+ .name = TYPE_MCF5206_MBAR,
+ .parent = TYPE_SYS_BUS_DEVICE,
+ .instance_size = sizeof(m5206_mbar_state),
+ .class_init = mcf5206_mbar_class_init,
+};
+
+static void mcf5206_mbar_register_types(void)
+{
+ type_register_static(&mcf5206_mbar_info);
+}
+
+type_init(mcf5206_mbar_register_types)
diff --git a/include/hw/m68k/mcf.h b/include/hw/m68k/mcf.h
index 0db49c5e60..decf17ce42 100644
--- a/include/hw/m68k/mcf.h
+++ b/include/hw/m68k/mcf.h
@@ -18,7 +18,6 @@ qemu_irq *mcf_intc_init(struct MemoryRegion *sysmem,
M68kCPU *cpu);
/* mcf5206.c */
-qemu_irq *mcf5206_init(struct MemoryRegion *sysmem,
- uint32_t base, M68kCPU *cpu);
+#define TYPE_MCF5206_MBAR "mcf5206-mbar"
#endif
--
2.18.2
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PULL v2 09/15] tests/qtest/ahci: Improve error handling (NEGATIVE_RETURNS)
2020-09-02 15:49 [PULL v2 00/15] Cirrus-CI improvements, and other CI-related fixes, m68k Thomas Huth
` (7 preceding siblings ...)
2020-09-02 15:49 ` [PULL v2 08/15] hw/m68k: QOMify the mcf5206 system integration module Thomas Huth
@ 2020-09-02 15:49 ` Thomas Huth
2020-09-02 15:49 ` [PULL v2 10/15] tests/qtest/tpm: Declare input buffers const and static Thomas Huth
` (6 subsequent siblings)
15 siblings, 0 replies; 21+ messages in thread
From: Thomas Huth @ 2020-09-02 15:49 UTC (permalink / raw)
To: qemu-devel, Peter Maydell
From: Philippe Mathieu-Daudé <philmd@redhat.com>
Fix an error handling issue reported by Coverity:
/qemu/tests/qtest/ahci-test.c: 1452 in prepare_iso()
1444 int fd = mkstemp(cdrom_path);
>>> CID 1432375: Error handling issues (NEGATIVE_RETURNS)
>>> "fd" is passed to a parameter that cannot be negative.
1452 ret = write(fd, patt, size);
Reported-by: Coverity (CID 1432375)
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200902080552.159806-1-philmd@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/qtest/ahci-test.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/qtest/ahci-test.c b/tests/qtest/ahci-test.c
index ca4294f44f..5e1954852e 100644
--- a/tests/qtest/ahci-test.c
+++ b/tests/qtest/ahci-test.c
@@ -1443,6 +1443,7 @@ static int prepare_iso(size_t size, unsigned char **buf, char **name)
ssize_t ret;
int fd = mkstemp(cdrom_path);
+ g_assert(fd != -1);
g_assert(buf);
g_assert(name);
patt = g_malloc(size);
--
2.18.2
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PULL v2 10/15] tests/qtest/tpm: Declare input buffers const and static
2020-09-02 15:49 [PULL v2 00/15] Cirrus-CI improvements, and other CI-related fixes, m68k Thomas Huth
` (8 preceding siblings ...)
2020-09-02 15:49 ` [PULL v2 09/15] tests/qtest/ahci: Improve error handling (NEGATIVE_RETURNS) Thomas Huth
@ 2020-09-02 15:49 ` Thomas Huth
2020-09-02 15:49 ` [PULL v2 11/15] tests/qtest/ipmi-kcs: Fix assert side-effect Thomas Huth
` (5 subsequent siblings)
15 siblings, 0 replies; 21+ messages in thread
From: Thomas Huth @ 2020-09-02 15:49 UTC (permalink / raw)
To: qemu-devel, Peter Maydell
From: Philippe Mathieu-Daudé <philmd@redhat.com>
The functions using these arrays expect a "const unsigned char *"
argument, it is safe to declare these as 'static const'.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200902080909.161034-1-philmd@redhat.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/qtest/tpm-tests.c | 4 ++--
tests/qtest/tpm-util.c | 10 +++++-----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/tests/qtest/tpm-tests.c b/tests/qtest/tpm-tests.c
index a2f2838e15..70c80f8379 100644
--- a/tests/qtest/tpm-tests.c
+++ b/tests/qtest/tpm-tests.c
@@ -59,7 +59,7 @@ void tpm_test_swtpm_test(const char *src_tpm_path, tx_func *tx,
tpm_util_startup(s, tx);
tpm_util_pcrextend(s, tx);
- unsigned char tpm_pcrread_resp[] =
+ static const unsigned char tpm_pcrread_resp[] =
"\x80\x01\x00\x00\x00\x3e\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00"
"\x00\x01\x00\x0b\x03\x00\x04\x00\x00\x00\x00\x01\x00\x20\xf6\x85"
"\x98\xe5\x86\x8d\xe6\x8b\x97\x29\x99\x60\xf2\x71\x7d\x17\x67\x89"
@@ -107,7 +107,7 @@ void tpm_test_swtpm_migration_test(const char *src_tpm_path,
tpm_util_startup(src_qemu, tx);
tpm_util_pcrextend(src_qemu, tx);
- unsigned char tpm_pcrread_resp[] =
+ static const unsigned char tpm_pcrread_resp[] =
"\x80\x01\x00\x00\x00\x3e\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00"
"\x00\x01\x00\x0b\x03\x00\x04\x00\x00\x00\x00\x01\x00\x20\xf6\x85"
"\x98\xe5\x86\x8d\xe6\x8b\x97\x29\x99\x60\xf2\x71\x7d\x17\x67\x89"
diff --git a/tests/qtest/tpm-util.c b/tests/qtest/tpm-util.c
index e2b29ef0f8..3ed6c8548a 100644
--- a/tests/qtest/tpm-util.c
+++ b/tests/qtest/tpm-util.c
@@ -98,9 +98,9 @@ void tpm_util_tis_transfer(QTestState *s,
void tpm_util_startup(QTestState *s, tx_func *tx)
{
unsigned char buffer[1024];
- unsigned char tpm_startup[] =
+ static const unsigned char tpm_startup[] =
"\x80\x01\x00\x00\x00\x0c\x00\x00\x01\x44\x00\x00";
- unsigned char tpm_startup_resp[] =
+ static const unsigned char tpm_startup_resp[] =
"\x80\x01\x00\x00\x00\x0a\x00\x00\x00\x00";
tx(s, tpm_startup, sizeof(tpm_startup), buffer, sizeof(buffer));
@@ -112,14 +112,14 @@ void tpm_util_startup(QTestState *s, tx_func *tx)
void tpm_util_pcrextend(QTestState *s, tx_func *tx)
{
unsigned char buffer[1024];
- unsigned char tpm_pcrextend[] =
+ static const unsigned char tpm_pcrextend[] =
"\x80\x02\x00\x00\x00\x41\x00\x00\x01\x82\x00\x00\x00\x0a\x00\x00"
"\x00\x09\x40\x00\x00\x09\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00"
"\x0b\x74\x65\x73\x74\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
"\x00";
- unsigned char tpm_pcrextend_resp[] =
+ static const unsigned char tpm_pcrextend_resp[] =
"\x80\x02\x00\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
"\x01\x00\x00";
@@ -133,7 +133,7 @@ void tpm_util_pcrread(QTestState *s, tx_func *tx,
const unsigned char *exp_resp, size_t exp_resp_size)
{
unsigned char buffer[1024];
- unsigned char tpm_pcrread[] =
+ static const unsigned char tpm_pcrread[] =
"\x80\x01\x00\x00\x00\x14\x00\x00\x01\x7e\x00\x00\x00\x01\x00\x0b"
"\x03\x00\x04\x00";
--
2.18.2
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PULL v2 11/15] tests/qtest/ipmi-kcs: Fix assert side-effect
2020-09-02 15:49 [PULL v2 00/15] Cirrus-CI improvements, and other CI-related fixes, m68k Thomas Huth
` (9 preceding siblings ...)
2020-09-02 15:49 ` [PULL v2 10/15] tests/qtest/tpm: Declare input buffers const and static Thomas Huth
@ 2020-09-02 15:49 ` Thomas Huth
2020-09-02 15:49 ` [PULL v2 12/15] libqtest: Rename qmp_assert_error_class() to qmp_expect_error_and_unref() Thomas Huth
` (4 subsequent siblings)
15 siblings, 0 replies; 21+ messages in thread
From: Thomas Huth @ 2020-09-02 15:49 UTC (permalink / raw)
To: qemu-devel, Peter Maydell
From: Philippe Mathieu-Daudé <philmd@redhat.com>
Fix assert side-effect reported by Coverity:
/qemu/tests/qtest/ipmi-kcs-test.c: 84 in kcs_wait_obf()
83 while (IPMI_KCS_CMDREG_GET_OBF() == 0) {
>>> CID 1432368: Incorrect expression (ASSERT_SIDE_EFFECT)
>>> Argument "--count" of g_assert() has a side effect. The containing function might work differently in a non-debug build.
84 g_assert(--count != 0);
Reported-by: Coverity (CID 1432368)
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200902080801.160652-2-philmd@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/qtest/ipmi-kcs-test.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/qtest/ipmi-kcs-test.c b/tests/qtest/ipmi-kcs-test.c
index 693a6aacb5..fc0a918c8d 100644
--- a/tests/qtest/ipmi-kcs-test.c
+++ b/tests/qtest/ipmi-kcs-test.c
@@ -81,7 +81,8 @@ static void kcs_wait_obf(void)
{
unsigned int count = 1000;
while (IPMI_KCS_CMDREG_GET_OBF() == 0) {
- g_assert(--count != 0);
+ --count;
+ g_assert(count != 0);
}
}
--
2.18.2
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PULL v2 12/15] libqtest: Rename qmp_assert_error_class() to qmp_expect_error_and_unref()
2020-09-02 15:49 [PULL v2 00/15] Cirrus-CI improvements, and other CI-related fixes, m68k Thomas Huth
` (10 preceding siblings ...)
2020-09-02 15:49 ` [PULL v2 11/15] tests/qtest/ipmi-kcs: Fix assert side-effect Thomas Huth
@ 2020-09-02 15:49 ` Thomas Huth
2020-09-02 15:49 ` [PULL v2 13/15] gitlab/travis: Rework the disabled features tests Thomas Huth
` (3 subsequent siblings)
15 siblings, 0 replies; 21+ messages in thread
From: Thomas Huth @ 2020-09-02 15:49 UTC (permalink / raw)
To: qemu-devel, Peter Maydell
From: Markus Armbruster <armbru@redhat.com>
qmp_assert_error_class() does more than just assert: it also unrefs
the @rsp argument. Rename to qmp_expect_error_and_unref() to reduce
confusion.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20200902115733.1229537-1-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/qtest/drive_del-test.c | 2 +-
tests/qtest/libqos/libqtest.h | 4 ++--
tests/qtest/libqtest.c | 2 +-
tests/qtest/qmp-cmd-test.c | 16 ++++++++--------
tests/qtest/qmp-test.c | 32 ++++++++++++++++----------------
tests/test-qga.c | 2 +-
6 files changed, 29 insertions(+), 29 deletions(-)
diff --git a/tests/qtest/drive_del-test.c b/tests/qtest/drive_del-test.c
index 2ab11ad225..2d765865ce 100644
--- a/tests/qtest/drive_del-test.c
+++ b/tests/qtest/drive_del-test.c
@@ -103,7 +103,7 @@ static void test_after_failed_device_add(void)
" 'drive': 'drive0'"
"}}", driver);
g_assert(response);
- qmp_assert_error_class(response, "GenericError");
+ qmp_expect_error_and_unref(response, "GenericError");
/* Delete the drive */
drive_del(qts);
diff --git a/tests/qtest/libqos/libqtest.h b/tests/qtest/libqos/libqtest.h
index f5cf93c386..a6ee1654f2 100644
--- a/tests/qtest/libqos/libqtest.h
+++ b/tests/qtest/libqos/libqtest.h
@@ -704,13 +704,13 @@ void qtest_qmp_device_del(QTestState *qts, const char *id);
bool qmp_rsp_is_err(QDict *rsp);
/**
- * qmp_assert_error_class:
+ * qmp_expect_error_and_unref:
* @rsp: QMP response to check for error
* @class: an error class
*
* Assert the response has the given error class and discard @rsp.
*/
-void qmp_assert_error_class(QDict *rsp, const char *class);
+void qmp_expect_error_and_unref(QDict *rsp, const char *class);
/**
* qtest_probe_child:
diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c
index 26f1223642..58f58e1ece 100644
--- a/tests/qtest/libqtest.c
+++ b/tests/qtest/libqtest.c
@@ -1359,7 +1359,7 @@ bool qmp_rsp_is_err(QDict *rsp)
return !!error;
}
-void qmp_assert_error_class(QDict *rsp, const char *class)
+void qmp_expect_error_and_unref(QDict *rsp, const char *class)
{
QDict *error = qdict_get_qdict(rsp, "error");
diff --git a/tests/qtest/qmp-cmd-test.c b/tests/qtest/qmp-cmd-test.c
index f34e68858a..3109a9fe96 100644
--- a/tests/qtest/qmp-cmd-test.c
+++ b/tests/qtest/qmp-cmd-test.c
@@ -210,19 +210,19 @@ static void test_object_add_failure_modes(void)
resp = qtest_qmp(qts, "{'execute': 'object-add', 'arguments':"
" {'qom-type': 'memory-backend-ram', 'id': 'ram1' } }");
g_assert_nonnull(resp);
- qmp_assert_error_class(resp, "GenericError");
+ qmp_expect_error_and_unref(resp, "GenericError");
/* attempt to create an object without qom-type */
resp = qtest_qmp(qts, "{'execute': 'object-add', 'arguments':"
" {'id': 'ram1' } }");
g_assert_nonnull(resp);
- qmp_assert_error_class(resp, "GenericError");
+ qmp_expect_error_and_unref(resp, "GenericError");
/* attempt to delete an object that does not exist */
resp = qtest_qmp(qts, "{'execute': 'object-del', 'arguments':"
" {'id': 'ram1' } }");
g_assert_nonnull(resp);
- qmp_assert_error_class(resp, "GenericError");
+ qmp_expect_error_and_unref(resp, "GenericError");
/* attempt to create 2 objects with duplicate id */
resp = qtest_qmp(qts, "{'execute': 'object-add', 'arguments':"
@@ -236,7 +236,7 @@ static void test_object_add_failure_modes(void)
" {'qom-type': 'memory-backend-ram', 'id': 'ram1',"
" 'props': {'size': 1048576 } } }");
g_assert_nonnull(resp);
- qmp_assert_error_class(resp, "GenericError");
+ qmp_expect_error_and_unref(resp, "GenericError");
/* delete ram1 object */
resp = qtest_qmp(qts, "{'execute': 'object-del', 'arguments':"
@@ -251,7 +251,7 @@ static void test_object_add_failure_modes(void)
" 'props': {'size': '1048576' } } }");
g_assert_nonnull(resp);
/* now do it right */
- qmp_assert_error_class(resp, "GenericError");
+ qmp_expect_error_and_unref(resp, "GenericError");
resp = qtest_qmp(qts, "{'execute': 'object-add', 'arguments':"
" {'qom-type': 'memory-backend-ram', 'id': 'ram1',"
@@ -272,7 +272,7 @@ static void test_object_add_failure_modes(void)
" {'qom-type': 'memory-backend-ram',"
" 'props': {'size': 1048576 } } }");
g_assert_nonnull(resp);
- qmp_assert_error_class(resp, "GenericError");
+ qmp_expect_error_and_unref(resp, "GenericError");
/* now do it right */
resp = qtest_qmp(qts, "{'execute': 'object-add', 'arguments':"
@@ -294,7 +294,7 @@ static void test_object_add_failure_modes(void)
" {'qom-type': 'memory-backend-ram', 'id': 'ram1',"
" 'props': {'sized': 1048576 } } }");
g_assert_nonnull(resp);
- qmp_assert_error_class(resp, "GenericError");
+ qmp_expect_error_and_unref(resp, "GenericError");
/* now do it right */
resp = qtest_qmp(qts, "{'execute': 'object-add', 'arguments':"
@@ -321,7 +321,7 @@ static void test_object_add_failure_modes(void)
resp = qtest_qmp(qts, "{'execute': 'object-del', 'arguments':"
" {'id': 'ram1' } }");
g_assert_nonnull(resp);
- qmp_assert_error_class(resp, "GenericError");
+ qmp_expect_error_and_unref(resp, "GenericError");
qtest_quit(qts);
}
diff --git a/tests/qtest/qmp-test.c b/tests/qtest/qmp-test.c
index 5950c3ebbb..e1032c5a21 100644
--- a/tests/qtest/qmp-test.c
+++ b/tests/qtest/qmp-test.c
@@ -38,7 +38,7 @@ static void assert_recovered(QTestState *qts)
QDict *resp;
resp = qtest_qmp(qts, "{ 'execute': 'no-such-cmd' }");
- qmp_assert_error_class(resp, "CommandNotFound");
+ qmp_expect_error_and_unref(resp, "CommandNotFound");
}
static void test_malformed(QTestState *qts)
@@ -48,58 +48,58 @@ static void test_malformed(QTestState *qts)
/* syntax error */
qtest_qmp_send_raw(qts, "{]\n");
resp = qtest_qmp_receive(qts);
- qmp_assert_error_class(resp, "GenericError");
+ qmp_expect_error_and_unref(resp, "GenericError");
assert_recovered(qts);
/* lexical error: impossible byte outside string */
qtest_qmp_send_raw(qts, "{\xFF");
resp = qtest_qmp_receive(qts);
- qmp_assert_error_class(resp, "GenericError");
+ qmp_expect_error_and_unref(resp, "GenericError");
assert_recovered(qts);
/* lexical error: funny control character outside string */
qtest_qmp_send_raw(qts, "{\x01");
resp = qtest_qmp_receive(qts);
- qmp_assert_error_class(resp, "GenericError");
+ qmp_expect_error_and_unref(resp, "GenericError");
assert_recovered(qts);
/* lexical error: impossible byte in string */
qtest_qmp_send_raw(qts, "{'bad \xFF");
resp = qtest_qmp_receive(qts);
- qmp_assert_error_class(resp, "GenericError");
+ qmp_expect_error_and_unref(resp, "GenericError");
assert_recovered(qts);
/* lexical error: control character in string */
qtest_qmp_send_raw(qts, "{'execute': 'nonexistent', 'id':'\n");
resp = qtest_qmp_receive(qts);
- qmp_assert_error_class(resp, "GenericError");
+ qmp_expect_error_and_unref(resp, "GenericError");
assert_recovered(qts);
/* lexical error: interpolation */
qtest_qmp_send_raw(qts, "%%p");
resp = qtest_qmp_receive(qts);
- qmp_assert_error_class(resp, "GenericError");
+ qmp_expect_error_and_unref(resp, "GenericError");
assert_recovered(qts);
/* Not even a dictionary */
resp = qtest_qmp(qts, "null");
- qmp_assert_error_class(resp, "GenericError");
+ qmp_expect_error_and_unref(resp, "GenericError");
/* No "execute" key */
resp = qtest_qmp(qts, "{}");
- qmp_assert_error_class(resp, "GenericError");
+ qmp_expect_error_and_unref(resp, "GenericError");
/* "execute" isn't a string */
resp = qtest_qmp(qts, "{ 'execute': true }");
- qmp_assert_error_class(resp, "GenericError");
+ qmp_expect_error_and_unref(resp, "GenericError");
/* "arguments" isn't a dictionary */
resp = qtest_qmp(qts, "{ 'execute': 'no-such-cmd', 'arguments': [] }");
- qmp_assert_error_class(resp, "GenericError");
+ qmp_expect_error_and_unref(resp, "GenericError");
/* extra key */
resp = qtest_qmp(qts, "{ 'execute': 'no-such-cmd', 'extra': true }");
- qmp_assert_error_class(resp, "GenericError");
+ qmp_expect_error_and_unref(resp, "GenericError");
}
static void test_qmp_protocol(void)
@@ -121,7 +121,7 @@ static void test_qmp_protocol(void)
/* Test valid command before handshake */
resp = qtest_qmp(qts, "{ 'execute': 'query-version' }");
- qmp_assert_error_class(resp, "CommandNotFound");
+ qmp_expect_error_and_unref(resp, "CommandNotFound");
/* Test malformed commands before handshake */
test_malformed(qts);
@@ -134,7 +134,7 @@ static void test_qmp_protocol(void)
/* Test repeated handshake */
resp = qtest_qmp(qts, "{ 'execute': 'qmp_capabilities' }");
- qmp_assert_error_class(resp, "CommandNotFound");
+ qmp_expect_error_and_unref(resp, "CommandNotFound");
/* Test valid command */
resp = qtest_qmp(qts, "{ 'execute': 'query-version' }");
@@ -154,7 +154,7 @@ static void test_qmp_protocol(void)
/* Test command failure with 'id' */
resp = qtest_qmp(qts, "{ 'execute': 'human-monitor-command', 'id': 2 }");
g_assert_cmpint(qdict_get_int(resp, "id"), ==, 2);
- qmp_assert_error_class(resp, "GenericError");
+ qmp_expect_error_and_unref(resp, "GenericError");
qtest_quit(qts);
}
@@ -327,7 +327,7 @@ static void test_qmp_missing_any_arg(void)
resp = qtest_qmp(qts, "{'execute': 'qom-set', 'arguments':"
" { 'path': '/machine', 'property': 'rtc-time' } }");
g_assert_nonnull(resp);
- qmp_assert_error_class(resp, "GenericError");
+ qmp_expect_error_and_unref(resp, "GenericError");
qtest_quit(qts);
}
diff --git a/tests/test-qga.c b/tests/test-qga.c
index 4ac4c22109..65d7992edc 100644
--- a/tests/test-qga.c
+++ b/tests/test-qga.c
@@ -246,7 +246,7 @@ static void test_qga_invalid_oob(gconstpointer fix)
ret = qmp_fd(fixture->fd, "{'exec-oob': 'guest-ping'}");
g_assert_nonnull(ret);
- qmp_assert_error_class(ret, "GenericError");
+ qmp_expect_error_and_unref(ret, "GenericError");
}
static void test_qga_invalid_args(gconstpointer fix)
--
2.18.2
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PULL v2 13/15] gitlab/travis: Rework the disabled features tests
2020-09-02 15:49 [PULL v2 00/15] Cirrus-CI improvements, and other CI-related fixes, m68k Thomas Huth
` (11 preceding siblings ...)
2020-09-02 15:49 ` [PULL v2 12/15] libqtest: Rename qmp_assert_error_class() to qmp_expect_error_and_unref() Thomas Huth
@ 2020-09-02 15:49 ` Thomas Huth
2020-09-02 15:49 ` [PULL v2 14/15] gitlab-ci.yml: Run check-qtest and check-unit at the end of the fuzzer job Thomas Huth
` (2 subsequent siblings)
15 siblings, 0 replies; 21+ messages in thread
From: Thomas Huth @ 2020-09-02 15:49 UTC (permalink / raw)
To: qemu-devel, Peter Maydell
Let's focus on the gitlab-ci when testing the compilation with disabled
features, thus add more switches there (and while we're at it, sort them
also alphabetically). This should cover the test from the Travis CI now,
too, so that we can remove the now-redundant job from the Travis CI.
Message-Id: <20200806155306.13717-1-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
.gitlab-ci.yml | 26 +++++++++++++++++++-------
.travis.yml | 6 ------
2 files changed, 19 insertions(+), 13 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b7967b9a13..8ae3e31c3f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -190,13 +190,25 @@ build-disabled:
<<: *native_build_job_definition
variables:
IMAGE: fedora
- CONFIGURE_ARGS: --disable-rdma --disable-slirp --disable-curl
- --disable-capstone --disable-live-block-migration --disable-glusterfs
- --disable-replication --disable-coroutine-pool --disable-smartcard
- --disable-guest-agent --disable-curses --disable-libxml2 --disable-tpm
- --disable-qom-cast-debug --disable-spice --disable-vhost-vsock
- --disable-vhost-net --disable-vhost-crypto --disable-vhost-user
- TARGETS: i386-softmmu ppc64-softmmu mips64-softmmu i386-linux-user
+ 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
build-tcg-disabled:
diff --git a/.travis.yml b/.travis.yml
index 6695c0620f..1d0ade0a13 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -159,12 +159,6 @@ jobs:
- CONFIG="--enable-debug-tcg --disable-system"
- CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg"
-
- - name: "GCC some libs disabled (main-softmmu)"
- env:
- - CONFIG="--disable-linux-aio --disable-cap-ng --disable-attr --disable-brlapi --disable-libusb --disable-replication --target-list=${MAIN_SOFTMMU_TARGETS}"
-
-
# Module builds are mostly of interest to major distros
- name: "GCC modules (main-softmmu)"
env:
--
2.18.2
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PULL v2 14/15] gitlab-ci.yml: Run check-qtest and check-unit at the end of the fuzzer job
2020-09-02 15:49 [PULL v2 00/15] Cirrus-CI improvements, and other CI-related fixes, m68k Thomas Huth
` (12 preceding siblings ...)
2020-09-02 15:49 ` [PULL v2 13/15] gitlab/travis: Rework the disabled features tests Thomas Huth
@ 2020-09-02 15:49 ` Thomas Huth
2020-09-02 15:49 ` [PULL v2 15/15] gitlab-ci.yml: Set artifacts expiration time Thomas Huth
2020-09-02 20:19 ` [PULL v2 00/15] Cirrus-CI improvements, and other CI-related fixes, m68k Peter Maydell
15 siblings, 0 replies; 21+ messages in thread
From: Thomas Huth @ 2020-09-02 15:49 UTC (permalink / raw)
To: qemu-devel, Peter Maydell
The fuzzer job finishes quite early, so we can run the unit tests and
qtests with -fsanitize=address here without extending the total test time.
Message-Id: <20200831153228.229185-1-thuth@redhat.com>
Reviewed-by: Alexander Bulekov <alxndr@bu.edu>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
.gitlab-ci.yml | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 8ae3e31c3f..5f2964a85e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -255,13 +255,15 @@ build-oss-fuzz:
- mkdir build-oss-fuzz
- CC="clang" CXX="clang++" CFLAGS="-fsanitize=address"
./scripts/oss-fuzz/build.sh
+ - export ASAN_OPTIONS="fast_unwind_on_malloc=0"
- for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f
| grep -v slirp); do
grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ;
echo Testing ${fuzzer} ... ;
- ASAN_OPTIONS="fast_unwind_on_malloc=0"
- "${fuzzer}" -runs=1000 -seed=1 || exit 1 ;
+ "${fuzzer}" -runs=1000 -seed=1 || exit 1 ;
done
+ # Unrelated to fuzzer: run some tests with -fsanitize=address
+ - cd build-oss-fuzz && make check-qtest-i386 check-unit
build-tci:
<<: *native_build_job_definition
--
2.18.2
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PULL v2 15/15] gitlab-ci.yml: Set artifacts expiration time
2020-09-02 15:49 [PULL v2 00/15] Cirrus-CI improvements, and other CI-related fixes, m68k Thomas Huth
` (13 preceding siblings ...)
2020-09-02 15:49 ` [PULL v2 14/15] gitlab-ci.yml: Run check-qtest and check-unit at the end of the fuzzer job Thomas Huth
@ 2020-09-02 15:49 ` Thomas Huth
2020-09-02 20:19 ` [PULL v2 00/15] Cirrus-CI improvements, and other CI-related fixes, m68k Peter Maydell
15 siblings, 0 replies; 21+ messages in thread
From: Thomas Huth @ 2020-09-02 15:49 UTC (permalink / raw)
To: qemu-devel, Peter Maydell
The default expiration time for artifacts seems to be very high (30 days?).
Since we only need the artifacts to pass the binaries from one stage to
the next one, we can decrease the expiration time to avoid to spam the
file server too much. Two days should be enough in case someone still wants
to have a look after the pipeline finished.
Message-Id: <20200806161546.15325-1-thuth@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
.gitlab-ci.yml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5f2964a85e..ff959e4e03 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -74,6 +74,7 @@ build-system-ubuntu:
moxie-softmmu microblazeel-softmmu mips64el-softmmu
MAKE_CHECK_ARGS: check-build
artifacts:
+ expire_in: 2 days
paths:
- build
@@ -104,6 +105,7 @@ build-system-debian:
riscv64-softmmu sh4eb-softmmu sparc-softmmu xtensaeb-softmmu
MAKE_CHECK_ARGS: check-build
artifacts:
+ expire_in: 2 days
paths:
- build
@@ -134,6 +136,7 @@ build-system-fedora:
xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmu
MAKE_CHECK_ARGS: check-build
artifacts:
+ expire_in: 2 days
paths:
- build
@@ -164,6 +167,7 @@ build-system-centos:
x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu
MAKE_CHECK_ARGS: check-build
artifacts:
+ expire_in: 2 days
paths:
- build
--
2.18.2
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [PULL v2 00/15] Cirrus-CI improvements, and other CI-related fixes, m68k
2020-09-02 15:49 [PULL v2 00/15] Cirrus-CI improvements, and other CI-related fixes, m68k Thomas Huth
` (14 preceding siblings ...)
2020-09-02 15:49 ` [PULL v2 15/15] gitlab-ci.yml: Set artifacts expiration time Thomas Huth
@ 2020-09-02 20:19 ` Peter Maydell
2020-09-03 5:11 ` Thomas Huth
15 siblings, 1 reply; 21+ messages in thread
From: Peter Maydell @ 2020-09-02 20:19 UTC (permalink / raw)
To: Thomas Huth; +Cc: QEMU Developers
On Wed, 2 Sep 2020 at 16:49, Thomas Huth <thuth@redhat.com> wrote:
>
> Hi Peter,
>
> the following changes since commit 887adde81d1f1f3897f1688d37ec6851b4fdad86:
>
> Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging (2020-09-01 22:50:23 +0100)
>
> are available in the Git repository at:
>
> https://gitlab.com/huth/qemu.git tags/pull-request-2020-09-02
>
> for you to fetch changes up to 5e560e07ca396e16150740ae3c46b35a85f59ba7:
>
> gitlab-ci.yml: Set artifacts expiration time (2020-09-02 16:23:55 +0200)
>
> ----------------------------------------------------------------
> * Cirrus-CI improvements and fixes (compile with -Werror & fix for 1h problem)
> * Two build system fixes to fix some failures the CI
> * One m68k QOMification patch
> * Some trivial qtest patches
> * Some small improvements for the Gitlab CI
> ----------------------------------------------------------------
Failures on windows crossbuild and OSX:
Generating qemu-version.h with a meson_exe.py custom command
Generating ar with a custom command
cp: '../../pc-bios/keymaps/ar' and 'pc-bios/keymaps/ar' are the same file
Generating bepo with a custom command
cp: '../../pc-bios/keymaps/bepo' and 'pc-bios/keymaps/bepo' are the same file
Makefile.ninja:5177: recipe for target 'pc-bios/keymaps/ar.stamp' failed
make: *** [pc-bios/keymaps/ar.stamp] Error 1
make: *** Waiting for unfinished jobs....
Makefile.ninja:5179: recipe for target 'pc-bios/keymaps/bepo.stamp' failed
make: *** [pc-bios/keymaps/bepo.stamp] Error 1
Generating cz with a custom command
cp: '../../pc-bios/keymaps/cz' and 'pc-bios/keymaps/cz' are the same file
Makefile.ninja:5181: recipe for target 'pc-bios/keymaps/cz.stamp' failed
make: *** [pc-bios/keymaps/cz.stamp] Error 1
make: Leaving directory '/home/petmay01/qemu-for-merges/build/w64'
On x86 linux a lot of this kind of warning from meson:
../../pc-bios/keymaps/meson.build:58: WARNING: Custom target input
'ar' can't be converted to File object(s).
This will become a hard error in the future.
../../pc-bios/keymaps/meson.build:58: WARNING: Custom target input
'bepo' can't be converted to File object(s).
This will become a hard error in the future.
../../pc-bios/keymaps/meson.build:58: WARNING: Custom target input
'cz' can't be converted to File object(s).
This will become a hard error in the future.
and then a failure later on:
make[1]: Nothing to be done for 'all'.
make: *** No rule to make target '../../pc-bios/keymaps/ar', needed by
'pc-bios/keymaps/ar.stamp'. Stop.
make: *** Waiting for unfinished jobs....
This is the same set of errors I got from when Gerd put
the "meson: fix keymaps witout qemu-keymap" patch in his UI pullreq:
https://lists.gnu.org/archive/html/qemu-devel/2020-09/msg00149.html
so that seems like the problem.
thanks
-- PMM
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PULL v2 00/15] Cirrus-CI improvements, and other CI-related fixes, m68k
2020-09-02 20:19 ` [PULL v2 00/15] Cirrus-CI improvements, and other CI-related fixes, m68k Peter Maydell
@ 2020-09-03 5:11 ` Thomas Huth
2020-09-03 5:47 ` Gerd Hoffmann
0 siblings, 1 reply; 21+ messages in thread
From: Thomas Huth @ 2020-09-03 5:11 UTC (permalink / raw)
To: Peter Maydell; +Cc: QEMU Developers, Gerd Hoffmann
On 02/09/2020 22.19, Peter Maydell wrote:
> On Wed, 2 Sep 2020 at 16:49, Thomas Huth <thuth@redhat.com> wrote:
>>
>> Hi Peter,
>>
>> the following changes since commit 887adde81d1f1f3897f1688d37ec6851b4fdad86:
>>
>> Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging (2020-09-01 22:50:23 +0100)
>>
>> are available in the Git repository at:
>>
>> https://gitlab.com/huth/qemu.git tags/pull-request-2020-09-02
>>
>> for you to fetch changes up to 5e560e07ca396e16150740ae3c46b35a85f59ba7:
>>
>> gitlab-ci.yml: Set artifacts expiration time (2020-09-02 16:23:55 +0200)
>>
>> ----------------------------------------------------------------
>> * Cirrus-CI improvements and fixes (compile with -Werror & fix for 1h problem)
>> * Two build system fixes to fix some failures the CI
>> * One m68k QOMification patch
>> * Some trivial qtest patches
>> * Some small improvements for the Gitlab CI
>> ----------------------------------------------------------------
>
> Failures on windows crossbuild and OSX:
>
> Generating qemu-version.h with a meson_exe.py custom command
> Generating ar with a custom command
> cp: '../../pc-bios/keymaps/ar' and 'pc-bios/keymaps/ar' are the same file
> Generating bepo with a custom command
> cp: '../../pc-bios/keymaps/bepo' and 'pc-bios/keymaps/bepo' are the same file
> Makefile.ninja:5177: recipe for target 'pc-bios/keymaps/ar.stamp' failed
[...]
> This is the same set of errors I got from when Gerd put
> the "meson: fix keymaps witout qemu-keymap" patch in his UI pullreq:
> https://lists.gnu.org/archive/html/qemu-devel/2020-09/msg00149.html
> so that seems like the problem.
Darn. I've added Gerd's patch since it is needed to fix the acceptance
tests in the Gitlab-CI. Could we maybe revert the patch that introduced
the regression instead, as long as no other proper fix is available? The
failing CI is really bugging me.
Thomas
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PULL v2 00/15] Cirrus-CI improvements, and other CI-related fixes, m68k
2020-09-03 5:11 ` Thomas Huth
@ 2020-09-03 5:47 ` Gerd Hoffmann
2020-09-03 10:48 ` Peter Maydell
0 siblings, 1 reply; 21+ messages in thread
From: Gerd Hoffmann @ 2020-09-03 5:47 UTC (permalink / raw)
To: Thomas Huth; +Cc: Peter Maydell, QEMU Developers
Hi,
> Darn. I've added Gerd's patch since it is needed to fix the acceptance
> tests in the Gitlab-CI. Could we maybe revert the patch that introduced
> the regression instead, as long as no other proper fix is available? The
> failing CI is really bugging me.
Well, ddcf607fa3d6 fixes another nasty issue (builds modifying the
source tree), so reverting that isn't really an option.
We could have configure remove the symlink in case is present. That way
old build trees with the symlink already created should work too. Right
now only build trees created with ddcf607fa3d6 present are working
properly.
Untested patch below.
take care,
Gerd
diff --git a/configure b/configure
index b1e11397a827..493b4e86da62 100755
--- a/configure
+++ b/configure
@@ -8107,6 +8107,7 @@ LINKS="$LINKS .gdbinit scripts" # scripts needed by relative path in .gdbinit
LINKS="$LINKS tests/acceptance tests/data"
LINKS="$LINKS tests/qemu-iotests/check"
LINKS="$LINKS python"
+UNLINK="pc-bios/keymaps"
for bios_file in \
$source_path/pc-bios/*.bin \
$source_path/pc-bios/*.elf \
@@ -8127,6 +8128,11 @@ for f in $LINKS ; do
symlink "$source_path/$f" "$f"
fi
done
+for f in $UNLINK ; do
+ if [ -L "$f" ]; then
+ rm -f "$f"
+ fi
+done
(for i in $cross_cc_vars; do
export $i
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [PULL v2 00/15] Cirrus-CI improvements, and other CI-related fixes, m68k
2020-09-03 5:47 ` Gerd Hoffmann
@ 2020-09-03 10:48 ` Peter Maydell
2020-09-03 10:52 ` Thomas Huth
0 siblings, 1 reply; 21+ messages in thread
From: Peter Maydell @ 2020-09-03 10:48 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: Thomas Huth, QEMU Developers
On Thu, 3 Sep 2020 at 06:47, Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> Hi,
>
> > Darn. I've added Gerd's patch since it is needed to fix the acceptance
> > tests in the Gitlab-CI. Could we maybe revert the patch that introduced
> > the regression instead, as long as no other proper fix is available? The
> > failing CI is really bugging me.
>
> Well, ddcf607fa3d6 fixes another nasty issue (builds modifying the
> source tree), so reverting that isn't really an option.
>
> We could have configure remove the symlink in case is present. That way
> old build trees with the symlink already created should work too. Right
> now only build trees created with ddcf607fa3d6 present are working
> properly.
>
> Untested patch below.
>
> take care,
> Gerd
>
> diff --git a/configure b/configure
> index b1e11397a827..493b4e86da62 100755
> --- a/configure
> +++ b/configure
> @@ -8107,6 +8107,7 @@ LINKS="$LINKS .gdbinit scripts" # scripts needed by relative path in .gdbinit
> LINKS="$LINKS tests/acceptance tests/data"
> LINKS="$LINKS tests/qemu-iotests/check"
> LINKS="$LINKS python"
> +UNLINK="pc-bios/keymaps"
> for bios_file in \
> $source_path/pc-bios/*.bin \
> $source_path/pc-bios/*.elf \
> @@ -8127,6 +8128,11 @@ for f in $LINKS ; do
> symlink "$source_path/$f" "$f"
> fi
> done
> +for f in $UNLINK ; do
> + if [ -L "$f" ]; then
> + rm -f "$f"
> + fi
> +done
If this is for back-compat with old trees only we should add a
comment that documents that in the final version of this patch.
thanks
-- PMM
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PULL v2 00/15] Cirrus-CI improvements, and other CI-related fixes, m68k
2020-09-03 10:48 ` Peter Maydell
@ 2020-09-03 10:52 ` Thomas Huth
0 siblings, 0 replies; 21+ messages in thread
From: Thomas Huth @ 2020-09-03 10:52 UTC (permalink / raw)
To: Peter Maydell, Gerd Hoffmann; +Cc: QEMU Developers
On 03/09/2020 12.48, Peter Maydell wrote:
> On Thu, 3 Sep 2020 at 06:47, Gerd Hoffmann <kraxel@redhat.com> wrote:
>>
>> Hi,
>>
>>> Darn. I've added Gerd's patch since it is needed to fix the acceptance
>>> tests in the Gitlab-CI. Could we maybe revert the patch that introduced
>>> the regression instead, as long as no other proper fix is available? The
>>> failing CI is really bugging me.
>>
>> Well, ddcf607fa3d6 fixes another nasty issue (builds modifying the
>> source tree), so reverting that isn't really an option.
>>
>> We could have configure remove the symlink in case is present. That way
>> old build trees with the symlink already created should work too. Right
>> now only build trees created with ddcf607fa3d6 present are working
>> properly.
>>
>> Untested patch below.
>>
>> take care,
>> Gerd
>>
>> diff --git a/configure b/configure
>> index b1e11397a827..493b4e86da62 100755
>> --- a/configure
>> +++ b/configure
>> @@ -8107,6 +8107,7 @@ LINKS="$LINKS .gdbinit scripts" # scripts needed by relative path in .gdbinit
>> LINKS="$LINKS tests/acceptance tests/data"
>> LINKS="$LINKS tests/qemu-iotests/check"
>> LINKS="$LINKS python"
>> +UNLINK="pc-bios/keymaps"
>> for bios_file in \
>> $source_path/pc-bios/*.bin \
>> $source_path/pc-bios/*.elf \
>> @@ -8127,6 +8128,11 @@ for f in $LINKS ; do
>> symlink "$source_path/$f" "$f"
>> fi
>> done
>> +for f in $UNLINK ; do
>> + if [ -L "$f" ]; then
>> + rm -f "$f"
>> + fi
>> +done
>
> If this is for back-compat with old trees only we should add a
> comment that documents that in the final version of this patch.
Ok, I can try to respin my pull request with this patch and the
following comment added:
# UNLINK is used to remove symlinks from older development
# versions that might get into the way when doing "git update"
# without doing a "make distclean" in between.
Does that sound ok?
I wasn't able to reproduce the problem locally so far, so I hope it's ok
if I "abuse" your merge test for this, Peter?
Thomas
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2020-09-03 10:53 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-02 15:49 [PULL v2 00/15] Cirrus-CI improvements, and other CI-related fixes, m68k Thomas Huth
2020-09-02 15:49 ` [PULL v2 01/15] configure: Fix atomic64 test for --enable-werror on macOS Thomas Huth
2020-09-02 15:49 ` [PULL v2 02/15] cirrus.yml: Compile FreeBSD with -Werror Thomas Huth
2020-09-02 15:49 ` [PULL v2 03/15] cirrus.yml: Compile macOS " Thomas Huth
2020-09-02 15:49 ` [PULL v2 04/15] cirrus.yml: Update the macOS jobs to Catalina Thomas Huth
2020-09-02 15:49 ` [PULL v2 05/15] cirrus.yml: Split FreeBSD job into two parts Thomas Huth
2020-09-02 15:49 ` [PULL v2 06/15] meson: fix keymaps without qemu-keymap Thomas Huth
2020-09-02 15:49 ` [PULL v2 07/15] configure: Add system = 'linux' for meson when cross-compiling Thomas Huth
2020-09-02 15:49 ` [PULL v2 08/15] hw/m68k: QOMify the mcf5206 system integration module Thomas Huth
2020-09-02 15:49 ` [PULL v2 09/15] tests/qtest/ahci: Improve error handling (NEGATIVE_RETURNS) Thomas Huth
2020-09-02 15:49 ` [PULL v2 10/15] tests/qtest/tpm: Declare input buffers const and static Thomas Huth
2020-09-02 15:49 ` [PULL v2 11/15] tests/qtest/ipmi-kcs: Fix assert side-effect Thomas Huth
2020-09-02 15:49 ` [PULL v2 12/15] libqtest: Rename qmp_assert_error_class() to qmp_expect_error_and_unref() Thomas Huth
2020-09-02 15:49 ` [PULL v2 13/15] gitlab/travis: Rework the disabled features tests Thomas Huth
2020-09-02 15:49 ` [PULL v2 14/15] gitlab-ci.yml: Run check-qtest and check-unit at the end of the fuzzer job Thomas Huth
2020-09-02 15:49 ` [PULL v2 15/15] gitlab-ci.yml: Set artifacts expiration time Thomas Huth
2020-09-02 20:19 ` [PULL v2 00/15] Cirrus-CI improvements, and other CI-related fixes, m68k Peter Maydell
2020-09-03 5:11 ` Thomas Huth
2020-09-03 5:47 ` Gerd Hoffmann
2020-09-03 10:48 ` Peter Maydell
2020-09-03 10:52 ` Thomas Huth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).