From nobody Sun Feb 8 22:58:12 2026 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