From: Ilias Stamatis Date: Fri, 12 Jul 2019 05:55:35 +0000 (+0200) Subject: test_driver: testDomainSetMaxMemory should simply forward the call X-Git-Tag: v5.6.0-rc1~98 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4837328d684a62b307f04b684df19c011e657c25;p=thirdparty%2Flibvirt.git test_driver: testDomainSetMaxMemory should simply forward the call Signed-off-by: Ilias Stamatis Reviewed-by: Erik Skultety --- diff --git a/src/test/test_driver.c b/src/test/test_driver.c index f604799881..22b96d435b 100755 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -2482,20 +2482,6 @@ testDomainGetMaxMemory(virDomainPtr domain) return ret; } -static int testDomainSetMaxMemory(virDomainPtr domain, - unsigned long memory) -{ - virDomainObjPtr privdom; - - if (!(privdom = testDomObjFromDomain(domain))) - return -1; - - /* XXX validate not over host memory wrt to other domains */ - virDomainDefSetMemoryTotal(privdom->def, memory); - - virDomainObjEndAPI(&privdom); - return 0; -} static int testDomainSetMemoryStatsPeriod(virDomainPtr dom, @@ -2597,6 +2583,14 @@ static int testDomainSetMemory(virDomainPtr domain, return testDomainSetMemoryFlags(domain, memory, VIR_DOMAIN_AFFECT_LIVE); } + +static int testDomainSetMaxMemory(virDomainPtr domain, + unsigned long memory) +{ + return testDomainSetMemoryFlags(domain, memory, VIR_DOMAIN_MEM_MAXIMUM); +} + + static int testDomainGetVcpusFlags(virDomainPtr domain, unsigned int flags) {