mbox

[PULL,v2,00/12] QOM devices patch queue 2015-05-27

Message ID 1432750824-27702-1-git-send-email-afaerber@suse.de
State New
Headers show

Pull-request

git://github.com/afaerber/qemu-cpu.git tags/qom-devices-for-peter

Message

Andreas Färber May 27, 2015, 6:20 p.m. UTC
Hello Peter,

This is my QOM (devices) patch queue. Please pull.

v2 contains changes that hopefully fix warnings on gcc 4.7.

Regards,
Andreas

Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Daniel P. Berrange <berrange@redhat.com>

The following changes since commit 0915aed5842bd4dbe396b92d4f3b846ae29ad663:

  Merge remote-tracking branch 'remotes/jnsnow/tags/ide-pull-request' into staging (2015-05-26 11:31:03 +0100)

are available in the git repository at:

  git://github.com/afaerber/qemu-cpu.git tags/qom-devices-for-peter

for you to fetch changes up to 2e6124921d6238f8c77326a7fdac5c1c211c88f7:

  qom: Add object_property_add_const_link() (2015-05-27 20:16:30 +0200)

----------------------------------------------------------------
QOM infrastructure fixes and device conversions

* Changes to name string ownership for alias properties
* Improvements around enum properties
* Cleanups around -object handling
* New helper functions
* Add path argument to qom-tree script
* QTest cleanup to use new qtest_add_data_func() consistently

----------------------------------------------------------------
Andreas Färber (1):
      tests: Use qtest_add_data_func() consistently

Daniel P. Berrange (7):
      backends: Fix typename of 'policy' enum property in hostmem obj
      doc: Document user creatable object types in help text
      vl: Create (most) objects before creating chardev backends
      qom: Add helper method for getting user objects root
      qom: Add object_new_with_props() / object_new_withpropv() helpers
      qom: Make enum string tables const-correct
      qom: Add an object_property_add_enum() helper function

Eduardo Habkost (2):
      qom: strdup() target property name on object_property_add_alias()
      qdev: Free property names after registering gpio aliases

Martin Cerveny (1):
      scripts: Add support for path as argument of qom-tree

Paolo Bonzini (1):
      qom: Add object_property_add_const_link()

 backends/hostmem.c          |   2 +-
 hw/core/qdev.c              |   2 +
 include/hw/qdev-core.h      |   2 +-
 include/qapi/util.h         |   2 +-
 include/qapi/visitor-impl.h |   6 +-
 include/qapi/visitor.h      |   2 +-
 include/qemu/compiler.h     |   6 +
 include/qom/object.h        | 179 +++++++++++++++++++++++++++++-
 iothread.c                  |   4 +-
 numa.c                      |   2 +-
 qapi/qapi-dealloc-visitor.c |   3 +-
 qapi/qapi-util.c            |   2 +-
 qapi/qapi-visit-core.c      |   6 +-
 qemu-options.hx             |  70 +++++++++---
 qmp.c                       |   6 +-
 qom/object.c                | 195 ++++++++++++++++++++++++++++++++-
 scripts/qapi-types.py       |   4 +-
 scripts/qmp/qom-tree        |   9 +-
 tests/.gitignore            |   1 +
 tests/Makefile              |   5 +-
 tests/ahci-test.c           |   9 +-
 tests/check-qom-proplist.c  | 259 ++++++++++++++++++++++++++++++++++++++++++++
 tests/e1000-test.c          |   4 +-
 tests/eepro100-test.c       |   5 +-
 tests/endianness-test.c     |  18 +--
 tests/pc-cpu-test.c         |  13 +--
 tests/qom-test.c            |   4 +-
 vl.c                        |  40 ++++++-
 28 files changed, 785 insertions(+), 75 deletions(-)
 create mode 100644 tests/check-qom-proplist.c

Comments

Peter Maydell May 28, 2015, 11:46 a.m. UTC | #1
On 27 May 2015 at 19:20, Andreas Färber <afaerber@suse.de> wrote:
> Hello Peter,
>
> This is my QOM (devices) patch queue. Please pull.
>
> v2 contains changes that hopefully fix warnings on gcc 4.7.

