On Mon, Jan 27, 2020 at 12:55:02 -0600, Eric Blake wrote: > On 1/9/20 12:21 PM, Peter Krempa wrote: > > Add test infrastructure and a basic test for bitmap deletion. > > > > Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> > > --- > > tests/qemublocktest.c | 59 +++++++++++++++++++ > > .../checkpointdelete/basic-noparent-out.json | 9 +++ > > 2 files changed, 68 insertions(+) > > create mode 100644 tests/qemublocktestdata/checkpointdelete/basic-noparent-out.json > > > > > +static int > > +testQemuCheckpointDeleteMerge(const void *opaque) > > +{ > > + const struct testQemuCheckpointDeleteMergeData *data = opaque; > > + g_autofree char *actual = NULL; > > + g_autofree char *expectpath = NULL; > > + g_autoptr(virJSONValue) actions = NULL; > > + bool currentcheckpoint; > > + > > + expectpath = g_strdup_printf("%s/%s%s-out.json", abs_srcdir, > > + checkpointDeletePrefix, data->name); > > + > > + if (!(actions = virJSONValueNewArray())) > > + return -1; > > + > > + /* hack to get the 'current' state until the function stops accepting it */ > > + currentcheckpoint = STREQ("current", data->deletebitmap); > > + > > + if (qemuCheckpointDiscardDiskBitmaps(data->chain, > > + data->deletebitmap, > > + data->parentbitmap, > > + currentcheckpoint, > > + actions) < 0) { > > Are there patches planned later on to change this? Or is this comment going > to be an instance of technical debt for an unknown length of time? Patch 13 modifies qemuCheckpointDiscardDiskBitmaps to work accross the backing chain and after that modification it doesn't require the parameter any more.