On Fri, Jul 12, 2019 at 07:55:33AM +0200, Ilias Stamatis wrote: > Update the current or max memory, on the persistent or live definition > depending on the flags which are currently ignored. > > Signed-off-by: Ilias Stamatis <stamatis.iliass@xxxxxxxxx> > --- > src/test/test_driver.c | 51 +++++++++++++++++++++++++++++++++++------- > 1 file changed, 43 insertions(+), 8 deletions(-) > > diff --git a/src/test/test_driver.c b/src/test/test_driver.c > index c10344f6cd..90910060ed 100644 > --- a/src/test/test_driver.c > +++ b/src/test/test_driver.c > @@ -2473,24 +2473,59 @@ static int testDomainSetMemoryFlags(virDomainPtr domain, > unsigned long memory, > unsigned int flags) > { > - virDomainObjPtr privdom; > + virDomainObjPtr vm; > + virDomainDefPtr def; > int ret = -1; > > - virCheckFlags(0, -1); > + virCheckFlags(VIR_DOMAIN_AFFECT_LIVE | > + VIR_DOMAIN_AFFECT_CONFIG | > + VIR_DOMAIN_MEM_MAXIMUM, -1); > > - if (!(privdom = testDomObjFromDomain(domain))) > + if (!(vm = testDomObjFromDomain(domain))) > return -1; > > - if (memory > virDomainDefGetMemoryTotal(privdom->def)) { > - virReportError(VIR_ERR_INVALID_ARG, __FUNCTION__); > + if (!(def = virDomainObjGetOneDef(vm, flags))) > goto cleanup; > + > + if (flags & VIR_DOMAIN_MEM_MAXIMUM) { > + if (virDomainObjCheckActive(vm)) { ^This should be virDomainObjIsActive(vm) right? With that: Reviewed-by: Erik Skultety <eskultet@xxxxxxxxxx> -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list