* [PATCH 0/3] qom: Few trivial patches
@ 2020-05-04 8:46 Philippe Mathieu-Daudé
2020-05-04 8:46 ` [PATCH 1/3] qom/object: Move Object typedef to 'qemu/typedefs.h' Philippe Mathieu-Daudé
` (4 more replies)
0 siblings, 5 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-05-04 8:46 UTC (permalink / raw)
To: qemu-devel
Cc: Daniel P. Berrangé, Eduardo Habkost, qemu-trivial,
Michael Tokarev, Markus Armbruster, Laurent Vivier, Paolo Bonzini,
Philippe Mathieu-Daudé
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/3] qom/object: Move Object typedef to 'qemu/typedefs.h'
2020-05-04 8:46 [PATCH 0/3] qom: Few trivial patches Philippe Mathieu-Daudé
@ 2020-05-04 8:46 ` Philippe Mathieu-Daudé
2020-05-04 17:40 ` Richard Henderson
2020-05-04 8:46 ` [PATCH 2/3] io/task: Move 'qom/object.h' header to source Philippe Mathieu-Daudé
` (3 subsequent siblings)
4 siblings, 1 reply; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-05-04 8:46 UTC (permalink / raw)
To: qemu-devel
Cc: Daniel P. Berrangé, Eduardo Habkost, qemu-trivial,
Michael Tokarev, Markus Armbruster, Laurent Vivier, Paolo Bonzini,
Philippe Mathieu-Daudé
We use the Object type all over the place.
Forward declare it in "qemu/typedefs.h".
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
include/qemu/typedefs.h | 1 +
include/qom/object.h | 2 --
include/qom/qom-qobject.h | 2 --
include/sysemu/sysemu.h | 1 -
4 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h
index 375770a80f..b03ec9f40a 100644
--- a/include/qemu/typedefs.h
+++ b/include/qemu/typedefs.h
@@ -75,6 +75,7 @@ typedef struct NetFilterState NetFilterState;
typedef struct NICInfo NICInfo;
typedef struct NodeInfo NodeInfo;
typedef struct NumaNodeMem NumaNodeMem;
+typedef struct Object Object;
typedef struct ObjectClass ObjectClass;
typedef struct PCIBridge PCIBridge;
typedef struct PCIBus PCIBus;
diff --git a/include/qom/object.h b/include/qom/object.h
index 784c97c0e1..1edc12e64c 100644
--- a/include/qom/object.h
+++ b/include/qom/object.h
@@ -20,8 +20,6 @@
struct TypeImpl;
typedef struct TypeImpl *Type;
-typedef struct Object Object;
-
typedef struct TypeInfo TypeInfo;
typedef struct InterfaceClass InterfaceClass;
diff --git a/include/qom/qom-qobject.h b/include/qom/qom-qobject.h
index 77cd717e3f..82136e6e80 100644
--- a/include/qom/qom-qobject.h
+++ b/include/qom/qom-qobject.h
@@ -13,8 +13,6 @@
#ifndef QEMU_QOM_QOBJECT_H
#define QEMU_QOM_QOBJECT_H
-#include "qom/object.h"
-
/*
* object_property_get_qobject:
* @obj: the object
diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
index ef81302e1a..ca4458e451 100644
--- a/include/sysemu/sysemu.h
+++ b/include/sysemu/sysemu.h
@@ -5,7 +5,6 @@
#include "qemu/timer.h"
#include "qemu/notify.h"
#include "qemu/uuid.h"
-#include "qom/object.h"
/* vl.c */
--
2.21.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/3] io/task: Move 'qom/object.h' header to source
2020-05-04 8:46 [PATCH 0/3] qom: Few trivial patches Philippe Mathieu-Daudé
2020-05-04 8:46 ` [PATCH 1/3] qom/object: Move Object typedef to 'qemu/typedefs.h' Philippe Mathieu-Daudé
@ 2020-05-04 8:46 ` Philippe Mathieu-Daudé
2020-05-04 17:42 ` Richard Henderson
2020-05-04 8:46 ` [PATCH 3/3] qom/object: Make reparenting error more verbose Philippe Mathieu-Daudé
` (2 subsequent siblings)
4 siblings, 1 reply; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-05-04 8:46 UTC (permalink / raw)
To: qemu-devel
Cc: Daniel P. Berrangé, Eduardo Habkost, qemu-trivial,
Michael Tokarev, Markus Armbruster, Laurent Vivier, Paolo Bonzini,
Philippe Mathieu-Daudé
We need "qom/object.h" to call object_ref()/object_unref().
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
include/io/task.h | 2 --
io/task.c | 1 +
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/include/io/task.h b/include/io/task.h
index 1abbfb8b65..6818dfedd0 100644
--- a/include/io/task.h
+++ b/include/io/task.h
@@ -21,8 +21,6 @@
#ifndef QIO_TASK_H
#define QIO_TASK_H
-#include "qom/object.h"
-
typedef struct QIOTask QIOTask;
typedef void (*QIOTaskFunc)(QIOTask *task,
diff --git a/io/task.c b/io/task.c
index 1ae7b86488..53c0bed686 100644
--- a/io/task.c
+++ b/io/task.c
@@ -22,6 +22,7 @@
#include "io/task.h"
#include "qapi/error.h"
#include "qemu/thread.h"
+#include "qom/object.h"
#include "trace.h"
struct QIOTaskThreadData {
--
2.21.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/3] qom/object: Make reparenting error more verbose
2020-05-04 8:46 [PATCH 0/3] qom: Few trivial patches Philippe Mathieu-Daudé
2020-05-04 8:46 ` [PATCH 1/3] qom/object: Move Object typedef to 'qemu/typedefs.h' Philippe Mathieu-Daudé
2020-05-04 8:46 ` [PATCH 2/3] io/task: Move 'qom/object.h' header to source Philippe Mathieu-Daudé
@ 2020-05-04 8:46 ` Philippe Mathieu-Daudé
2020-05-04 11:30 ` [PATCH 0/3] qom: Few trivial patches no-reply
2020-05-04 11:36 ` no-reply
4 siblings, 0 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-05-04 8:46 UTC (permalink / raw)
To: qemu-devel
Cc: Daniel P. Berrangé, Eduardo Habkost, qemu-trivial,
Michael Tokarev, Markus Armbruster, Laurent Vivier, Paolo Bonzini,
Philippe Mathieu-Daudé
Display child and parent names when reparenting occurs.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
qom/object.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/qom/object.c b/qom/object.c
index be700e831f..417fd90aa5 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -1683,7 +1683,12 @@ void object_property_add_child(Object *obj, const char *name,
ObjectProperty *op;
if (child->parent != NULL) {
- error_setg(errp, "child object is already parented");
+ error_setg(errp, "child object '%s' is already parented (parent: '%s') "
+ "can not be children '%s' of '%s'",
+ object_get_typename(child),
+ object_get_typename(child->parent),
+ name,
+ object_get_typename(obj));
return;
}
--
2.21.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 0/3] qom: Few trivial patches
2020-05-04 8:46 [PATCH 0/3] qom: Few trivial patches Philippe Mathieu-Daudé
` (2 preceding siblings ...)
2020-05-04 8:46 ` [PATCH 3/3] qom/object: Make reparenting error more verbose Philippe Mathieu-Daudé
@ 2020-05-04 11:30 ` no-reply
2020-05-04 11:36 ` no-reply
4 siblings, 0 replies; 9+ messages in thread
From: no-reply @ 2020-05-04 11:30 UTC (permalink / raw)
To: f4bug
Cc: berrange, ehabkost, qemu-trivial, f4bug, mjt, qemu-devel, armbru,
pbonzini, laurent
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/3] qom: Few trivial patches
2020-05-04 8:46 [PATCH 0/3] qom: Few trivial patches Philippe Mathieu-Daudé
` (3 preceding siblings ...)
2020-05-04 11:30 ` [PATCH 0/3] qom: Few trivial patches no-reply
@ 2020-05-04 11:36 ` no-reply
4 siblings, 0 replies; 9+ messages in thread
From: no-reply @ 2020-05-04 11:36 UTC (permalink / raw)
To: f4bug
Cc: berrange, ehabkost, qemu-trivial, f4bug, mjt, qemu-devel, armbru,
pbonzini, laurent
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/3] qom/object: Move Object typedef to 'qemu/typedefs.h'
2020-05-04 8:46 ` [PATCH 1/3] qom/object: Move Object typedef to 'qemu/typedefs.h' Philippe Mathieu-Daudé
@ 2020-05-04 17:40 ` Richard Henderson
0 siblings, 0 replies; 9+ messages in thread
From: Richard Henderson @ 2020-05-04 17:40 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Daniel P. Berrangé, Eduardo Habkost, qemu-trivial,
Michael Tokarev, Laurent Vivier, Markus Armbruster, Paolo Bonzini
On 5/4/20 1:46 AM, Philippe Mathieu-Daudé wrote:
> We use the Object type all over the place.
> Forward declare it in "qemu/typedefs.h".
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> include/qemu/typedefs.h | 1 +
> include/qom/object.h | 2 --
> include/qom/qom-qobject.h | 2 --
> include/sysemu/sysemu.h | 1 -
> 4 files changed, 1 insertion(+), 5 deletions(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/3] io/task: Move 'qom/object.h' header to source
2020-05-04 8:46 ` [PATCH 2/3] io/task: Move 'qom/object.h' header to source Philippe Mathieu-Daudé
@ 2020-05-04 17:42 ` Richard Henderson
2020-05-04 19:43 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 9+ messages in thread
From: Richard Henderson @ 2020-05-04 17:42 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Daniel P. Berrangé, Eduardo Habkost, qemu-trivial,
Michael Tokarev, Laurent Vivier, Markus Armbruster, Paolo Bonzini
On 5/4/20 1:46 AM, Philippe Mathieu-Daudé wrote:
> We need "qom/object.h" to call object_ref()/object_unref().
This description doesn't seem to match
> +++ b/include/io/task.h
> @@ -21,8 +21,6 @@
> #ifndef QIO_TASK_H
> #define QIO_TASK_H
>
> -#include "qom/object.h"
> -
> typedef struct QIOTask QIOTask;
>
> typedef void (*QIOTaskFunc)(QIOTask *task,
> diff --git a/io/task.c b/io/task.c
> index 1ae7b86488..53c0bed686 100644
> --- a/io/task.c
> +++ b/io/task.c
> @@ -22,6 +22,7 @@
> #include "io/task.h"
> #include "qapi/error.h"
> #include "qemu/thread.h"
> +#include "qom/object.h"
the change. Since io/task.c includes io/tash.h, what are you actually doing?
r~
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/3] io/task: Move 'qom/object.h' header to source
2020-05-04 17:42 ` Richard Henderson
@ 2020-05-04 19:43 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-05-04 19:43 UTC (permalink / raw)
To: Richard Henderson, qemu-devel
Cc: Daniel P. Berrangé, Eduardo Habkost, qemu-trivial,
Michael Tokarev, Markus Armbruster, Laurent Vivier, Paolo Bonzini
On 5/4/20 7:42 PM, Richard Henderson wrote:
> On 5/4/20 1:46 AM, Philippe Mathieu-Daudé wrote:
>> We need "qom/object.h" to call object_ref()/object_unref().
>
> This description doesn't seem to match
>
>> +++ b/include/io/task.h
>> @@ -21,8 +21,6 @@
>> #ifndef QIO_TASK_H
>> #define QIO_TASK_H
>>
>> -#include "qom/object.h"
>> -
>> typedef struct QIOTask QIOTask;
>>
>> typedef void (*QIOTaskFunc)(QIOTask *task,
>> diff --git a/io/task.c b/io/task.c
>> index 1ae7b86488..53c0bed686 100644
>> --- a/io/task.c
>> +++ b/io/task.c
>> @@ -22,6 +22,7 @@
>> #include "io/task.h"
>> #include "qapi/error.h"
>> #include "qemu/thread.h"
>> +#include "qom/object.h"
>
> the change. Since io/task.c includes io/tash.h, what are you actually doing?
Sorry to not document clearly on the cover.
The original goal was to stop using $SRC_PATH as include directory, but
as it is huge I believe it will never get fully accepted, so I simply
kept the few maybe worthwhile patches...
The final patch is:
-- >8 --
--- a/configure
+++ b/configure
@@ -601,7 +601,7 @@ QEMU_CFLAGS="-fno-strict-aliasing -fno-common
-fwrapv -std=gnu99 $QEMU_CFLAGS"
QEMU_CFLAGS="-Wall -Wundef -Wwrite-strings -Wmissing-prototypes
$QEMU_CFLAGS"
QEMU_CFLAGS="-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS"
QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
$QEMU_CFLAGS"
-QEMU_INCLUDES="-iquote . -iquote \$(SRC_PATH) -iquote
\$(SRC_PATH)/accel/tcg -iquote \$(SRC_PATH)/include"
+QEMU_INCLUDES="-iquote . -iquote \$(SRC_PATH)/accel/tcg -iquote
\$(SRC_PATH)/include"
QEMU_INCLUDES="$QEMU_INCLUDES -iquote \$(SRC_PATH)/disas/libvixl"
if test "$debug_info" = "yes"; then
CFLAGS="-g $CFLAGS"
---
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2020-05-04 19:44 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-04 8:46 [PATCH 0/3] qom: Few trivial patches Philippe Mathieu-Daudé
2020-05-04 8:46 ` [PATCH 1/3] qom/object: Move Object typedef to 'qemu/typedefs.h' Philippe Mathieu-Daudé
2020-05-04 17:40 ` Richard Henderson
2020-05-04 8:46 ` [PATCH 2/3] io/task: Move 'qom/object.h' header to source Philippe Mathieu-Daudé
2020-05-04 17:42 ` Richard Henderson
2020-05-04 19:43 ` Philippe Mathieu-Daudé
2020-05-04 8:46 ` [PATCH 3/3] qom/object: Make reparenting error more verbose Philippe Mathieu-Daudé
2020-05-04 11:30 ` [PATCH 0/3] qom: Few trivial patches no-reply
2020-05-04 11:36 ` no-reply
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).