We are going to delete macros for converting from params/adding event params. Thus let's make macros conform to existing virDomainBlockIoTuneFromParams. Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@xxxxxxxxxxxxx> --- src/test/test_driver.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 58d3d79..fba94b9 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -3677,7 +3677,6 @@ testDomainSetBlockIoTune(virDomainPtr dom, } info = conf_disk->blkdeviotune; - info.group_name = g_strdup(conf_disk->blkdeviotune.group_name); if (virTypedParamsAddString(&eventParams, &eventNparams, &eventMaxparams, VIR_DOMAIN_TUNABLE_BLKDEV_DISK, path) < 0) @@ -3739,7 +3738,6 @@ testDomainSetBlockIoTune(virDomainPtr dom, VIR_DOMAIN_TUNABLE_BLKDEV_SIZE_IOPS_SEC); if (STREQ(param->field, VIR_DOMAIN_BLOCK_IOTUNE_GROUP_NAME)) { - VIR_FREE(info.group_name); info.group_name = g_strdup(param->value.s); if (virTypedParamsAddString(&eventParams, &eventNparams, @@ -3771,6 +3769,9 @@ testDomainSetBlockIoTune(virDomainPtr dom, } #undef SET_IOTUNE_FIELD + if (!info.group_name) + info.group_name = g_strdup(conf_disk->blkdeviotune.group_name); + if (virDomainBlockIoTuneValidate(&info) < 0) goto cleanup; -- 1.8.3.1