[PATCH 0/3] qom: Few trivial patches

Philippe Mathieu-Daudé posted 3 patches 4 years ago
Test docker-mingw@fedora passed
Test checkpatch passed
Test asan failed
Test docker-quick@centos7 failed
Test FreeBSD passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200504084615.27642-1-f4bug@amsat.org
There is a newer version of this series
include/io/task.h         | 2 --
include/qemu/typedefs.h   | 1 +
include/qom/object.h      | 2 --
include/qom/qom-qobject.h | 2 --
include/sysemu/sysemu.h   | 1 -
io/task.c                 | 1 +
qom/object.c              | 7 ++++++-
7 files changed, 8 insertions(+), 8 deletions(-)
[PATCH 0/3] qom: Few trivial patches
Posted by Philippe Mathieu-Daudé 4 years ago
Some QOM patches worth salvaging while doing housekeeping.

Philippe Mathieu-Daudé (3):
  qom/object: Move Object typedef to 'qemu/typedefs.h'
  io/task: Move 'qom/object.h' header to source
  qom/object: Make reparenting error more verbose

 include/io/task.h         | 2 --
 include/qemu/typedefs.h   | 1 +
 include/qom/object.h      | 2 --
 include/qom/qom-qobject.h | 2 --
 include/sysemu/sysemu.h   | 1 -
 io/task.c                 | 1 +
 qom/object.c              | 7 ++++++-
 7 files changed, 8 insertions(+), 8 deletions(-)

-- 
2.21.3


Re: [PATCH 0/3] qom: Few trivial patches
Posted by no-reply@patchew.org 4 years ago
Patchew URL: https://patchew.org/QEMU/20200504084615.27642-1-f4bug@amsat.org/



Hi,

This series failed the docker-quick@centos7 build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

=== TEST SCRIPT BEGIN ===
#!/bin/bash
make docker-image-centos7 V=1 NETWORK=1
time make docker-test-quick@centos7 SHOW_ENV=1 J=14 NETWORK=1
=== TEST SCRIPT END ===

  CC      tests/test-io-channel-socket.o
  CC      tests/io-channel-helpers.o
  CC      tests/test-io-channel-file.o
/tmp/qemu-test/src/tests/test-io-task.c:33:12: error: field 'parent' has incomplete type
     Object parent;
            ^
/tmp/qemu-test/src/tests/test-io-task.c:37:17: error: field 'parent' has incomplete type
     ObjectClass parent;
                 ^
