On Mon, Nov 15, 2021 at 17:22:51 +0100, Pavel Hrdina wrote: > Now that we always emulate VM process stop we can drop the unused code > and simply the logic. > > Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx> > --- > src/test/test_driver.c | 33 ++++++++------------------------- > 1 file changed, 8 insertions(+), 25 deletions(-) > > diff --git a/src/test/test_driver.c b/src/test/test_driver.c > index 0da8a2ea0f..4ae68571ef 100644 > --- a/src/test/test_driver.c > +++ b/src/test/test_driver.c > @@ -9083,35 +9083,18 @@ testDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, > 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 */ > - was_running = true; > - virDomainObjSetState(vm, VIR_DOMAIN_PAUSED, > - VIR_DOMAIN_PAUSED_FROM_SNAPSHOT); > - /* Create an event now in case the restore fails, so > - * that user will be alerted that they are now paused. > - * If restore later succeeds, we might replace this. */ > - event = virDomainEventLifecycleNewFromObj(vm, > - VIR_DOMAIN_EVENT_SUSPENDED, > - VIR_DOMAIN_EVENT_SUSPENDED_FROM_SNAPSHOT); > - } > - virDomainObjAssignDef(vm, config, false, NULL); > - > } else { > - /* Transitions 2, 3 */ > - load: > was_stopped = true; Same issue as with the patch for the qemu driver. Reviewed-by: Peter Krempa <pkrempa@xxxxxxxxxx>