Skip to contentSkip to conversation

qtest and misc patches

GIT PULL Applied Thomas Huth 2 participants 8 messages Nov 12, 2019 Kbuild

lore
Share & tools
lore
#1 lore raw

[PULL 1/6] qtest: fix qtest_qmp_device_add leak

In reply to Thomas Huth

From: Marc-André Lureau <[email protected]>

Spotted by ASAN.

Message-Id: <[email protected]>

Fixes b4510bb4109f5f ("tests: add qtest_qmp_device_add_qdict() helper")
---
 tests/libqtest.c | 1 +
 1 file changed, 1 insertion(+)
tests/libqtest.c +1 -0
index 3706bccd8d..91e9cb220c 100644
@@ -1274,6 +1274,7 @@ void qtest_qmp_device_add(QTestState *qts, const char *driver, const char *id,
     qdict_put_str(args, "id", id);
 
     qtest_qmp_device_add_qdict(qts, driver, args);
+    qobject_unref(args);
 }
 
 static void device_deleted_cb(void *opaque, const char *name, QDict *data)
Signature · 1 line
2.23.0
#2 lore raw

[PULL 6/6] configure: Check bzip2 is available

In reply to Thomas Huth

From: Philippe Mathieu-Daudé <[email protected]>

The bzip2 tool is not included in default installations. On freshly installed systems, ./configure succeeds but 'make' might fail later:

    BUNZIP2 pc-bios/edk2-i386-secure-code.fd.bz2

/bin/sh: bzip2: command not found
make: *** [Makefile:305: pc-bios/edk2-i386-secure-code.fd] Error 127
make: *** Deleting file 'pc-bios/edk2-i386-secure-code.fd'
make: *** Waiting for unfinished jobs....

Add a check in ./configure to warn the user if bzip2 is missing.

See also: 536d2173b2b ("roms: build edk2 firmware binaries ...")

Message-Id: <[email protected]>

---
 configure | 4 ++++
 1 file changed, 4 insertions(+)
configure +4 -0
index 9b322284c3..6099be1d84 100755
@@ -2154,6 +2154,10 @@ for target in $target_list; do
       ;;
   esac
 done
+# The EDK2 binaries are compressed with bzip2
+if test "$edk2_blobs" = "yes" && ! has bzip2; then
+  error_exit "The bzip2 program is required for building QEMU"
+fi
 
 feature_not_found() {
   feature=$1
Signature · 1 line
2.23.0
#3 lore raw

[PULL 2/6] cpu-plug-test: fix leaks

In reply to Thomas Huth

From: Marc-André Lureau <[email protected]>

Spotted by ASAN.

Message-Id: <[email protected]>

Fixes 021a007efc3 ("cpu-plug-test: fix device_add for pc/q35 machines")
---
 tests/cpu-plug-test.c | 2 ++
 1 file changed, 2 insertions(+)
tests/cpu-plug-test.c +2 -0
index 058cef5ac1..30e514bbfb 100644
@@ -99,6 +99,7 @@ static void test_plug_with_device_add(gconstpointer data)
 
         cpu = qobject_to(QDict, e);
         if (qdict_haskey(cpu, "qom-path")) {
+            qobject_unref(e);
             continue;
         }
 
@@ -107,6 +108,7 @@ static void test_plug_with_device_add(gconstpointer data)
 
         qtest_qmp_device_add_qdict(qts, td->device_model, props);
         hotplugged++;
+        qobject_unref(e);
     }
 
     /* make sure that there were hotplugged CPUs */
Signature · 1 line
2.23.0
#4 lore raw

[PULL 4/6] tests/migration: Print some debug on bad status

In reply to Thomas Huth

From: "Dr. David Alan Gilbert" <[email protected]>

We're seeing occasional asserts in 'wait_for_migraiton_fail', that I can't reliably reproduce, and where the cores don't have any useful state. Print the 'status' out, so we can see which unexpected state we're ending up in.

Message-Id: <[email protected]>

---
 tests/migration-test.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
tests/migration-test.c +7 -2
index 59f291c654..ac780dffda 100644
@@ -899,8 +899,13 @@ static void wait_for_migration_fail(QTestState *from, bool allow_active)
 
     do {
         status = migrate_query_status(from);
-        g_assert(!strcmp(status, "setup") || !strcmp(status, "failed") ||
-                 (allow_active && !strcmp(status, "active")));
+        bool result = !strcmp(status, "setup") || !strcmp(status, "failed") ||
+                 (allow_active && !strcmp(status, "active"));
+        if (!result) {
+            fprintf(stderr, "%s: unexpected status status=%s allow_active=%d\n",
+                    __func__, status, allow_active);
+        }
+        g_assert(result);
         failed = !strcmp(status, "failed");
         g_free(status);
     } while (!failed);
Signature · 1 line
2.23.0
#5 lore raw

[PULL 3/6] MAINTAINERS: slirp: Remove myself as maintainer

In reply to Thomas Huth

From: Jan Kiszka <[email protected]>

I haven't been doing anything here for a long time, nor does my git repo still play a role.

Message-Id: <[email protected]>

---
 MAINTAINERS | 2 --
 1 file changed, 2 deletions(-)
MAINTAINERS +0 -2
index 363e72a467..ff8d0d29f4 100644
@@ -2143,13 +2143,11 @@ F: include/hw/registerfields.h
 
 SLIRP
 M: Samuel Thibault <[email protected]>