Hi. I'm afraid this doesn't build on our minimum glib version (2.22):

/Users/pm215/src/qemu/tests/check-qom-proplist.c:235:5: warning: implicit
      declaration of function 'g_assert_null' is invalid in C99
      [-Wimplicit-function-declaration]
    g_assert_null(dobj);
    ^
/Users/pm215/src/qemu/tests/check-qom-proplist.c:236:5: warning: implicit
      declaration of function 'g_assert_nonnull' is invalid in C99
      [-Wimplicit-function-declaration]
    g_assert_nonnull(err);
    ^

g_assert_nonnull() first appears in glib 2.38.

thanks
-- PMM
Andreas Färber June 19, 2015, 8:45 a.m. UTC | #2
Am 28.05.2015 um 13:46 schrieb Peter Maydell:
> On 27 May 2015 at 19:20, Andreas Färber <afaerber@suse.de> wrote:
>> Hello Peter,
>>
>> This is my QOM (devices) patch queue. Please pull.
>>
>> v2 contains changes that hopefully fix warnings on gcc 4.7.
> 
> Hi. I'm afraid this doesn't build on our minimum glib version (2.22):
> 
> /Users/pm215/src/qemu/tests/check-qom-proplist.c:235:5: warning: implicit
>       declaration of function 'g_assert_null' is invalid in C99
>       [-Wimplicit-function-declaration]
>     g_assert_null(dobj);
>     ^
> /Users/pm215/src/qemu/tests/check-qom-proplist.c:236:5: warning: implicit
>       declaration of function 'g_assert_nonnull' is invalid in C99
>       [-Wimplicit-function-declaration]
>     g_assert_nonnull(err);
>     ^
> 
> g_assert_nonnull() first appears in glib 2.38.

Holy crap... :/

I could've sworn that Anthony did not apply the same minimum-glib
version for make check as for the actual code, and macros should be easy
to add to our glib-compat.h, but let's get this in first and consider
refactorings then.

Unfortunately the pull no longer applies cleanly due to QemuOpts changes
in vl.c, looking into it.

Regards,
Andreas
Peter Maydell June 19, 2015, 8:56 a.m. UTC | #3
On 19 June 2015 at 09:45, Andreas Färber <afaerber@suse.de> wrote:
> Am 28.05.2015 um 13:46 schrieb Peter Maydell:
>> On 27 May 2015 at 19:20, Andreas Färber <afaerber@suse.de> wrote:
>>> Hello Peter,
>>>
>>> This is my QOM (devices) patch queue. Please pull.
>>>
>>> v2 contains changes that hopefully fix warnings on gcc 4.7.
>>
>> Hi. I'm afraid this doesn't build on our minimum glib version (2.22):
>>
>> /Users/pm215/src/qemu/tests/check-qom-proplist.c:235:5: warning: implicit
>>       declaration of function 'g_assert_null' is invalid in C99
>>       [-Wimplicit-function-declaration]
>>     g_assert_null(dobj);
>>     ^
>> /Users/pm215/src/qemu/tests/check-qom-proplist.c:236:5: warning: implicit
>>       declaration of function 'g_assert_nonnull' is invalid in C99
>>       [-Wimplicit-function-declaration]
>>     g_assert_nonnull(err);
>>     ^
>>
>> g_assert_nonnull() first appears in glib 2.38.
>
> Holy crap... :/
>
> I could've sworn that Anthony did not apply the same minimum-glib
> version for make check as for the actual code

Historically we didn't, because the whole gtester infrastructure
we use wasn't in the ancient glib requirement we had for RHEL5;
so it wasn't practical to insist that test code run on that.
One of the advantages of now using 2.22 as our minimum is that
you can actually run 'make check' on every version of glib we
support (though 2.22 has a signal race in gtester which means you
need to have a little helper script that does a 'killall -CHLD
gtester' every so often to unwedge it...)

Even before we moved to 2.22, I would have spotted and asked
for fixes for failure of "make check" on a 2.22 glib, because
one of my main build-for-pullreqs systems is a 2.22 one.

thanks
-- PMM