marcandre.lureau@redhat.com writes:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> The generated code doesn't quite handle the conditional arguments.
> For example, 'bar' in 'test-if-cmd' is not correctly surrounded by #if
> conditions. See generated code in qmp_marshal_test_if_cmd().
>
> Note that if there are multiple optional arguments at the last position,
> there might be compilation issues due to extra comas. I left an assert
> and FIXME for later.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Fails "make check" for me:
2/2 qemu:qapi-schema+qapi-frontend / QAPI schema regression tests FAIL 0.09s exit status 1
>>> MALLOC_PERTURB_=241 PYTHONPATH=/work/armbru/qemu/scripts /usr/bin/python3 [...]
――――――――――――――――――――――――――――――――――――― ✀ ―――――――――――――――――――――――――――――――――――――
stdout:
--- /work/armbru/qemu/bld-clang/../tests/qapi-schema/qapi-schema-test.out
+++
@@ -297,6 +297,7 @@
member foo: TestIfStruct optional=False
member bar: TestIfEnumList optional=False
if TEST_IF_EVT_BAR
+ member baz: int optional=False
if {'all': ['TEST_IF_EVT', 'TEST_IF_STRUCT']}
event TEST_IF_EVENT q_obj_TEST_IF_EVENT-arg
boxed=False
stderr:
qapi-schema-test FAIL
This is trivially fixed. Can you review the patch, and in particular comment on the FIXME left, whether it is acceptable?
thanks