libvirt/src/test
Eric Blake 02c4e24db7 snapshot: Add accessors for updating snapshot list relations
Rather than allowing a leaky abstraction where multiple drivers have
to open-code operations that update the relations in a
virDomainSnapshotObjList, it is better to add accessor functions so
that updates to relations are maintained closer to the internals.
This patch finishes the job started in the previous patch, by getting
rid of all direct access to nchildren, first_child, or sibling outside
of the lowest level functions, making it easier to refactor later on.

The lone new caller to virDomainSnapshotObjListSize() checks for a
return != 0, because it wants to handles errors (-1, only possible if
the hash table wasn't allocated) and existing snapshots (> 0) in the
same manner; we can drop the check for a current snapshot on the
grounds that there shouldn't be one if there are no snapshots.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
2019-03-22 01:18:33 -05:00
..
Makefile.inc.am make: split test driver build rules into test/Makefile.inc.am 2018-02-23 13:14:25 +00:00
test_driver.c snapshot: Add accessors for updating snapshot list relations 2019-03-22 01:18:33 -05:00
test_driver.h Remove even more Author(s): lines from source files 2019-01-03 13:24:18 +01:00
test-screenshot.png test: fix screenshot API impl 2016-12-08 10:57:32 +00:00