diff options
author | Markus Armbruster | 2021-03-23 10:40:10 +0100 |
---|---|---|
committer | Markus Armbruster | 2021-03-23 22:31:05 +0100 |
commit | d4f4cae8de19d2bdfcf09cdc4676e9b99857dcf2 (patch) | |
tree | 09dcfca6c1af3795cc7902b7a0282f5f78182fcc /tests/unit | |
parent | qapi: Consistently permit any case in downstream prefixes (diff) | |
download | qemu-d4f4cae8de19d2bdfcf09cdc4676e9b99857dcf2.tar.gz qemu-d4f4cae8de19d2bdfcf09cdc4676e9b99857dcf2.tar.xz qemu-d4f4cae8de19d2bdfcf09cdc4676e9b99857dcf2.zip |
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>
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/test-qmp-event.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/unit/test-qmp-event.c b/tests/unit/test-qmp-event.c index 047f44ff9a..d58c3b78f2 100644 --- a/tests/unit/test-qmp-event.c +++ b/tests/unit/test-qmp-event.c @@ -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); |