From 0cce10714faa78d963de2d10f7560241d8729c08 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Tue, 16 Jun 2015 10:10:59 +0200 Subject: [PATCH] test: Reuse virDomainObjGetOneDef in testDomainGetVcpusFlags The test driver copies the domain definition correctly so we can reuse the helper. --- src/test/test_driver.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index d1f0af3a95..c0ef459d91 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -2576,13 +2576,9 @@ testDomainGetVcpusFlags(virDomainPtr domain, unsigned int flags) goto cleanup; } - if (virDomainLiveConfigHelperMethod(privconn->caps, privconn->xmlopt, - vm, &flags, &def) < 0) + if (!(def = virDomainObjGetOneDef(vm, flags))) goto cleanup; - if (flags & VIR_DOMAIN_AFFECT_LIVE) - def = vm->def; - ret = (flags & VIR_DOMAIN_VCPU_MAXIMUM) ? def->maxvcpus : def->vcpus; cleanup: -- GitLab