All of lore.kernel.org
 help / color / mirror / Atom feed
* [PULL 0/6] qtest and misc patches
@ 2019-11-12  6:43 Thomas Huth
  2019-11-12  6:43 ` [PULL 1/6] qtest: fix qtest_qmp_device_add leak Thomas Huth
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Thomas Huth @ 2019-11-12  6:43 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell
  Cc: Marc-André Lureau, Philippe Mathieu-Daudé

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



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PULL 1/6] qtest: fix qtest_qmp_device_add leak
  2019-11-12  6:43 [PULL 0/6] qtest and misc patches Thomas Huth
@ 2019-11-12  6:43 ` Thomas Huth
  2019-11-12  6:43 ` [PULL 2/6] cpu-plug-test: fix leaks Thomas Huth
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Thomas Huth @ 2019-11-12  6:43 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell
  Cc: Marc-André Lureau, Philippe Mathieu-Daudé

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Spotted by ASAN.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20191107192731.17330-3-marcandre.lureau@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Fixes: b4510bb4109f5f ("tests: add qtest_qmp_device_add_qdict() helper")
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/libqtest.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/libqtest.c b/tests/libqtest.c
index 3706bccd8d..91e9cb220c 100644
--- a/tests/libqtest.c
+++ b/tests/libqtest.c
@@ -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)
-- 
2.23.0



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PULL 2/6] cpu-plug-test: fix leaks
  2019-11-12  6:43 [PULL 0/6] qtest and misc patches Thomas Huth
  2019-11-12  6:43 ` [PULL 1/6] qtest: fix qtest_qmp_device_add leak Thomas Huth
@ 2019-11-12  6:43 ` Thomas Huth
  2019-11-12  6:43 ` [PULL 3/6] MAINTAINERS: slirp: Remove myself as maintainer Thomas Huth
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Thomas Huth @ 2019-11-12  6:43 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell
  Cc: Marc-André Lureau, Philippe Mathieu-Daudé

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Spotted by ASAN.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20191107192731.17330-4-marcandre.lureau@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Fixes: 021a007efc3 ("cpu-plug-test: fix device_add for pc/q35 machines")
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/cpu-plug-test.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/cpu-plug-test.c b/tests/cpu-plug-test.c
index 058cef5ac1..30e514bbfb 100644
--- a/tests/cpu-plug-test.c
+++ b/tests/cpu-plug-test.c
@@ -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 */
-- 
2.23.0



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PULL 3/6] MAINTAINERS: slirp: Remove myself as maintainer
  2019-11-12  6:43 [PULL 0/6] qtest and misc patches Thomas Huth
  2019-11-12  6:43 ` [PULL 1/6] qtest: fix qtest_qmp_device_add leak Thomas Huth
  2019-11-12  6:43 ` [PULL 2/6] cpu-plug-test: fix leaks Thomas Huth
@ 2019-11-12  6:43 ` Thomas Huth
  2019-11-12  6:43 ` [PULL 4/6] tests/migration: Print some debug on bad status Thomas Huth
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Thomas Huth @ 2019-11-12  6:43 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell
  Cc: Marc-André Lureau, Philippe Mathieu-Daudé

From: Jan Kiszka <jan.kiszka@siemens.com>

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

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Message-Id: <759f8f44-9a01-a9f1-c7cf-65d40151a93a@web.de>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Samuel Thibault <samuel.thibault@gnu.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 MAINTAINERS | 2 --
 1 file changed, 2 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 363e72a467..ff8d0d29f4 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2143,13 +2143,11 @@ F: include/hw/registerfields.h
 
 SLIRP
 M: Samuel Thibault <samuel.thibault@ens-lyon.org>
-M: Jan Kiszka <jan.kiszka@siemens.com>
 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 <pbonzini@redhat.com>
-- 
2.23.0



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PULL 4/6] tests/migration: Print some debug on bad status
  2019-11-12  6:43 [PULL 0/6] qtest and misc patches Thomas Huth
                   ` (2 preceding siblings ...)
  2019-11-12  6:43 ` [PULL 3/6] MAINTAINERS: slirp: Remove myself as maintainer Thomas Huth
@ 2019-11-12  6:43 ` Thomas Huth
  2019-11-12  6:43 ` [PULL 5/6] configure: Only decompress EDK2 blobs for X86/ARM targets Thomas Huth
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Thomas Huth @ 2019-11-12  6:43 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell
  Cc: Marc-André Lureau, Philippe Mathieu-Daudé