/tmp/qemu-test/src/tests/test-io-task.c:40:1: error: unknown type name 'TypeInfo'
 static const TypeInfo dummy_info = {
 ^
/tmp/qemu-test/src/tests/test-io-task.c:41:5: error: field name not in record or union initializer
     .parent = TYPE_OBJECT,
     ^
/tmp/qemu-test/src/tests/test-io-task.c:41:5: error: (near initialization for 'dummy_info')
/tmp/qemu-test/src/tests/test-io-task.c:41:15: error: 'TYPE_OBJECT' undeclared here (not in a function)
     .parent = TYPE_OBJECT,
               ^
/tmp/qemu-test/src/tests/test-io-task.c:42:5: error: field name not in record or union initializer
     .name = TYPE_DUMMY,
     ^
/tmp/qemu-test/src/tests/test-io-task.c:42:5: error: (near initialization for 'dummy_info')
/tmp/qemu-test/src/tests/test-io-task.c:42:5: error: excess elements in scalar initializer [-Werror]
/tmp/qemu-test/src/tests/test-io-task.c:42:5: error: (near initialization for 'dummy_info') [-Werror]
/tmp/qemu-test/src/tests/test-io-task.c:43:5: error: field name not in record or union initializer
     .instance_size = sizeof(DummyObject),
     ^
/tmp/qemu-test/src/tests/test-io-task.c:43:5: error: (near initialization for 'dummy_info')
/tmp/qemu-test/src/tests/test-io-task.c:43:5: error: excess elements in scalar initializer [-Werror]
/tmp/qemu-test/src/tests/test-io-task.c:43:5: error: (near initialization for 'dummy_info') [-Werror]
/tmp/qemu-test/src/tests/test-io-task.c:44:5: error: field name not in record or union initializer
     .class_size = sizeof(DummyObjectClass),
     ^
/tmp/qemu-test/src/tests/test-io-task.c:44:5: error: (near initialization for 'dummy_info')
/tmp/qemu-test/src/tests/test-io-task.c:44:5: error: excess elements in scalar initializer [-Werror]
/tmp/qemu-test/src/tests/test-io-task.c:44:5: error: (near initialization for 'dummy_info') [-Werror]
/tmp/qemu-test/src/tests/test-io-task.c: In function 'test_task_complete':
/tmp/qemu-test/src/tests/test-io-task.c:67:5: error: implicit declaration of function 'object_new' [-Werror=implicit-function-declaration]
     Object *obj = object_new(TYPE_DUMMY);
     ^
/tmp/qemu-test/src/tests/test-io-task.c:67:5: error: nested extern declaration of 'object_new' [-Werror=nested-externs]
/tmp/qemu-test/src/tests/test-io-task.c:67:19: error: initialization makes pointer from integer without a cast [-Werror]
     Object *obj = object_new(TYPE_DUMMY);
                   ^
/tmp/qemu-test/src/tests/test-io-task.c:78:5: error: implicit declaration of function 'object_unref' [-Werror=implicit-function-declaration]
     object_unref(obj);
     ^
/tmp/qemu-test/src/tests/test-io-task.c:78:5: error: nested extern declaration of 'object_unref' [-Werror=nested-externs]
/tmp/qemu-test/src/tests/test-io-task.c: In function 'test_task_data_free':
/tmp/qemu-test/src/tests/test-io-task.c:97:19: error: initialization makes pointer from integer without a cast [-Werror]
     Object *obj = object_new(TYPE_DUMMY);
                   ^
/tmp/qemu-test/src/tests/test-io-task.c: In function 'test_task_failure':
/tmp/qemu-test/src/tests/test-io-task.c:115:19: error: initialization makes pointer from integer without a cast [-Werror]
     Object *obj = object_new(TYPE_DUMMY);
                   ^
/tmp/qemu-test/src/tests/test-io-task.c: In function 'test_task_thread_complete':
/tmp/qemu-test/src/tests/test-io-task.c:176:19: error: initialization makes pointer from integer without a cast [-Werror]
     Object *obj = object_new(TYPE_DUMMY);
                   ^
/tmp/qemu-test/src/tests/test-io-task.c: In function 'test_task_thread_failure':
/tmp/qemu-test/src/tests/test-io-task.c:217:19: error: initialization makes pointer from integer without a cast [-Werror]
     Object *obj = object_new(TYPE_DUMMY);
                   ^
/tmp/qemu-test/src/tests/test-io-task.c: In function 'main':
/tmp/qemu-test/src/tests/test-io-task.c:262:5: error: implicit declaration of function 'type_register_static' [-Werror=implicit-function-declaration]
     type_register_static(&dummy_info);
     ^
/tmp/qemu-test/src/tests/test-io-task.c:262:5: error: nested extern declaration of 'type_register_static' [-Werror=nested-externs]
cc1: all warnings being treated as errors
make: *** [tests/test-io-task.o] Error 1
make: *** Waiting for unfinished jobs....
Traceback (most recent call last):
  File "./tests/docker/docker.py", line 664, in <module>
---
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=e62e001e97bb45b5bad203b6cdf0e050', '-u', '1003', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=1', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew2/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-x41sr7m3/src/docker-src.2020-05-04-07.25.46.14887:/var/tmp/qemu:z,ro', 'qemu:centos7', '/var/tmp/qemu/run', 'test-quick']' returned non-zero exit status 2.
filter=--filter=label=com.qemu.instance.uuid=e62e001e97bb45b5bad203b6cdf0e050
make[1]: *** [docker-run] Error 1
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-x41sr7m3/src'
make: *** [docker-run-test-quick@centos7] Error 2

real    4m30.010s
user    0m8.199s


The full log is available at
http://patchew.org/logs/20200504084615.27642-1-f4bug@amsat.org/testing.docker-quick@centos7/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Re: [PATCH 0/3] qom: Few trivial patches
Posted by no-reply@patchew.org 4 years ago
Patchew URL: https://patchew.org/QEMU/20200504084615.27642-1-f4bug@amsat.org/



Hi,

This series failed the asan build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

=== TEST SCRIPT BEGIN ===
#!/bin/bash
export ARCH=x86_64
make docker-image-fedora V=1 NETWORK=1
time make docker-test-debug@fedora TARGET_LIST=x86_64-softmmu J=14 NETWORK=1
=== TEST SCRIPT END ===

clang -iquote /tmp/qemu-test/build/tests -iquote tests -iquote /tmp/qemu-test/src/tcg/i386 -isystem /tmp/qemu-test/src/linux-headers -isystem /tmp/qemu-test/build/linux-headers -iquote . -iquote /tmp/qemu-test/src -iquote /tmp/qemu-test/src/accel/tcg -iquote /tmp/qemu-test/src/include -iquote /tmp/qemu-test/src/disas/libvixl -I/usr/include/pixman-1   -Werror -fsanitize=undefined -fsanitize=address  -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include  -fPIE -DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99  -Wno-string-plus-int -Wno-typedef-redefinition -Wno-initializer-overrides -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-definition -Wtype-limits -fstack-protector-strong   -I/usr/include/p11-kit-1   -DLEGACY_RDMA_REG_MR -DSTRUCT_IOVEC_DEFINED  -I/usr/include/libpng16  -I/usr/include/spice-1 -I/usr/include/spice-server -I/usr/include/cacard -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/nss3 -I/usr/include/nspr4 -pthread -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -I/usr/include/pixman-1   -I/tmp/qemu-test/src/tests -I/tmp/qemu-test/src/tests/qtest -MMD -MP -MT tests/test-io-channel-buffer.o -MF tests/test-io-channel-buffer.d -g   -c -o tests/test-io-channel-buffer.o /tmp/qemu-test/src/tests/test-io-channel-buffer.c
clang -iquote /tmp/qemu-test/build/tests -iquote tests -iquote /tmp/qemu-test/src/tcg/i386 -isystem /tmp/qemu-test/src/linux-headers -isystem /tmp/qemu-test/build/linux-headers -iquote . -iquote /tmp/qemu-test/src -iquote /tmp/qemu-test/src/accel/tcg -iquote /tmp/qemu-test/src/include -iquote /tmp/qemu-test/src/disas/libvixl -I/usr/include/pixman-1   -Werror -fsanitize=undefined -fsanitize=address  -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include  -fPIE -DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99  -Wno-string-plus-int -Wno-typedef-redefinition -Wno-initializer-overrides -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-definition -Wtype-limits -fstack-protector-strong   -I/usr/include/p11-kit-1   -DLEGACY_RDMA_REG_MR -DSTRUCT_IOVEC_DEFINED  -I/usr/include/libpng16  -I/usr/include/spice-1 -I/usr/include/spice-server -I/usr/include/cacard -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/nss3 -I/usr/include/nspr4 -pthread -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -I/usr/include/pixman-1   -I/tmp/qemu-test/src/tests -I/tmp/qemu-test/src/tests/qtest -MMD -MP -MT tests/test-base64.o -MF tests/test-base64.d -g   -c -o tests/test-base64.o /tmp/qemu-test/src/tests/test-base64.c
clang -iquote /tmp/qemu-test/build/tests -iquote tests -iquote /tmp/qemu-test/src/tcg/i386 -isystem /tmp/qemu-test/src/linux-headers -isystem /tmp/qemu-test/build/linux-headers -iquote . -iquote /tmp/qemu-test/src -iquote /tmp/qemu-test/src/accel/tcg -iquote /tmp/qemu-test/src/include -iquote /tmp/qemu-test/src/disas/libvixl -I/usr/include/pixman-1   -Werror -fsanitize=undefined -fsanitize=address  -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include  -fPIE -DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99  -Wno-string-plus-int -Wno-typedef-redefinition -Wno-initializer-overrides -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-definition -Wtype-limits -fstack-protector-strong   -I/usr/include/p11-kit-1   -DLEGACY_RDMA_REG_MR -DSTRUCT_IOVEC_DEFINED  -I/usr/include/libpng16  -I/usr/include/spice-1 -I/usr/include/spice-server -I/usr/include/cacard -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/nss3 -I/usr/include/nspr4 -pthread -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -I/usr/include/pixman-1   -I/tmp/qemu-test/src/tests -I/tmp/qemu-test/src/tests/qtest -MMD -MP -MT tests/test-crypto-pbkdf.o -MF tests/test-crypto-pbkdf.d -g   -c -o tests/test-crypto-pbkdf.o /tmp/qemu-test/src/tests/test-crypto-pbkdf.c
/tmp/qemu-test/src/tests/test-io-task.c:33:12: error: field has incomplete type 'Object' (aka 'struct Object')
    Object parent;
           ^
/tmp/qemu-test/src/include/qemu/typedefs.h:78:16: note: forward declaration of 'struct Object'
typedef struct Object Object;
               ^
/tmp/qemu-test/src/tests/test-io-task.c:37:17: error: field has incomplete type 'ObjectClass' (aka 'struct ObjectClass')
    ObjectClass parent;
                ^
/tmp/qemu-test/src/include/qemu/typedefs.h:79:16: note: forward declaration of 'struct ObjectClass'
typedef struct ObjectClass ObjectClass;
               ^
/tmp/qemu-test/src/tests/test-io-task.c:40:14: error: unknown type name 'TypeInfo'
static const TypeInfo dummy_info = {
             ^
/tmp/qemu-test/src/tests/test-io-task.c:41:15: error: use of undeclared identifier 'TYPE_OBJECT'
    .parent = TYPE_OBJECT,
              ^
/tmp/qemu-test/src/tests/test-io-task.c:67:19: error: implicit declaration of function 'object_new' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    Object *obj = object_new(TYPE_DUMMY);
                  ^
/tmp/qemu-test/src/tests/test-io-task.c:67:19: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
/tmp/qemu-test/src/tests/test-io-task.c:67:13: error: incompatible integer to pointer conversion initializing 'Object *' (aka 'struct Object *') with an expression of type 'int' [-Werror,-Wint-conversion]
    Object *obj = object_new(TYPE_DUMMY);
            ^     ~~~~~~~~~~~~~~~~~~~~~~
/tmp/qemu-test/src/tests/test-io-task.c:78:5: error: implicit declaration of function 'object_unref' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    object_unref(obj);
    ^
/tmp/qemu-test/src/tests/test-io-task.c:78:5: note: did you mean 'object_new'?
/tmp/qemu-test/src/tests/test-io-task.c:67:19: note: 'object_new' declared here
    Object *obj = object_new(TYPE_DUMMY);
                  ^
/tmp/qemu-test/src/tests/test-io-task.c:78:5: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
    object_unref(obj);
    ^
/tmp/qemu-test/src/tests/test-io-task.c:97:19: error: implicit declaration of function 'object_new' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    Object *obj = object_new(TYPE_DUMMY);
                  ^
/tmp/qemu-test/src/tests/test-io-task.c:97:13: error: incompatible integer to pointer conversion initializing 'Object *' (aka 'struct Object *') with an expression of type 'int' [-Werror,-Wint-conversion]
    Object *obj = object_new(TYPE_DUMMY);
            ^     ~~~~~~~~~~~~~~~~~~~~~~
/tmp/qemu-test/src/tests/test-io-task.c:104:5: error: implicit declaration of function 'object_unref' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    object_unref(obj);
    ^
/tmp/qemu-test/src/tests/test-io-task.c:115:19: error: implicit declaration of function 'object_new' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    Object *obj = object_new(TYPE_DUMMY);
                  ^
/tmp/qemu-test/src/tests/test-io-task.c:115:13: error: incompatible integer to pointer conversion initializing 'Object *' (aka 'struct Object *') with an expression of type 'int' [-Werror,-Wint-conversion]
    Object *obj = object_new(TYPE_DUMMY);
            ^     ~~~~~~~~~~~~~~~~~~~~~~
/tmp/qemu-test/src/tests/test-io-task.c:126:5: error: implicit declaration of function 'object_unref' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    object_unref(obj);
    ^
/tmp/qemu-test/src/tests/test-io-task.c:176:19: error: implicit declaration of function 'object_new' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    Object *obj = object_new(TYPE_DUMMY);
                  ^
/tmp/qemu-test/src/tests/test-io-task.c:176:13: error: incompatible integer to pointer conversion initializing 'Object *' (aka 'struct Object *') with an expression of type 'int' [-Werror,-Wint-conversion]
    Object *obj = object_new(TYPE_DUMMY);
            ^     ~~~~~~~~~~~~~~~~~~~~~~
/tmp/qemu-test/src/tests/test-io-task.c:197:5: error: implicit declaration of function 'object_unref' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    object_unref(obj);
    ^
/tmp/qemu-test/src/tests/test-io-task.c:217:19: error: implicit declaration of function 'object_new' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    Object *obj = object_new(TYPE_DUMMY);
                  ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [/tmp/qemu-test/src/rules.mak:69: tests/test-io-task.o] Error 1
make: *** Waiting for unfinished jobs....
Traceback (most recent call last):
  File "./tests/docker/docker.py", line 664, in <module>
---
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=e30d45c5c8b5458cafeb9e0e8178bb06', '-u', '1003', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=x86_64-softmmu', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew2/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-8i2ztjtp/src/docker-src.2020-05-04-07.30.45.612:/var/tmp/qemu:z,ro', 'qemu:fedora', '/var/tmp/qemu/run', 'test-debug']' returned non-zero exit status 2.
filter=--filter=label=com.qemu.instance.uuid=e30d45c5c8b5458cafeb9e0e8178bb06
make[1]: *** [docker-run] Error 1
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-8i2ztjtp/src'
make: *** [docker-run-test-debug@fedora] Error 2

real    5m38.834s
user    0m8.150s


The full log is available at
http://patchew.org/logs/20200504084615.27642-1-f4bug@amsat.org/testing.asan/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com