From d4f4cae8de19d2bdfcf09cdc4676e9b99857dcf2 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 23 Mar 2021 10:40:10 +0100 Subject: 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 Message-Id: <20210323094025.3569441-14-armbru@redhat.com> Reviewed-by: Eric Blake --- tests/qapi-schema/qapi-schema-test.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/qapi-schema/qapi-schema-test.json') diff --git a/tests/qapi-schema/qapi-schema-test.json b/tests/qapi-schema/qapi-schema-test.json index 12ec588b52..a355321258 100644 --- a/tests/qapi-schema/qapi-schema-test.json +++ b/tests/qapi-schema/qapi-schema-test.json @@ -249,7 +249,7 @@ { 'command': 'TestCmdReturnDefThree', 'returns': 'UserDefThree' } -{ 'event': 'TestIfEvent', 'data': +{ 'event': 'TEST_IF_EVENT', 'data': { 'foo': 'TestIfStruct', 'bar': { 'type': ['TestIfEnum'], 'if': 'defined(TEST_IF_EVT_BAR)' } }, 'if': 'defined(TEST_IF_EVT) && defined(TEST_IF_STRUCT)' } @@ -324,8 +324,8 @@ 'features': [ { 'name': 'feature1', 'if': [ 'defined(TEST_IF_COND_1)', 'defined(TEST_IF_COND_2)'] } ] } -{ 'event': 'TEST-EVENT-FEATURES0', +{ 'event': 'TEST_EVENT_FEATURES0', 'data': 'FeatureStruct1' } -{ 'event': 'TEST-EVENT-FEATURES1', +{ 'event': 'TEST_EVENT_FEATURES1', 'features': [ 'deprecated' ] } -- cgit v1.2.3