]> xenbits.xensource.com Git - libvirt.git/commit
test_driver: Fix testDomainSetMemoryFlags' behaviour on config change
authorErik Skultety <eskultet@redhat.com>
Thu, 25 Jul 2019 07:29:36 +0000 (09:29 +0200)
committerErik Skultety <eskultet@redhat.com>
Thu, 25 Jul 2019 08:44:13 +0000 (10:44 +0200)
commita1c04c27bda799bb634e640f67b06f19551389e7
tree8ebb3f55c04c3c787f614920cb532ceeb53c4e13
parent96e31a628cd6a4b7ae042bb7219f31b310cda59b
test_driver: Fix testDomainSetMemoryFlags' behaviour on config change

When commit 6ac402c456a added the API whenever VIR_DOMAIN_MEM_MAXIMUM
was passed the code always checked whether the domain was active and
therefore failed with an error even though only a config change was
requested. Fix the issue by replacing virDomainObjGetOneDef with
virDomainObjGetOneDefState which tells us what definition we're
performing the change on.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Acked-by: Peter Krempa <pkrempa@redhat.com>
src/test/test_driver.c