From nobody Tue Apr 23 23:59:27 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1637655641; cv=none; d=zohomail.com; s=zohoarc; b=ZmZhwjAlhvjkqhP3I6HdXm2UYBCGzWJ/3Z15vWHPHJVD53M2vUe5z4yN+3S2AFKnKQvyyvyoOsa9wnqFBO8S+iE+dL0EuVla3XWX1cZzJxwht3BlCqAlIXcVUnR2jQwF9dJr219hJdEiqELzErWd59Uo5rhmILPl23174CELND0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637655641; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Aprbv212bgmIxCV/cRWZYoSL9+Jpno+WaVpE3AmCHZk=; b=dS17wQPYsY2WGrT32y33dQKuNAVPxtl+MtA1Ig2fdf/8y1rEkS/aD7+eNzHdluf132bcTZu7wMUPK2cUlKqkCR+c/PeGXKlbSBtCofrV5t/iE5LZK8qbrOV1h6/Sc4g9mBBkLY5XqjGHCcs9BFSN0dA/5oXiRSq7UkNq7nd/5vY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1637655641485486.24082095455765; Tue, 23 Nov 2021 00:20:41 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-410-fjiZo6vpM2-J_VQ82SDpGA-1; Tue, 23 Nov 2021 03:20:38 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1D1C8A40C3; Tue, 23 Nov 2021 08:20:31 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EABBA60C5F; Tue, 23 Nov 2021 08:20:28 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id EF3DF1832E7F; Tue, 23 Nov 2021 08:20:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1AN8KMsD031077 for ; Tue, 23 Nov 2021 03:20:22 -0500 Received: by smtp.corp.redhat.com (Postfix) id 2666529403; Tue, 23 Nov 2021 08:20:22 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.194.97]) by smtp.corp.redhat.com (Postfix) with ESMTP id 972F35E274 for ; Tue, 23 Nov 2021 08:20:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1637655640; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Aprbv212bgmIxCV/cRWZYoSL9+Jpno+WaVpE3AmCHZk=; b=AyVyhrIwny/F75sV/pWq+3/2gUjF0cTWumbs7Igu4UALHnBn7TcjPBIQHbRijiDf9T2sEE ZhODtUoQ91NOzLcycaJ0BZHah6YU+vXM0e6SvTIondSwKaaYy4Atj7j6MMhM9Ke9gy8DRb AxaDifV67QrXiSqZSHiC6DWfrHQpkeM= X-MC-Unique: fjiZo6vpM2-J_VQ82SDpGA-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 06.5/12] test: snapshot revert: properly emulate starting CPUs Date: Tue, 23 Nov 2021 09:20:20 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1637655643493100001 Content-Type: text/plain; charset="utf-8" When active snapshot is reverted we stop CPUs in order to load the snapshot but we never start the CPUs again. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/test/test_driver.c | 3 +++ tests/virsh-snapshot | 14 +++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index c17ed9d2a4..985f08ea1f 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -9144,6 +9144,9 @@ testDomainRevertToSnapshot(virDomainSnapshotPtr snaps= hot, virObjectUnref(event); event =3D NULL; =20 + virDomainObjSetState(vm, VIR_DOMAIN_RUNNING, + VIR_DOMAIN_PAUSED_FROM_SNAPSHOT); + if (was_stopped) { /* Transition 2 */ event =3D virDomainEventLifecycleNewFromObj(vm, diff --git a/tests/virsh-snapshot b/tests/virsh-snapshot index 289de5b2db..4c64bb537b 100755 --- a/tests/virsh-snapshot +++ b/tests/virsh-snapshot @@ -137,25 +137,25 @@ Domain snapshot s1 deleted Name Creation Time State --------------------------------------------- s3 TIMESTAMP running - s7 TIMESTAMP paused + s7 TIMESTAMP running =20 Name Creation Time State --------------------------------------------- s2 TIMESTAMP running - s4 TIMESTAMP paused - s5 TIMESTAMP paused - s8 TIMESTAMP paused + s4 TIMESTAMP running + s5 TIMESTAMP running + s8 TIMESTAMP running =20 Name Creation Time State Parent ------------------------------------------------------ s3 TIMESTAMP running - s6 TIMESTAMP paused s3 - s7 TIMESTAMP paused + s6 TIMESTAMP running s3 + s7 TIMESTAMP running =20 Name Creation Time State --------------------------------------------- s2 TIMESTAMP running - s6 TIMESTAMP paused + s6 TIMESTAMP running =20 s2 s4 --=20 2.31.1