Markus Armbruster 9b090d42ae qapi: Command returning anonymous type doesn't work, outlaw
Reproducer: with

    { 'command': 'user_def_cmd4', 'returns': { 'a': 'int' } }

added to qapi-schema-test.json, qapi-commands.py dies when it tries to
generate the command handler function

    Traceback (most recent call last):
      File "/work/armbru/qemu/scripts/qapi-commands.py", line 359, in <module>
        ret = generate_command_decl(cmd['command'], arglist, ret_type) + "\n"
      File "/work/armbru/qemu/scripts/qapi-commands.py", line 29, in generate_command_decl
        ret_type=c_type(ret_type), name=c_name(name),
      File "/work/armbru/qemu/scripts/qapi.py", line 927, in c_type
        assert isinstance(value, str) and value != ""
    AssertionError

because the return type doesn't exist.

Simply outlaw this usage, and drop or dumb down test cases accordingly.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
2015-09-04 15:47:15 +02:00
..
2014-12-17 05:49:32 +03:00
2014-05-05 20:58:33 +02:00
2012-03-12 15:14:07 +01:00
2015-06-22 17:40:00 +02:00
2014-05-05 20:58:33 +02:00
2014-03-31 22:36:17 +02:00
2014-05-05 20:58:33 +02:00
2014-05-05 20:58:33 +02:00
2014-02-14 21:07:13 +01:00
2015-05-22 15:58:22 -04:00
2014-02-14 20:50:19 +01:00
2014-02-14 16:22:33 +01:00
2015-06-05 19:45:09 +02:00
2013-02-01 08:32:20 +01:00
2014-02-14 21:02:27 +01:00
2014-03-31 22:35:50 +02:00
2014-02-14 16:22:33 +01:00