All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/3] Fixes for libqos
@ 2019-04-08 11:09 Thomas Huth
  2019-04-08 11:09 ` [Qemu-devel] [PULL 1/3] tests/libqos: fix usage of bool in pci-pc.c Thomas Huth
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Thomas Huth @ 2019-04-08 11:09 UTC (permalink / raw
  To: qemu-devel, peter.maydell
  Cc: Laurent Vivier, Paolo Bonzini, Jafar Abdi, dgilbert

 Hi Peter,

the following changes since commit f55a585d1037e5de6088f25e75443c2776786e29:

  Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2019-04-07 14:54:55 +0100)

are available in the Git repository at:

  https://gitlab.com/huth/qemu.git pull-request-2019-04-08

for you to fetch changes up to c19f2b711e15dac4c2cdbace2f8fb3a45fbed0d2:

  test qgraph.c: Fix segs due to out of scope default (2019-04-08 12:38:07 +0200)

----------------------------------------------------------------
- Fix a crash in libqos with GCC 9
- Fix usage of wrong boolean types in libqos
----------------------------------------------------------------

Dr. David Alan Gilbert (1):
      test qgraph.c: Fix segs due to out of scope default

Jafar Abdi (2):
      tests/libqos: fix usage of bool in pci-pc.c
      tests/libqos: fix usage of bool in pci-spapr.c

 tests/libqos/pci-pc.c    | 2 +-
 tests/libqos/pci-spapr.c | 2 +-
 tests/libqos/qgraph.c    | 6 ++++--
 3 files changed, 6 insertions(+), 4 deletions(-)

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

* [Qemu-devel] [PULL 1/3] tests/libqos: fix usage of bool in pci-pc.c
  2019-04-08 11:09 [Qemu-devel] [PULL 0/3] Fixes for libqos Thomas Huth
@ 2019-04-08 11:09 ` Thomas Huth
  2019-04-08 11:09 ` [Qemu-devel] [PULL 2/3] tests/libqos: fix usage of bool in pci-spapr.c Thomas Huth
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Thomas Huth @ 2019-04-08 11:09 UTC (permalink / raw
  To: qemu-devel, peter.maydell
  Cc: Laurent Vivier, Paolo Bonzini, Jafar Abdi, dgilbert

From: Jafar Abdi <cafer.abdi@gmail.com>

Clean up wrong usage of FALSE and TRUE in places that use "bool" from stdbool.h.

FALSE and TRUE (with capital letters) are the constants defined by glib for
being used with the "gboolean" type of glib. But some parts of the code also use
TRUE and FALSE for variables that are declared as "bool" (the type from <stdbool.h>).

Signed-off-by: Jafar Abdi <cafer.abdi@gmail.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1553351197-14581-3-git-send-email-cafer.abdi@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/libqos/pci-pc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/libqos/pci-pc.c b/tests/libqos/pci-pc.c
index 4ab16facf2..407d8aff78 100644
--- a/tests/libqos/pci-pc.c
+++ b/tests/libqos/pci-pc.c
@@ -125,7 +125,7 @@ void qpci_init_pc(QPCIBusPC *qpci, QTestState *qts, QGuestAllocator *alloc)
     assert(qts);
 
     /* tests can use pci-bus */
-    qpci->bus.has_buggy_msi = FALSE;
+    qpci->bus.has_buggy_msi = false;
 
     qpci->bus.pio_readb = qpci_pc_pio_readb;
     qpci->bus.pio_readw = qpci_pc_pio_readw;
-- 
2.21.0

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

* [Qemu-devel] [PULL 2/3] tests/libqos: fix usage of bool in pci-spapr.c
  2019-04-08 11:09 [Qemu-devel] [PULL 0/3] Fixes for libqos Thomas Huth
  2019-04-08 11:09 ` [Qemu-devel] [PULL 1/3] tests/libqos: fix usage of bool in pci-pc.c Thomas Huth