-M: Jan Kiszka <[email protected]>
 S: Maintained
 F: slirp/
 F: net/slirp.c
 F: include/net/slirp.h
 T: git https://people.debian.org/~sthibault/qemu.git slirp
-T: git git://git.kiszka.org/qemu.git queues/slirp
 
 Stubs
 M: Paolo Bonzini <[email protected]>
Signature · 1 line
2.23.0
#6 lore raw

[PULL 5/6] configure: Only decompress EDK2 blobs for X86/ARM targets

In reply to Thomas Huth

From: Philippe Mathieu-Daudé <[email protected]>

The EDK2 firmware blobs only target the X86/ARM architectures. Define the DECOMPRESS_EDK2_BLOBS variable and only decompress the blobs when the variable exists.

See also: 536d2173b2b ("roms: build edk2 firmware binaries ...")

Message-Id: <[email protected]>

---
 Makefile  |  2 ++
 configure | 13 +++++++++++++
 2 files changed, 15 insertions(+)
Makefile +2 -0
index aa9d1a42aa..3430eca532 100644
@@ -480,7 +480,9 @@ $(SOFTMMU_ALL_RULES): $(chardev-obj-y)
 $(SOFTMMU_ALL_RULES): $(crypto-obj-y)
 $(SOFTMMU_ALL_RULES): $(io-obj-y)
 $(SOFTMMU_ALL_RULES): config-all-devices.mak
+ifdef DECOMPRESS_EDK2_BLOBS
 $(SOFTMMU_ALL_RULES): $(edk2-decompressed)
+endif
 
 .PHONY: $(TARGET_DIRS_RULES)
 # The $(TARGET_DIRS_RULES) are of the form SUBDIR/GOAL, so that
configure +13 -0
index efe165edf9..9b322284c3 100755
@@ -427,6 +427,7 @@ softmmu="yes"
 linux_user="no"
 bsd_user="no"
 blobs="yes"
+edk2_blobs="no"
 pkgversion=""
 pie=""
 qom_cast_debug="yes"
@@ -2146,6 +2147,14 @@ case " $target_list " in
   ;;
 esac
 
+for target in $target_list; do
+  case "$target" in
+    arm-softmmu | aarch64-softmmu | i386-softmmu | x86_64-softmmu)
+      edk2_blobs="yes"
+      ;;
+  esac
+done
+
 feature_not_found() {
   feature=$1
   remedy=$2
@@ -7526,6 +7535,10 @@ if test "$libudev" != "no"; then
     echo "LIBUDEV_LIBS=$libudev_libs" >> $config_host_mak
 fi
 
+if test "$edk2_blobs" = "yes" ; then
+  echo "DECOMPRESS_EDK2_BLOBS=y" >> $config_host_mak
+fi
+
 # use included Linux headers
 if test "$linux" = "yes" ; then
   mkdir -p linux-headers
Signature · 1 line
2.23.0
#0 lore raw

Hi Peter,

the following changes since commit 654efcb511d394c1d3f5292c28503d1d19e5b1d3:

Merge remote-tracking branch 'remotes/vivier/tags/q800-branch-pull-request' into staging (2019-11-11 09:23:46 +0000)

are available in the Git repository at:

https://gitlab.com/huth/qemu.git tags/pull-request-2019-11-12

for you to fetch changes up to 623ef637a2e42e023e7436d4bfbdc5159fb36684:

configure: Check bzip2 is available (2019-11-11 14:35:41 +0100)

----------------------------------------------------------------
- Fix memory leaks for QTESTS
- Update MAINTAINERS file
- Check for the availability of bzip2 in "configure"
----------------------------------------------------------------

Dr. David Alan Gilbert (1):
tests/migration: Print some debug on bad status

Jan Kiszka (1):
MAINTAINERS: slirp: Remove myself as maintainer

Marc-André Lureau (2):
qtest: fix qtest_qmp_device_add leak
cpu-plug-test: fix leaks

Philippe Mathieu-Daudé (2):
configure: Only decompress EDK2 blobs for X86/ARM targets
configure: Check bzip2 is available

 MAINTAINERS            |  2 --
 Makefile               |  2 ++
 configure              | 17 +++++++++++++++++
 tests/cpu-plug-test.c  |  2 ++
 tests/libqtest.c       |  1 +
 tests/migration-test.c |  9 +++++++--
 6 files changed, 29 insertions(+), 4 deletions(-)
#7 lore raw
Quoted 13 lines · Thomas Huth

Hi Peter,

the following changes since commit 654efcb511d394c1d3f5292c28503d1d19e5b1d3:

Merge remote-tracking branch 'remotes/vivier/tags/q800-branch-pull-request' into staging (2019-11-11 09:23:46 +0000)

are available in the Git repository at:

https://gitlab.com/huth/qemu.git tags/pull-request-2019-11-12

for you to fetch changes up to 623ef637a2e42e023e7436d4bfbdc5159fb36684:

Quoted 7 lines

configure: Check bzip2 is available (2019-11-11 14:35:41 +0100)

----------------------------------------------------------------
- Fix memory leaks for QTESTS
- Update MAINTAINERS file
- Check for the availability of bzip2 in "configure"
----------------------------------------------------------------

Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/4.2
for any user-visible changes.

-- PMM