From nobody Tue May 7 14:06:01 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1565197471; cv=none; d=zoho.com; s=zohoarc; b=KkoFgeHHYyUYtRukYW/BPO0mirnY5eLHzHtfqR6UMCeXLiT10O+xMRtd+lHbmlRT1vlaSMRigc2IU+lOVQpN+VZhi1KfCHaQzerNipcg5Iy9DYSUOqkhnYxuZ6tNnyy3GE1G/3Niot4jo/8nUH/xq95LTxU8Jp420dwYdE2r4Y0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565197471; 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:ARC-Authentication-Results; bh=ZlwklQeJJcXR4ErXCHtzGiupUCHGokeX6EhpjSGZT3w=; b=I0OXY5HAFyArdGs20eE2BDcq6OyeCLQLPuXFLLQ+FfWM0da0O30TvCqK0m+M4kYaSVMbAouf2AOdJZYNTg+AFYOVyC5b+D7Aebzy3KNatb66iihZmj/UVn+VHf6awCT5cARWyc1IylZEcSYNYdE9RMjHeQpkRwlu8CqIqgCN5/0= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1565197471278173.65739041081315; Wed, 7 Aug 2019 10:04:31 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AEA4FC08E2AC; Wed, 7 Aug 2019 17:04:29 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8A7E15D9CD; Wed, 7 Aug 2019 17:04:29 +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 563D24E9F2; Wed, 7 Aug 2019 17:04:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x77GvF6Y024403 for ; Wed, 7 Aug 2019 12:57:15 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4994760BE1; Wed, 7 Aug 2019 16:57:15 +0000 (UTC) Received: from mx1.redhat.com (ext-mx19.extmail.prod.ext.phx2.redhat.com [10.5.110.48]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4376060BE0 for ; Wed, 7 Aug 2019 16:57:12 +0000 (UTC) Received: from mail-ed1-f65.google.com (mail-ed1-f65.google.com [209.85.208.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 887B43007F2A for ; Wed, 7 Aug 2019 16:57:11 +0000 (UTC) Received: by mail-ed1-f65.google.com with SMTP id v15so87069004eds.9 for ; Wed, 07 Aug 2019 09:57:11 -0700 (PDT) Received: from archlap.localdomain ([89.27.154.45]) by smtp.gmail.com with ESMTPSA id m12sm7359374edr.65.2019.08.07.09.57.08 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 07 Aug 2019 09:57:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=V+3hy2jjlqfpK2VmHdGT04Ufd2pCGceK++TLMC7HBtw=; b=dv0mlC9K0Df8yaR4JN+D0datWFluImJ55cvhcXeGg63nWr/zE8xsOU4wBH3KuzFew0 2Bk3OkwClnGumqvi76p3xFiTGjOEVJU7yYw3uIIGfTrYxK7TUHxVxyeIJ0x5v9mjoylT fetluyeKmHo1Dnuwl1tWq4giHWIYDxyLtK+SyCgJVlBa579lktVCBHnMhBb4E90EDL9A 1Lwb7j6jA5bMWje09B0S8ZaGLnyk5/kFloX7ju598pa77n8Y2cNbUFZqA0qmYqzYqIPU Q/g00exviB/IfrvAzjf0bb2XC0LnfuF23hPvoUjrAPH9ZT6IXflATjFcmmyDWBsO4PEB uBhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=V+3hy2jjlqfpK2VmHdGT04Ufd2pCGceK++TLMC7HBtw=; b=JGjmgQ9nuWal1qEfSK3a+cTMukVD+GHRQsWynP//sXvJWGGEXZTdKlzJ7o6FNalTkW 0xh2Yc+2UE6edJ6xza52M2R+SsLhSrBs1bxQWAXt4ACJ9cBFdVc3Sl2xyyIoX40fv0hq YgBUthSWys4TDsX9f18B80w8ZGAZ5mReRceEveB+8OlJ8WsU9K0o6/VsouPEejau3p5R 7uw1PWoHVHS1Sbk8jrwo/EuzLeuNsk5OC85GCAswbxwv1uIKBmfu6Spnp+3wpT8aGWzN kPO1EvXcs+pSa75EVbFPPmUFUelQLh6wQZuB51gN54rCPoQD6E3Iy5kRMDlpvVzLME+A wJ3w== X-Gm-Message-State: APjAAAXq7oK5Z494rz0aLQwiq2XssESiPUAO7Mcap+d7KmqcV9IEFS+7 odWDRXOj1gcEugANyGVA3Hg8ivpJgk4iRg== X-Google-Smtp-Source: APXvYqx1YEpngembJnDzLRFchtKJhGHoZLavWGI4SmSj45MkTJjfCk+4iWfOJJKbkEmtHpIpA/FavA== X-Received: by 2002:a17:906:4b18:: with SMTP id y24mr9239802eju.108.1565197029908; Wed, 07 Aug 2019 09:57:09 -0700 (PDT) From: Ilias Stamatis To: libvir-list@redhat.com Date: Wed, 7 Aug 2019 18:56:35 +0200 Message-Id: <20190807165635.30528-2-stamatis.iliass@gmail.com> In-Reply-To: <20190807165635.30528-1-stamatis.iliass@gmail.com> References: <20190807165635.30528-1-stamatis.iliass@gmail.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Wed, 07 Aug 2019 16:57:11 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Wed, 07 Aug 2019 16:57:11 +0000 (UTC) for IP:'209.85.208.65' DOMAIN:'mail-ed1-f65.google.com' HELO:'mail-ed1-f65.google.com' FROM:'stamatis.iliass@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.1 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS) 209.85.208.65 mail-ed1-f65.google.com 209.85.208.65 mail-ed1-f65.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.48 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/2] test_driver: implement virDomainManagedSaveGetXMLDesc 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 07 Aug 2019 17:04:30 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" The managedSave APIs according to the documentation are supposed to operate on a disk file. However, this might not be appropriate in the case of the test driver since: * It's better if the test driver keeps all its state in memory only and doesn't affect the host in any way. * The test driver, apart from "emulating" the domains, it additionally "emulates" a fake physical host. Every time we start a new test connection that sort of means that a new physical host is created as well. And this fake host isn't necessarily the same. What we can do instead is operating on the already existing domain definitions. So along as a connection remains open, a domain can preserve the managed state between different shutdown / create calls. When the test connection closes this means that the fake host is destroyed as well, hence no other state is preserved after that. This way we also make sure that we don't touch the real host's filesystem. Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 6f18baa265..8715d6c0d6 100755 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -7606,6 +7606,33 @@ testDomainManagedSave(virDomainPtr dom, unsigned int= flags) } +static char * +testDomainManagedSaveGetXMLDesc(virDomainPtr dom, + unsigned int flags) +{ + virDomainObjPtr vm; + testDriverPtr privconn =3D dom->conn->privateData; + char *ret =3D NULL; + + virCheckFlags(VIR_DOMAIN_SAVE_IMAGE_XML_SECURE, NULL); + + if (!(vm =3D testDomObjFromDomain(dom))) + return NULL; + + if (vm->hasManagedSave =3D=3D false) { + virReportError(VIR_ERR_OPERATION_INVALID, "%s", + _("domain does not have managed save image")); + goto cleanup; + } + + ret =3D virDomainDefFormat(vm->def, privconn->caps, VIR_DOMAIN_DEF_FOR= MAT_SECURE); + + cleanup: + virDomainObjEndAPI(&vm); + return ret; +} + + static int testDomainHasManagedSaveImage(virDomainPtr dom, unsigned int flags) { @@ -9027,6 +9054,7 @@ static virHypervisorDriver testHypervisorDriver =3D { .domainSendProcessSignal =3D testDomainSendProcessSignal, /* 5.5.0 */ .connectGetCPUModelNames =3D testConnectGetCPUModelNames, /* 1.1.3 */ .domainManagedSave =3D testDomainManagedSave, /* 1.1.4 */ + .domainManagedSaveGetXMLDesc =3D testDomainManagedSaveGetXMLDesc, /* 5= .7.0 */ .domainHasManagedSaveImage =3D testDomainHasManagedSaveImage, /* 1.1.4= */ .domainManagedSaveRemove =3D testDomainManagedSaveRemove, /* 1.1.4 */ .domainMemoryStats =3D testDomainMemoryStats, /* 5.7.0 */ -- 2.22.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Tue May 7 14:06:01 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1565197183; cv=none; d=zoho.com; s=zohoarc; b=IEaRGA41qh9SV7bsyHvGjlJY6zrV/PDCyMN46bHyHS8qflYY+2PKSHQf59yqJEtC8na7aBouEZ+XIb5tdpCZ65cbmlcmq/ltO18U/w5OaSaLnMPnYDHQQS53bGzc5LU/sG0N5O3iP7wKl5BgGILU6ldXCwvEi4wdG6rqMy78w0g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565197183; 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:ARC-Authentication-Results; bh=V7UgE66gCQNY9ygLQsw8r1f2WX32ZjNofuflSm/C6nE=; b=Bayh2r1JLlSAT6PoQdhigP9kEh5FZi0EC1ToPbhOcd5CwK4uTsywl/MQTRhgeo3KGXr/Dw8LZ1Xxn70ppm0c0qiVwa8Iu8fSVz+G1+Sy6VqKpm/fpvXSLtIh/ulVSZj3RaN+kMmpluTX0/NOYqplDRumX9dloUiTFHRjnC3ozTc= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1565197183661353.3181644093445; Wed, 7 Aug 2019 09:59:43 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 87317307F5E4; Wed, 7 Aug 2019 16:59:41 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2EF8A5D9CD; Wed, 7 Aug 2019 16:59:40 +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 562062551C; Wed, 7 Aug 2019 16:59:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x77GvU3t024429 for ; Wed, 7 Aug 2019 12:57:30 -0400 Received: by smtp.corp.redhat.com (Postfix) id 662256012E; Wed, 7 Aug 2019 16:57:30 +0000 (UTC) Received: from mx1.redhat.com (ext-mx13.extmail.prod.ext.phx2.redhat.com [10.5.110.42]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5E6A7601B6 for ; Wed, 7 Aug 2019 16:57:24 +0000 (UTC) Received: from mail-ed1-f66.google.com (mail-ed1-f66.google.com [209.85.208.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 25075308212A for ; Wed, 7 Aug 2019 16:57:23 +0000 (UTC) Received: by mail-ed1-f66.google.com with SMTP id x19so81114998eda.12 for ; Wed, 07 Aug 2019 09:57:23 -0700 (PDT) Received: from archlap.localdomain ([89.27.154.45]) by smtp.gmail.com with ESMTPSA id m12sm7359374edr.65.2019.08.07.09.57.20 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 07 Aug 2019 09:57:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=bbBN+uIdS2Yqmw0rp+hgaiwLpwQ23xOA+5C6Mn6vjaQ=; b=JT+re8xF3eDxum6PDQgU3b5vBGPcpqeTmJGHJiwq82ubW54q9uzAI1R5GsM5u8iZI5 ozNzvYcD8Xb1M/LKi/dVOiZ/K+H+rdn9oP0nrPovhknDya6ou+YZhWgbshnDFJ/EVWEF M5w1DnjKV1d5F5LkkUjcNUicFzyHym5bd+shLGR553gq2fDMoWW6isEqAMN2V/ATPSZr cP/5FWh195jvb39o5l/jO9i/8D/ZOcNcsz32vtWV/QJKkCkHZSponspvwJNKTDb5RTo3 saGCW+GCxeznbO/bA7TkdF0bGYFuHyl6iwofHuCmxER3Zb0kMhYaIv2qu1UpXYFcGAdk mrtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bbBN+uIdS2Yqmw0rp+hgaiwLpwQ23xOA+5C6Mn6vjaQ=; b=QxJMbcAUZrbRX+mkBXsVq050hprx/yG5KRPh8mmFAi3Z/WAvylmvFjQWIxgDdhY0TJ TZF1Euq5ngbEo5t2jAw+wdI5T7Im4mkYW99GiAq3vSViIbSHcxCddEbpvsL0s6hiSKhA EGHbP/ClXyNPe0XeNZBnXBQKaeGv/++ZNkdFdEGwy9bxUXTVcqfPnQaFuc3WN0fCMtV1 6QNuRhUGkZdQyVh6bUhmGdNzijHmSKZ0cqNSXB6WQjfREWw50l3XMXY6uRHBz9tm7uBh K6/WRYs9JGG09dn/mDCXmC9gSCQ9EiLld+UocPQbL1gE97B4M44DJna7eVDtg6l1Jlg7 DyKg== X-Gm-Message-State: APjAAAXI21hiQroEphyGyEuPpmkJO3IfTPoLDL5EzM3MJetL5eKIzLu2 wmdp3KiLUEgWVi/xwGgoe7I6pjek8geXqw== X-Google-Smtp-Source: APXvYqxtapMeWtLxqy2fIgNSQRPU0EYxwb2PHaJbgS3gxgRLi9AEgud5983wFAFAA2EbRlU64d0SUg== X-Received: by 2002:aa7:d417:: with SMTP id z23mr11133241edq.287.1565197041573; Wed, 07 Aug 2019 09:57:21 -0700 (PDT) From: Ilias Stamatis To: libvir-list@redhat.com Date: Wed, 7 Aug 2019 18:56:36 +0200 Message-Id: <20190807165635.30528-3-stamatis.iliass@gmail.com> In-Reply-To: <20190807165635.30528-1-stamatis.iliass@gmail.com> References: <20190807165635.30528-1-stamatis.iliass@gmail.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Wed, 07 Aug 2019 16:57:23 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Wed, 07 Aug 2019 16:57:23 +0000 (UTC) for IP:'209.85.208.66' DOMAIN:'mail-ed1-f66.google.com' HELO:'mail-ed1-f66.google.com' FROM:'stamatis.iliass@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.099 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS) 209.85.208.66 mail-ed1-f66.google.com 209.85.208.66 mail-ed1-f66.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.42 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/2] test_driver: implement virDomainManagedSaveDefineXML 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Wed, 07 Aug 2019 16:59:42 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 8715d6c0d6..360bdef373 100755 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -7633,6 +7633,43 @@ testDomainManagedSaveGetXMLDesc(virDomainPtr dom, } +static int +testDomainManagedSaveDefineXML(virDomainPtr dom, + const char *dxml, + unsigned int flags) +{ + virDomainObjPtr vm =3D NULL; + virDomainDefPtr newdef =3D NULL; + testDriverPtr privconn =3D dom->conn->privateData; + int ret =3D -1; + + virCheckFlags(VIR_DOMAIN_SAVE_BYPASS_CACHE | + VIR_DOMAIN_SAVE_RUNNING | + VIR_DOMAIN_SAVE_PAUSED, -1); + + if (!(vm =3D testDomObjFromDomain(dom))) + return -1; + + if (vm->hasManagedSave =3D=3D false) { + virReportError(VIR_ERR_OPERATION_INVALID, "%s", + _("domain does not have managed save image")); + goto cleanup; + } + + if ((newdef =3D virDomainDefParseString(dxml, privconn->caps, privconn= ->xmlopt, NULL, + VIR_DOMAIN_DEF_PARSE_INACTIVE)) = =3D=3D NULL) + goto cleanup; + + virDomainDefFree(vm->def); + vm->def =3D newdef; + + ret =3D 0; + cleanup: + virDomainObjEndAPI(&vm); + return ret; +} + + static int testDomainHasManagedSaveImage(virDomainPtr dom, unsigned int flags) { @@ -9055,6 +9092,7 @@ static virHypervisorDriver testHypervisorDriver =3D { .connectGetCPUModelNames =3D testConnectGetCPUModelNames, /* 1.1.3 */ .domainManagedSave =3D testDomainManagedSave, /* 1.1.4 */ .domainManagedSaveGetXMLDesc =3D testDomainManagedSaveGetXMLDesc, /* 5= .7.0 */ + .domainManagedSaveDefineXML =3D testDomainManagedSaveDefineXML, /* 5.7= .0 */ .domainHasManagedSaveImage =3D testDomainHasManagedSaveImage, /* 1.1.4= */ .domainManagedSaveRemove =3D testDomainManagedSaveRemove, /* 1.1.4 */ .domainMemoryStats =3D testDomainMemoryStats, /* 5.7.0 */ -- 2.22.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list