@ 2019-04-08 11:09 ` Thomas Huth
  2019-04-08 11:09 ` [Qemu-devel] [PULL 3/3] test qgraph.c: Fix segs due to out of scope default Thomas Huth
  2019-04-08 16:50   ` Peter Maydell
  3 siblings, 0 replies; 6+ messages in thread
From: Thomas Huth @ 2019-04-08 11:09 UTC (permalink / raw
  To: qemu-devel, peter.maydell
  Cc: Laurent Vivier, Paolo Bonzini, Jafar Abdi, dgilbert

From: Jafar Abdi <cafer.abdi@gmail.com>

Clean up wrong usage of FALSE and TRUE in places that use "bool" from stdbool.h.

FALSE and TRUE (with capital letters) are the constants defined by glib for
being used with the "gboolean" type of glib. But some parts of the code also use
TRUE and FALSE for variables that are declared as "bool" (the type from <stdbool.h>).

Signed-off-by: Jafar Abdi <cafer.abdi@gmail.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Message-Id: <1553351197-14581-4-git-send-email-cafer.abdi@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/libqos/pci-spapr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/libqos/pci-spapr.c b/tests/libqos/pci-spapr.c
index 6925925997..58ba27ae6d 100644
--- a/tests/libqos/pci-spapr.c
+++ b/tests/libqos/pci-spapr.c
@@ -156,7 +156,7 @@ void qpci_init_spapr(QPCIBusSPAPR *qpci, QTestState *qts,
     assert(qts);
 
     /* tests cannot use spapr, needs to be fixed first */
-    qpci->bus.has_buggy_msi = TRUE;
+    qpci->bus.has_buggy_msi = true;
 
     qpci->alloc = alloc;
 
-- 
2.21.0

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

* [Qemu-devel] [PULL 3/3] test qgraph.c: Fix segs due to out of scope default
  2019-04-08 11:09 [Qemu-devel] [PULL 0/3] Fixes for libqos Thomas Huth
  2019-04-08 11:09 ` [Qemu-devel] [PULL 1/3] tests/libqos: fix usage of bool in pci-pc.c Thomas Huth
  2019-04-08 11:09 ` [Qemu-devel] [PULL 2/3] tests/libqos: fix usage of bool in pci-spapr.c Thomas Huth
@ 2019-04-08 11:09 ` Thomas Huth
  2019-04-08 16:50   ` Peter Maydell
  3 siblings, 0 replies; 6+ messages in thread
From: Thomas Huth @ 2019-04-08 11:09 UTC (permalink / raw
  To: qemu-devel, peter.maydell
  Cc: Laurent Vivier, Paolo Bonzini, Jafar Abdi, dgilbert

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

The test uses the trick:
   if (!opts) {
     opts = &(QOSGraph...Options) { };
   }

  in a couple of places, however the temporary created
by the &() {}  goes out of scope at the bottom of the if,
and results in a seg or assert when opts-> fields are
used (on fedora 30's gcc 9).

Fixes: fc281c802022cb3a73a5
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20190405184037.16799-1-dgilbert@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/libqos/qgraph.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/libqos/qgraph.c b/tests/libqos/qgraph.c
index 122efc1b7b..b149caaaa9 100644
--- a/tests/libqos/qgraph.c
+++ b/tests/libqos/qgraph.c
@@ -77,6 +77,7 @@ static void add_edge(const char *source, const char *dest,
 {
     char *key;
     QOSGraphEdgeList *list = g_hash_table_lookup(edge_table, source);
+    QOSGraphEdgeOptions def_opts = { };
 
     if (!list) {
         list = g_new0(QOSGraphEdgeList, 1);
@@ -85,7 +86,7 @@ static void add_edge(const char *source, const char *dest,
     }
 
     if (!opts) {
-        opts = &(QOSGraphEdgeOptions) { };
+        opts = &def_opts;
     }
 
     QOSGraphEdge *edge = g_new0(QOSGraphEdge, 1);
@@ -590,9 +591,10 @@ void qos_add_test(const char *name, const char *interface,
 {
     QOSGraphNode *node;
     char *test_name = g_strdup_printf("%s-tests/%s", interface, name);;
+    QOSGraphTestOptions def_opts = { };
 
     if (!opts) {
-        opts = &(QOSGraphTestOptions) { };
+        opts = &def_opts;
     }
     node = create_node(test_name, QNODE_TEST);
     node->u.test.function = test_func;
-- 
2.21.0

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

* Re: [Qemu-devel] [PULL 0/3] Fixes for libqos
@ 2019-04-08 16:50   ` Peter Maydell
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2019-04-08 16:50 UTC (permalink / raw
  To: Thomas Huth
  Cc: QEMU Developers, Laurent Vivier, Paolo Bonzini, Jafar Abdi,
	Dr. David Alan Gilbert

On Mon, 8 Apr 2019 at 12:09, Thomas Huth <thuth@redhat.com> wrote:
>
>  Hi Peter,
>
> the following changes since commit f55a585d1037e5de6088f25e75443c2776786e29:
>
>   Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2019-04-07 14:54:55 +0100)
>
> are available in the Git repository at:
>
>   https://gitlab.com/huth/qemu.git pull-request-2019-04-08
>
> for you to fetch changes up to c19f2b711e15dac4c2cdbace2f8fb3a45fbed0d2:
>
>   test qgraph.c: Fix segs due to out of scope default (2019-04-08 12:38:07 +0200)
>
> ----------------------------------------------------------------
> - Fix a crash in libqos with GCC 9
> - Fix usage of wrong boolean types in libqos
> ----------------------------------------------------------------

Applied, thanks.

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

-- PMM

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

* Re: [Qemu-devel] [PULL 0/3] Fixes for libqos
@ 2019-04-08 16:50   ` Peter Maydell
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2019-04-08 16:50 UTC (permalink / raw
  To: Thomas Huth
  Cc: Laurent Vivier, Paolo Bonzini, Jafar Abdi, QEMU Developers,
	Dr. David Alan Gilbert

On Mon, 8 Apr 2019 at 12:09, Thomas Huth <thuth@redhat.com> wrote:
>
>  Hi Peter,
>
> the following changes since commit f55a585d1037e5de6088f25e75443c2776786e29:
>
>   Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2019-04-07 14:54:55 +0100)
>
> are available in the Git repository at:
>
>   https://gitlab.com/huth/qemu.git pull-request-2019-04-08
>
> for you to fetch changes up to c19f2b711e15dac4c2cdbace2f8fb3a45fbed0d2:
>
>   test qgraph.c: Fix segs due to out of scope default (2019-04-08 12:38:07 +0200)
>
> ----------------------------------------------------------------
> - Fix a crash in libqos with GCC 9
> - Fix usage of wrong boolean types in libqos
> ----------------------------------------------------------------

Applied, thanks.

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

-- PMM


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

end of thread, other threads:[~2019-04-08 16:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-08 11:09 [Qemu-devel] [PULL 0/3] Fixes for libqos Thomas Huth
2019-04-08 11:09 ` [Qemu-devel] [PULL 1/3] tests/libqos: fix usage of bool in pci-pc.c Thomas Huth
2019-04-08 11:09 ` [Qemu-devel] [PULL 2/3] tests/libqos: fix usage of bool in pci-spapr.c Thomas Huth
2019-04-08 11:09 ` [Qemu-devel] [PULL 3/3] test qgraph.c: Fix segs due to out of scope default Thomas Huth
2019-04-08 16:50 ` [Qemu-devel] [PULL 0/3] Fixes for libqos Peter Maydell
2019-04-08 16:50   ` 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.