]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
test: snapshot revert: always emulate VM process stop
authorPavel Hrdina <phrdina@redhat.com>
Thu, 11 Nov 2021 16:36:06 +0000 (17:36 +0100)
committerPavel Hrdina <phrdina@redhat.com>
Tue, 23 Nov 2021 10:41:57 +0000 (11:41 +0100)
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>
src/test/test_driver.c

index 985f08ea1f98687f31bbe73bbe65a73838d9e588..a76b207c0ec5a51a9fcb1fc14e2f08e1f0b4988e 100644 (file)
@@ -9076,28 +9076,13 @@ testDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
 
         if (virDomainObjIsActive(vm)) {
             /* 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,
-                                        VIR_DOMAIN_SHUTOFF_FROM_SNAPSHOT);
-                event = virDomainEventLifecycleNewFromObj(vm,
-                            VIR_DOMAIN_EVENT_STOPPED,
-                            VIR_DOMAIN_EVENT_STOPPED_FROM_SNAPSHOT);
-                virObjectEventStateQueue(privconn->eventState, event);
-                goto load;
-            }
+            testDomainShutdownState(snapshot->domain, vm,
+                                    VIR_DOMAIN_SHUTOFF_FROM_SNAPSHOT);
+            event = virDomainEventLifecycleNewFromObj(vm,
+                                                      VIR_DOMAIN_EVENT_STOPPED,
+                                                      VIR_DOMAIN_EVENT_STOPPED_FROM_SNAPSHOT);
+            virObjectEventStateQueue(privconn->eventState, event);
+            goto load;
 
             if (virDomainObjGetState(vm, NULL) == VIR_DOMAIN_RUNNING) {
                 /* Transitions 5, 6 */