mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
qapi: Enforce event naming rules
Event names should be ALL_CAPS with words separated by underscore. Enforce this. The only offenders are in tests/. Fix them. Existing test event-case covers the new error. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20210323094025.3569441-14-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
00ffe242d6
commit
d4f4cae8de
11 changed files with 22 additions and 34 deletions
|
@ -143,7 +143,7 @@ static void test_event_d(TestEventData *data,
|
|||
|
||||
static void test_event_deprecated(TestEventData *data, const void *unused)
|
||||
{
|
||||
data->expect = qdict_from_jsonf_nofail("{ 'event': 'TEST-EVENT-FEATURES1' }");
|
||||
data->expect = qdict_from_jsonf_nofail("{ 'event': 'TEST_EVENT_FEATURES1' }");
|
||||
|
||||
memset(&compat_policy, 0, sizeof(compat_policy));
|
||||
|
||||
|
@ -163,7 +163,7 @@ static void test_event_deprecated_data(TestEventData *data, const void *unused)
|
|||
{
|
||||
memset(&compat_policy, 0, sizeof(compat_policy));
|
||||
|
||||
data->expect = qdict_from_jsonf_nofail("{ 'event': 'TEST-EVENT-FEATURES0',"
|
||||
data->expect = qdict_from_jsonf_nofail("{ 'event': 'TEST_EVENT_FEATURES0',"
|
||||
" 'data': { 'foo': 42 } }");
|
||||
qapi_event_send_test_event_features0(42);
|
||||
g_assert(data->emitted);
|
||||
|
@ -172,7 +172,7 @@ static void test_event_deprecated_data(TestEventData *data, const void *unused)
|
|||
|
||||
compat_policy.has_deprecated_output = true;
|
||||
compat_policy.deprecated_output = COMPAT_POLICY_OUTPUT_HIDE;
|
||||
data->expect = qdict_from_jsonf_nofail("{ 'event': 'TEST-EVENT-FEATURES0' }");
|
||||
data->expect = qdict_from_jsonf_nofail("{ 'event': 'TEST_EVENT_FEATURES0' }");
|
||||
qapi_event_send_test_event_features0(42);
|
||||
g_assert(data->emitted);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue