From nobody Mon Feb 9 00:20:20 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=1559132807; cv=none; d=zoho.com; s=zohoarc; b=PISD/eNENtHtUZo84wQh7Waq+WMihEZT5i1034V1DtzPQdSsLx7lkDIOenUiEcWk0aaMG9Jzrwq3wsr9MmUsbcJ1anJ0DcD40ChEYAJQ/g5jz9/FNy0DtswOppUxXfP8uR8J3Ysjps++f9mIpP3kO7nr0In6plxKuhn+M24iNJc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559132807; 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=BRSM3ZNI5fgerxyJZEb/PFQbS4MauSrO2eeUcJJ8hC4=; b=JQtFvSbbRRF5bvBCBkq/RvkDv7P2441glC/OxysqfxHWEhEGPWKUoEey5muLFu0tdWgzmLcOWET++F5YrhfixSj5CLi9CQKf9V2jqvbZ16UM6FTgT++2dMuWg91kcj2rrGuthfvDdqly35ww1oBb0DP3+NuVI0RJIjw0ePLUFPk= 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 1559132807779866.6466773054985; Wed, 29 May 2019 05:26:47 -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 5E13A30253FE; Wed, 29 May 2019 12:26:45 +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 31A1C5D9D6; Wed, 29 May 2019 12:26:43 +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 DC5CC1806B14; Wed, 29 May 2019 12:26:40 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x4TCOjC8025731 for ; Wed, 29 May 2019 08:24:45 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8278F2B45E; Wed, 29 May 2019 12:24:45 +0000 (UTC) Received: from mx1.redhat.com (ext-mx06.extmail.prod.ext.phx2.redhat.com [10.5.110.30]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1AFB228991; Wed, 29 May 2019 12:24:43 +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 BC94EA3B5E; Wed, 29 May 2019 12:24:32 +0000 (UTC) Received: by mail-ed1-f65.google.com with SMTP id g13so3504511edu.5; Wed, 29 May 2019 05:24:32 -0700 (PDT) Received: from archpc.localdomain (x8d1ee222.agdsn.tu-dresden.de. [141.30.226.34]) by smtp.gmail.com with ESMTPSA id p37sm5214857edc.14.2019.05.29.05.24.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 May 2019 05:24:26 -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=pfRLi8ac3smA6cg93yW+zIq36QaHYL5yYVz3R2KFZjU=; b=O+d2xOo4eI6GzvmzjkftPqxn4EJyE/rNo1/ZCweSOx5kBUxKPr/hz8UVWLiYNXQjC9 4ynlIn3OfZP4LyJR6k5ettBrkKmlqw/MeUq6XkOSjFfuPdBnInKKOMQZnWalY0bRVUbb 05VnZ2/xq4DKy9ycOGUAVpb/A3zEfKdFA5mtR2d92DzwJ2SrsITX6NgxrlQ/Ap51NEGN 47cRdvBtL0qPMnACuaO92tb+lHILqOb3xSmrhc9tDI/VfTDndep4+8eDnqeCP+hrN3qY Kq7YnSdvu0lCc3viHSPstDlvI5PDmZq/9dhF/++vp6s1yASiFR0nkbqiH1msDWTwarQD EHww== 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=pfRLi8ac3smA6cg93yW+zIq36QaHYL5yYVz3R2KFZjU=; b=o+KIHBKPXdAZjy+oXfr53fMaDRqLdY6ie5lOjOyMIOLSo812w4A6PQcd/Lf0FnZa/S nrweL+bHoRhOYHqnjAifabFHy3Bp3xlr0M9vW9SoH0QwxHRAX4VtrdaWwCFELtaUNYv7 sdHSgxKTDnI9SQYSlO29bEjrHXXkJ68G0Ek9ioBl5FsBBGBU0u19F+oWqeRy9AXlQcwy wW2tnG1zewCPwUu+7Gc3gvVj31nGSqg6mRImia7oavrtctcDeVJuBomMMtvQcKEAaTCE //kc839MceDhAT4VxFqHagy3oHvxLTWs/YHxJc9L55oMVgXKtk+o5LUSDVAUUk95orsw RfZA== X-Gm-Message-State: APjAAAVohRkIGj95jrMsrZPkxioHiRS4fZQbgR+WLyfXHHmHzJIgzF8U nZ1h6r2ob+quPz+Rqx7TlAMY/NUZ X-Google-Smtp-Source: APXvYqzWRF5s4BdvMBnqMGnDIR1Cl2VhgDFMt5vWWEE02NwdpJxZoil4fzLdwlLOAAzDzFSo5cnPLw== X-Received: by 2002:a50:fd15:: with SMTP id i21mr10360372eds.89.1559132667002; Wed, 29 May 2019 05:24:27 -0700 (PDT) From: Ilias Stamatis To: libvir-list@redhat.com Date: Wed, 29 May 2019 14:22:58 +0200 Message-Id: <20190529122259.14979-4-stamatis.iliass@gmail.com> In-Reply-To: <20190529122259.14979-1-stamatis.iliass@gmail.com> References: <20190529122259.14979-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.30]); Wed, 29 May 2019 12:24:33 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 29 May 2019 12:24:33 +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.109 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, 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.78 on 10.5.110.30 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 3/4] test_driver: implement virDomainSaveImageDefineXML 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, 29 May 2019 12:26:46 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Updates the existing image stored in @path, in case @dxml contains valid XML supported by the fake host. Signed-off-by: Ilias Stamatis Reviewed-by: Erik Skultety --- 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 ce32570b75..b0195ac63d 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -2228,6 +2228,33 @@ testDomainRestore(virConnectPtr conn, return testDomainRestoreFlags(conn, path, NULL, 0); } +static int +testDomainSaveImageDefineXML(virConnectPtr conn, + const char *path, + const char *dxml, + unsigned int flags) +{ + int ret =3D -1; + virDomainDefPtr def =3D NULL; + testDriverPtr privconn =3D conn->privateData; + + virCheckFlags(VIR_DOMAIN_SAVE_RUNNING | + VIR_DOMAIN_SAVE_PAUSED, -1); + + if ((def =3D virDomainDefParseString(dxml, privconn->caps, privconn->x= mlopt, NULL, + VIR_DOMAIN_DEF_PARSE_INACTIVE)) =3D= =3D NULL) + goto cleanup; + + if (!testDomainSaveImageWrite(privconn, def, path)) + goto cleanup; + + ret =3D 0; + + cleanup: + virDomainDefFree(def); + return ret; +} + static int testDomainCoreDumpWithFormat(virDomainPtr domain, const char *to, unsigned int dumpformat, @@ -7010,6 +7037,7 @@ static virHypervisorDriver testHypervisorDriver =3D { .domainSaveFlags =3D testDomainSaveFlags, /* 0.9.4 */ .domainRestore =3D testDomainRestore, /* 0.3.2 */ .domainRestoreFlags =3D testDomainRestoreFlags, /* 0.9.4 */ + .domainSaveImageDefineXML =3D testDomainSaveImageDefineXML, /* 5.4.0 */ .domainCoreDump =3D testDomainCoreDump, /* 0.3.2 */ .domainCoreDumpWithFormat =3D testDomainCoreDumpWithFormat, /* 1.2.3 */ .domainSetVcpus =3D testDomainSetVcpus, /* 0.1.4 */ -- 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list