From patchwork Tue Mar 7 15:59:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 95003 Delivered-To: patch@linaro.org Received: by 10.140.82.71 with SMTP id g65csp1949966qgd; Tue, 7 Mar 2017 08:02:49 -0800 (PST) X-Received: by 10.25.207.81 with SMTP id f78mr321335lfg.4.1488902569226; Tue, 07 Mar 2017 08:02:49 -0800 (PST) Return-Path: Received: from mx4-phx2.redhat.com (mx4-phx2.redhat.com. [209.132.183.25]) by mx.google.com with ESMTPS id i9si174698lfe.37.2017.03.07.08.02.48 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 07 Mar 2017 08:02:49 -0800 (PST) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.25 as permitted sender) client-ip=209.132.183.25; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.25 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v27FxokL004352; Tue, 7 Mar 2017 10:59:51 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v27FxnXM002002 for ; Tue, 7 Mar 2017 10:59:49 -0500 Received: from colepc.redhat.com (ovpn-116-187.phx2.redhat.com [10.3.116.187]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v27FxmhN028235; Tue, 7 Mar 2017 10:59:48 -0500 From: Cole Robinson To: libvirt-list@redhat.com Date: Tue, 7 Mar 2017 10:59:42 -0500 Message-Id: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] tests: Add storagevol tests for format=iso 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: , MIME-Version: 1.0 Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com Demonstrates the bug fix in commit 0e5db762627 --- tests/storagevolxml2argvdata/iso-input.argv | 1 + tests/storagevolxml2argvdata/iso.argv | 1 + tests/storagevolxml2argvtest.c | 7 +++++++ tests/storagevolxml2xmlin/vol-file-iso.xml | 10 ++++++++++ tests/storagevolxml2xmlout/vol-file-iso.xml | 11 +++++++++++ tests/storagevolxml2xmltest.c | 1 + 6 files changed, 31 insertions(+) create mode 100644 tests/storagevolxml2argvdata/iso-input.argv create mode 100644 tests/storagevolxml2argvdata/iso.argv create mode 100644 tests/storagevolxml2xmlin/vol-file-iso.xml create mode 100644 tests/storagevolxml2xmlout/vol-file-iso.xml -- 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list diff --git a/tests/storagevolxml2argvdata/iso-input.argv b/tests/storagevolxml2argvdata/iso-input.argv new file mode 100644 index 0000000..333d7e6 --- /dev/null +++ b/tests/storagevolxml2argvdata/iso-input.argv @@ -0,0 +1 @@ +qemu-img convert -f raw -O raw /var/lib/libvirt/images/test.iso /var/lib/libvirt/images/sparse.img \ No newline at end of file diff --git a/tests/storagevolxml2argvdata/iso.argv b/tests/storagevolxml2argvdata/iso.argv new file mode 100644 index 0000000..40b99c5 --- /dev/null +++ b/tests/storagevolxml2argvdata/iso.argv @@ -0,0 +1 @@ +qemu-img create -f raw /var/lib/libvirt/images/test.iso 1024K \ No newline at end of file diff --git a/tests/storagevolxml2argvtest.c b/tests/storagevolxml2argvtest.c index bf9dbe5..24c3bac 100644 --- a/tests/storagevolxml2argvtest.c +++ b/tests/storagevolxml2argvtest.c @@ -272,6 +272,13 @@ mymain(void) "pool-dir", "vol-qcow2-nocapacity-backing", NULL, NULL, "qcow2-nocapacity", 0, FMT_OPTIONS); + DO_TEST("pool-dir", "vol-file-iso", + NULL, NULL, + "iso", 0, FMT_OPTIONS); + DO_TEST("pool-dir", "vol-file", + "pool-dir", "vol-file-iso", + "iso-input", 0, FMT_OPTIONS); + return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE; } diff --git a/tests/storagevolxml2xmlin/vol-file-iso.xml b/tests/storagevolxml2xmlin/vol-file-iso.xml new file mode 100644 index 0000000..b1f0756 --- /dev/null +++ b/tests/storagevolxml2xmlin/vol-file-iso.xml @@ -0,0 +1,10 @@ + + test.iso + + 1 + 1 + + + /var/lib/libvirt/images/test.iso + + diff --git a/tests/storagevolxml2xmlout/vol-file-iso.xml b/tests/storagevolxml2xmlout/vol-file-iso.xml new file mode 100644 index 0000000..9783124 --- /dev/null +++ b/tests/storagevolxml2xmlout/vol-file-iso.xml @@ -0,0 +1,11 @@ + + test.iso + + + 1048576 + 1048576 + + /var/lib/libvirt/images/test.iso + + + diff --git a/tests/storagevolxml2xmltest.c b/tests/storagevolxml2xmltest.c index db82bea..18e8016 100644 --- a/tests/storagevolxml2xmltest.c +++ b/tests/storagevolxml2xmltest.c @@ -100,6 +100,7 @@ mymain(void) DO_TEST("pool-dir", "vol-file"); DO_TEST("pool-dir", "vol-file-naming"); DO_TEST("pool-dir", "vol-file-backing"); + DO_TEST("pool-dir", "vol-file-iso"); DO_TEST("pool-dir", "vol-qcow2"); DO_TEST("pool-dir", "vol-qcow2-1.1"); DO_TEST("pool-dir", "vol-qcow2-lazy");