render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
edecca
From 743fd6401299ceee855b50ee844b8f2fb39551d2 Mon Sep 17 00:00:00 2001
edecca
Message-Id: <743fd6401299ceee855b50ee844b8f2fb39551d2@dist-git>
edecca
From: Peter Krempa <pkrempa@redhat.com>
edecca
Date: Mon, 21 Jan 2019 18:43:12 +0100
edecca
Subject: [PATCH] tests: qemuxml2argv: Add test case for empty CDROM with cache
edecca
 mode
edecca
MIME-Version: 1.0
edecca
Content-Type: text/plain; charset=UTF-8
edecca
Content-Transfer-Encoding: 8bit
edecca
edecca
Upcomming change will influence CDROM with cache mode so add a test
edecca
case.
edecca
edecca
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
edecca
Reviewed-by: Ján Tomko <jtomko@redhat.com>
edecca
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
edecca
(cherry picked from commit a641e044c1294984979199fefbb9a9c928f7708a)
edecca
edecca
https://bugzilla.redhat.com/show_bug.cgi?id=1553255
edecca
edecca
 Conflicts:
edecca
	tests/qemuxml2argvdata/disk-cdrom.args
edecca
            - context: bootindex not yet assumed
edecca
	tests/qemuxml2argvdata/disk-cdrom.x86_64-2.12.0.args
edecca
	tests/qemuxml2argvdata/disk-cdrom.x86_64-latest.args
edecca
            - missing refactor to capability file based tests
edecca
edecca
Reviewed-by: Ján Tomko <jtomko@redhat.com>
edecca
---
edecca
 tests/qemuxml2argvdata/disk-cdrom.args  | 4 +++-
edecca
 tests/qemuxml2argvdata/disk-cdrom.xml   | 6 ++++++
edecca
 tests/qemuxml2xmloutdata/disk-cdrom.xml | 6 ++++++
edecca
 3 files changed, 15 insertions(+), 1 deletion(-)
edecca
edecca
diff --git a/tests/qemuxml2argvdata/disk-cdrom.args b/tests/qemuxml2argvdata/disk-cdrom.args
edecca
index 55a76f6dac..547263cbd8 100644
edecca
--- a/tests/qemuxml2argvdata/disk-cdrom.args
edecca
+++ b/tests/qemuxml2argvdata/disk-cdrom.args
edecca
@@ -24,6 +24,8 @@ server,nowait \
edecca
 -usb \
edecca
 -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
edecca
 -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
edecca
--drive file=/root/boot.iso,format=raw,if=none,id=drive-ide0-1-0,media=cdrom,\
edecca
+-drive file=/root/boot.iso,format=raw,if=none,id=drive-ide0-0-1,media=cdrom,\
edecca
 readonly=on \
edecca
+-device ide-drive,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1 \
edecca
+-drive if=none,id=drive-ide0-1-0,media=cdrom,readonly=on,cache=none \
edecca
 -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0
edecca
diff --git a/tests/qemuxml2argvdata/disk-cdrom.xml b/tests/qemuxml2argvdata/disk-cdrom.xml
edecca
index 341025c477..fa78f652bf 100644
edecca
--- a/tests/qemuxml2argvdata/disk-cdrom.xml
edecca
+++ b/tests/qemuxml2argvdata/disk-cdrom.xml
edecca
@@ -23,6 +23,12 @@
edecca
     <disk type='file' device='cdrom'>
edecca
       <driver name='qemu' type='raw'/>
edecca
       <source file='/root/boot.iso'/>
edecca
+      <target dev='hdb' bus='ide'/>
edecca
+      <readonly/>
edecca
+      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
edecca
+    </disk>
edecca
+    <disk type='file' device='cdrom'>
edecca
+      <driver name='qemu' type='raw' cache='none'/>
edecca
       <target dev='hdc' bus='ide'/>
edecca
       <readonly/>
edecca
       <address type='drive' controller='0' bus='1' target='0' unit='0'/>
edecca
diff --git a/tests/qemuxml2xmloutdata/disk-cdrom.xml b/tests/qemuxml2xmloutdata/disk-cdrom.xml
edecca
index 163ce88f19..ccc2716828 100644
edecca
--- a/tests/qemuxml2xmloutdata/disk-cdrom.xml
edecca
+++ b/tests/qemuxml2xmloutdata/disk-cdrom.xml
edecca
@@ -23,6 +23,12 @@
edecca
     <disk type='file' device='cdrom'>
edecca
       <driver name='qemu' type='raw'/>
edecca
       <source file='/root/boot.iso'/>
edecca
+      <target dev='hdb' bus='ide'/>
edecca
+      <readonly/>
edecca
+      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
edecca
+    </disk>
edecca
+    <disk type='file' device='cdrom'>
edecca
+      <driver name='qemu' type='raw' cache='none'/>
edecca
       <target dev='hdc' bus='ide'/>
edecca
       <readonly/>
edecca
       <address type='drive' controller='0' bus='1' target='0' unit='0'/>
edecca
-- 
edecca
2.20.1
edecca