aboutsummaryrefslogtreecommitdiff
path: root/hw/core/machine.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2023-11-22 08:24:55 +0100
committerThomas Huth <thuth@redhat.com>2023-12-20 10:29:23 +0100
commit5712b7e4fbe661338d4581b574eb3b9da9f44915 (patch)
tree5653ffa50cebdf95de013c8eaf6524f74cb6d151 /hw/core/machine.c
parentc363764a6048f64d11c6cabf180154cf6f13ac3a (diff)
tests/unit/test-qmp-event: Simplify event emission check
The generated qapi_event_send_FOO() call an event emitter function. It's test_qapi_event_emit() in this test. It compares the actual event to the expected event, and sets a flag to record it was called. The test functions set expected data and clear the flag before calling qapi_event_send_FOO(), and check the flag afterwards. Make test_qapi_event_emit() consume expected data, and the test functions check it was consumed. Delete the flag. This is simpler. It also catches extraneous calls of test_qapi_event_emit(). Catching that is not worthwhile, but since the cost is negative... Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-ID: <20231122072456.2518816-3-armbru@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'hw/core/machine.c')
0 files changed, 0 insertions, 0 deletions