diff options
author | Eric Blake <eblake@redhat.com> | 2016-04-28 15:45:21 -0600 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2016-05-12 09:47:54 +0200 |
commit | 7d7a337ec32c77f11ba04da412752b35e18d3c5c (patch) | |
tree | a6cf363d41caf30b3b998ba9d557de7892483eac /tests/test-qmp-output-visitor.c | |
parent | adfb264c9ed04bfc694921b72173be8e29e90024 (diff) |
tests: Add check-qnull
Add a new test, for checking reference counting of qnull(). As
part of the new file, move a previous reference counting change
added in commit a861564 to a more logical place.
Note that while most of the check-q*.c leave visitor stuff to
the test-qmp-*-visitor.c, in this case we actually want the
visitor tests in our new file because we are validating the
reference count of qnull_, which is an internal detail that
test-qmp-*-visitor should not be peeking into (or put another
way, qnull() is the only special case where we don't have
independent allocation of a QObject, so none of the other
visitor tests require the layering violation present in this
test).
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1461879932-9020-14-git-send-email-eblake@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'tests/test-qmp-output-visitor.c')
-rw-r--r-- | tests/test-qmp-output-visitor.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/tests/test-qmp-output-visitor.c b/tests/test-qmp-output-visitor.c index c70926793a..fddb5a6e90 100644 --- a/tests/test-qmp-output-visitor.c +++ b/tests/test-qmp-output-visitor.c @@ -484,8 +484,6 @@ static void test_visitor_out_empty(TestOutputVisitorData *data, arg = qmp_output_get_qobject(data->qov); g_assert(qobject_type(arg) == QTYPE_QNULL); - /* Check that qnull reference counting is sane */ - g_assert(arg->refcnt == 2); qobject_decref(arg); } |