mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-08 12:41:29 +00:00
test: snapshot revert: always emulate VM process stop
Reflect the same change in test driver as in QEMU driver because the compatibility check code isn't perfect. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
2ef6b1cecf
commit
5bed5db990
@ -9076,20 +9076,6 @@ testDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
|
|||||||
|
|
||||||
if (virDomainObjIsActive(vm)) {
|
if (virDomainObjIsActive(vm)) {
|
||||||
/* Transitions 5, 6, 8, 9 */
|
/* Transitions 5, 6, 8, 9 */
|
||||||
/* Check for ABI compatibility. */
|
|
||||||
if (!virDomainDefCheckABIStability(vm->def, config,
|
|
||||||
privconn->xmlopt)) {
|
|
||||||
virErrorPtr err = virGetLastError();
|
|
||||||
|
|
||||||
if (!(flags & VIR_DOMAIN_SNAPSHOT_REVERT_FORCE)) {
|
|
||||||
/* Re-spawn error using correct category. */
|
|
||||||
if (err->code == VIR_ERR_CONFIG_UNSUPPORTED)
|
|
||||||
virReportError(VIR_ERR_SNAPSHOT_REVERT_RISKY, "%s",
|
|
||||||
err->str2);
|
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
|
|
||||||
virResetError(err);
|
|
||||||
testDomainShutdownState(snapshot->domain, vm,
|
testDomainShutdownState(snapshot->domain, vm,
|
||||||
VIR_DOMAIN_SHUTOFF_FROM_SNAPSHOT);
|
VIR_DOMAIN_SHUTOFF_FROM_SNAPSHOT);
|
||||||
event = virDomainEventLifecycleNewFromObj(vm,
|
event = virDomainEventLifecycleNewFromObj(vm,
|
||||||
@ -9097,7 +9083,6 @@ testDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
|
|||||||
VIR_DOMAIN_EVENT_STOPPED_FROM_SNAPSHOT);
|
VIR_DOMAIN_EVENT_STOPPED_FROM_SNAPSHOT);
|
||||||
virObjectEventStateQueue(privconn->eventState, event);
|
virObjectEventStateQueue(privconn->eventState, event);
|
||||||
goto load;
|
goto load;
|
||||||
}
|
|
||||||
|
|
||||||
if (virDomainObjGetState(vm, NULL) == VIR_DOMAIN_RUNNING) {
|
if (virDomainObjGetState(vm, NULL) == VIR_DOMAIN_RUNNING) {
|
||||||
/* Transitions 5, 6 */
|
/* Transitions 5, 6 */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user