From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>

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.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <20191108104307.125020-1-dgilbert@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/migration-test.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/tests/migration-test.c b/tests/migration-test.c
index 59f291c654..ac780dffda 100644
--- a/tests/migration-test.c
+++ b/tests/migration-test.c
@@ -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);
-- 
2.23.0



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PULL 5/6] configure: Only decompress EDK2 blobs for X86/ARM targets
  2019-11-12  6:43 [PULL 0/6] qtest and misc patches Thomas Huth
                   ` (3 preceding siblings ...)
  2019-11-12  6:43 ` [PULL 4/6] tests/migration: Print some debug on bad status Thomas Huth
@ 2019-11-12  6:43 ` Thomas Huth
  2019-11-12  6:43 ` [PULL 6/6] configure: Check bzip2 is available Thomas Huth
  2019-11-12 12:09 ` [PULL 0/6] qtest and misc patches Peter Maydell
  6 siblings, 0 replies; 8+ messages in thread
From: Thomas Huth @ 2019-11-12  6:43 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell
  Cc: Marc-André Lureau, Philippe Mathieu-Daudé

From: Philippe Mathieu-Daudé <philmd@redhat.com>

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 ...")
Suggested-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20191108114531.21518-2-philmd@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Reviewed-by: Luc Michel <luc.michel@greensocs.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 Makefile  |  2 ++
 configure | 13 +++++++++++++
 2 files changed, 15 insertions(+)

diff --git a/Makefile b/Makefile
index aa9d1a42aa..3430eca532 100644
--- a/Makefile
+++ b/Makefile
@@ -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
diff --git a/configure b/configure
index efe165edf9..9b322284c3 100755
--- a/configure
+++ b/configure
@@ -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
-- 
2.23.0



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PULL 6/6] configure: Check bzip2 is available
  2019-11-12  6:43 [PULL 0/6] qtest and misc patches Thomas Huth
                   ` (4 preceding siblings ...)
  2019-11-12  6:43 ` [PULL 5/6] configure: Only decompress EDK2 blobs for X86/ARM targets Thomas Huth
@ 2019-11-12  6:43 ` Thomas Huth
  2019-11-12 12:09 ` [PULL 0/6] qtest and misc patches Peter Maydell
  6 siblings, 0 replies; 8+ messages in thread
From: Thomas Huth @ 2019-11-12  6:43 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell
  Cc: Marc-André Lureau, Philippe Mathieu-Daudé

From: Philippe Mathieu-Daudé <philmd@redhat.com>

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 ...")
Reported-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20191108114531.21518-3-philmd@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Luc Michel <luc.michel@greensocs.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 configure | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/configure b/configure
index 9b322284c3..6099be1d84 100755
--- a/configure
+++ b/configure
@@ -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
-- 
2.23.0



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PULL 0/6] qtest and misc patches
  2019-11-12  6:43 [PULL 0/6] qtest and misc patches Thomas Huth
                   ` (5 preceding siblings ...)
  2019-11-12  6:43 ` [PULL 6/6] configure: Check bzip2 is available Thomas Huth
@ 2019-11-12 12:09 ` Peter Maydell
  6 siblings, 0 replies; 8+ messages in thread
From: Peter Maydell @ 2019-11-12 12:09 UTC (permalink / raw)
  To: Thomas Huth
  Cc: Marc-André Lureau, Philippe Mathieu-Daudé,
	QEMU Developers

On Tue, 12 Nov 2019 at 06:43, Thomas Huth <thuth@redhat.com> wrote:
>
>  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"
> ----------------------------------------------------------------


Applied, thanks.

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

-- PMM


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-11-12 12:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-12  6:43 [PULL 0/6] qtest and misc patches Thomas Huth
2019-11-12  6:43 ` [PULL 1/6] qtest: fix qtest_qmp_device_add leak Thomas Huth
2019-11-12  6:43 ` [PULL 2/6] cpu-plug-test: fix leaks Thomas Huth
2019-11-12  6:43 ` [PULL 3/6] MAINTAINERS: slirp: Remove myself as maintainer Thomas Huth
2019-11-12  6:43 ` [PULL 4/6] tests/migration: Print some debug on bad status Thomas Huth
2019-11-12  6:43 ` [PULL 5/6] configure: Only decompress EDK2 blobs for X86/ARM targets Thomas Huth
2019-11-12  6:43 ` [PULL 6/6] configure: Check bzip2 is available Thomas Huth
2019-11-12 12:09 ` [PULL 0/6] qtest and misc patches Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.