[Qemu-devel] [PATCH v2 0/3] simplify struct QOM properties and use the result for GUEST_PANICKED

Paolo Bonzini posted 3 patches 7 years, 2 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20170222180423.26571-1-pbonzini@redhat.com
Test checkpatch failed
Test docker passed
Test s390x passed
include/qom/cpu.h                       |   1 -
include/qom/qom-qobject.h               |  68 +++++++++++-
include/sysemu/sysemu.h                 |   2 +-
kvm-all.c                               |   2 +-
qom/cpu.c                               |  11 +-
qom/qom-qobject.c                       |  52 ++++++++++
target/i386/cpu.c                       |   2 +-
tests/Makefile.include                  |   2 +-
tests/check-qom-proplist.c              | 177 +++++++++++++++++++++++++++++++-
tests/qapi-schema/qapi-schema-test.json |   8 ++
tests/qapi-schema/qapi-schema-test.out  |   6 ++
vl.c                                    |  13 ++-
12 files changed, 326 insertions(+), 18 deletions(-)
[Qemu-devel] [PATCH v2 0/3] simplify struct QOM properties and use the result for GUEST_PANICKED
Posted by Paolo Bonzini 7 years, 2 months ago
This is an alternative approach to simplifying the crash information
patches.

Currently, crash information is exposed twice, through a QOM property
and through a method.  This is because accessing QOM properties with
QAPI struct types is a huge pain in the neck.  Patch 1 fixes this by
providing a simple and well-tested API, that takes care of integrating
the QOM->QObject->QAPI steps into a single function.

Patch 2 then eliminates the get_crash_info method.  Patch 3 finally
cleans up qemu_system_guest_panicked by passing a CPUState* argument
instead of a GuestPanicInformation struct.

Paolo

v1->v2:
       include missing changes to tests/qapi-schema/qapi-schema-test.out 
       tweaks to doc comments
       wrap long lines

Paolo Bonzini (3):
  qom-qobject: introduce object_property_{g,s}et_ptr
  cpu: implement get_crash_info through QOM properties
  vl: pass CPUState to qemu_system_guest_panicked

 include/qom/cpu.h                       |   1 -
 include/qom/qom-qobject.h               |  68 +++++++++++-
 include/sysemu/sysemu.h                 |   2 +-
 kvm-all.c                               |   2 +-
 qom/cpu.c                               |  11 +-
 qom/qom-qobject.c                       |  52 ++++++++++
 target/i386/cpu.c                       |   2 +-
 tests/Makefile.include                  |   2 +-
 tests/check-qom-proplist.c              | 177 +++++++++++++++++++++++++++++++-
 tests/qapi-schema/qapi-schema-test.json |   8 ++
 tests/qapi-schema/qapi-schema-test.out  |   6 ++
 vl.c                                    |  13 ++-
 12 files changed, 326 insertions(+), 18 deletions(-)

-- 
2.9.3


Re: [Qemu-devel] [PATCH v2 0/3] simplify struct QOM properties and use the result for GUEST_PANICKED
Posted by no-reply@patchew.org 7 years, 2 months ago
Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Subject: [Qemu-devel] [PATCH v2 0/3] simplify struct QOM properties and use the result for GUEST_PANICKED
Message-id: 20170222180423.26571-1-pbonzini@redhat.com

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

# Useful git options
git config --local diff.renamelimit 0
git config --local diff.renames True

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
3c23639 vl: pass CPUState to qemu_system_guest_panicked
e22eb3a cpu: implement get_crash_info through QOM properties
a359a36 qom-qobject: introduce object_property_{g, s}et_ptr

=== OUTPUT BEGIN ===
Checking PATCH 1/3: qom-qobject: introduce object_property_{g, s}et_ptr...
WARNING: line over 80 characters
#427: FILE: tests/check-qom-proplist.c:702:
+    g_test_add_func("/qom/proplist/get-set-ptr/struct", test_dummy_get_set_ptr_struct);

WARNING: line over 80 characters
#428: FILE: tests/check-qom-proplist.c:703:
+    g_test_add_func("/qom/proplist/get-set-ptr/error", test_dummy_get_set_ptr_error);

ERROR: line over 90 characters
#429: FILE: tests/check-qom-proplist.c:704:
+    g_test_add_func("/qom/proplist/get-set-ptr/covariant", test_dummy_get_set_ptr_covariant);

ERROR: line over 90 characters
#430: FILE: tests/check-qom-proplist.c:705:
+    g_test_add_func("/qom/proplist/get-set-ptr/contravariant", test_dummy_get_set_ptr_contravariant);

total: 2 errors, 2 warnings, 419 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 2/3: cpu: implement get_crash_info through QOM properties...
Checking PATCH 3/3: vl: pass CPUState to qemu_system_guest_panicked...
=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org
Re: [Qemu-devel] [PATCH v2 0/3] simplify struct QOM properties and use the result for GUEST_PANICKED
Posted by Marc-André Lureau 7 years, 1 month ago
On Wed, Feb 22, 2017 at 10:07 PM Paolo Bonzini <pbonzini@redhat.com> wrote:

> This is an alternative approach to simplifying the crash information
> patches.
>
> Currently, crash information is exposed twice, through a QOM property
> and through a method.  This is because accessing QOM properties with
> QAPI struct types is a huge pain in the neck.  Patch 1 fixes this by
> providing a simple and well-tested API, that takes care of integrating
> the QOM->QObject->QAPI steps into a single function.
>
> Patch 2 then eliminates the get_crash_info method.  Patch 3 finally
> cleans up qemu_system_guest_panicked by passing a CPUState* argument
> instead of a GuestPanicInformation struct.
>
> Paolo
>
> v1->v2:
>        include missing changes to tests/qapi-schema/qapi-schema-test.out
>        tweaks to doc comments
>        wrap long lines
>
> Paolo Bonzini (3):
>   qom-qobject: introduce object_property_{g,s}et_ptr
>   cpu: implement get_crash_info through QOM properties
>   vl: pass CPUState to qemu_system_guest_panicked
>


With the test leaks fixed,

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


>
>
>  include/qom/cpu.h                       |   1 -
>  include/qom/qom-qobject.h               |  68 +++++++++++-
>  include/sysemu/sysemu.h                 |   2 +-
>  kvm-all.c                               |   2 +-
>  qom/cpu.c                               |  11 +-
>  qom/qom-qobject.c                       |  52 ++++++++++
>  target/i386/cpu.c                       |   2 +-
>  tests/Makefile.include                  |   2 +-
>  tests/check-qom-proplist.c              | 177
> +++++++++++++++++++++++++++++++-
>  tests/qapi-schema/qapi-schema-test.json |   8 ++
>  tests/qapi-schema/qapi-schema-test.out  |   6 ++
>  vl.c                                    |  13 ++-
>  12 files changed, 326 insertions(+), 18 deletions(-)
>
> --
> 2.9.3
>
>
> --
Marc-André Lureau