|
From: | Paolo Bonzini |
Subject: | Re: [PATCH 06/25] tests: convert check-qom-proplist to keyval |
Date: | Fri, 22 Jan 2021 15:48:17 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 |
On 22/01/21 15:14, Markus Armbruster wrote:
+ dobj = DUMMY_OBJECT(object_resolve_path_component(object_get_objects_root(), + "dev0"));Why does user_creatable_add_opts() return the object on success, null on failure, but user_creatable_add_dict() only a rather less useful bool?
I would guess that nobody needs it outside tests (I didn't look at the code).
g_assert(dobj); g_assert_cmpstr(dobj->sv, ==, "Hiss hiss hiss"); g_assert(dobj->bv == true); g_assert(dobj->av == DUMMY_PLATYPUS);+ qdict = keyval_parse(params, "qom-type", &help, &err);Why parse again?
Besides the justification of the previous email, user_creatable_add_dict modifies its QDict argument, removing the "qom-type" and "id" keys. Wart fixed in patch 16.
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |