Signed-off-by: Ilias Stamatis <stamatis.iliass(a)gmail.com>
---
src/test/test_driver.c | 22 ++++++++--------------
1 file changed, 8 insertions(+), 14 deletions(-)
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 6b39b78a93..8aea739387 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -2454,20 +2454,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 testDomainSetMemoryFlags(virDomainPtr domain,
unsigned long memory,
@@ -2535,6 +2521,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)
{
--
2.22.0