[libvirt PATCH v3 6/8] tests: Test vmx files with missing images

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---
 .../vmx2xml-cdrom-ide-file-missing-datastore.vmx           | 6 ++++++
 tests/vmx2xmldata/vmx2xml-cdrom-ide-file-missing-file.vmx  | 6 ++++++
 .../vmx2xml-harddisk-ide-file-missing-datastore.vmx        | 6 ++++++
 .../vmx2xml-harddisk-scsi-file-missing-file.vmx            | 7 +++++++
 tests/vmx2xmltest.c                                        | 6 ++++++
 5 files changed, 31 insertions(+)
 create mode 100644 tests/vmx2xmldata/vmx2xml-cdrom-ide-file-missing-datastore.vmx
 create mode 100644 tests/vmx2xmldata/vmx2xml-cdrom-ide-file-missing-file.vmx
 create mode 100644 tests/vmx2xmldata/vmx2xml-harddisk-ide-file-missing-datastore.vmx
 create mode 100644 tests/vmx2xmldata/vmx2xml-harddisk-scsi-file-missing-file.vmx

diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-ide-file-missing-datastore.vmx b/tests/vmx2xmldata/vmx2xml-cdrom-ide-file-missing-datastore.vmx
new file mode 100644
index 000000000000..8a8de892c88a
--- /dev/null
+++ b/tests/vmx2xmldata/vmx2xml-cdrom-ide-file-missing-datastore.vmx
@@ -0,0 +1,6 @@
+config.version = "8"
+virtualHW.version = "4"
+ide0:0.present = "true"
+ide0:0.deviceType = "cdrom-image"
+ide0:0.fileName = "/vmfs/volumes/missing/cdrom.iso"
+displayName = "test"
diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-ide-file-missing-file.vmx b/tests/vmx2xmldata/vmx2xml-cdrom-ide-file-missing-file.vmx
new file mode 100644
index 000000000000..6ee2fb553ae4
--- /dev/null
+++ b/tests/vmx2xmldata/vmx2xml-cdrom-ide-file-missing-file.vmx
@@ -0,0 +1,6 @@
+config.version = "8"
+virtualHW.version = "4"
+ide0:0.present = "true"
+ide0:0.deviceType = "cdrom-image"
+ide0:0.fileName = "/vmfs/volumes/ds/missing.iso"
+displayName = "test"
diff --git a/tests/vmx2xmldata/vmx2xml-harddisk-ide-file-missing-datastore.vmx b/tests/vmx2xmldata/vmx2xml-harddisk-ide-file-missing-datastore.vmx
new file mode 100644
index 000000000000..9d89ce7158a8
--- /dev/null
+++ b/tests/vmx2xmldata/vmx2xml-harddisk-ide-file-missing-datastore.vmx
@@ -0,0 +1,6 @@
+config.version = "8"
+virtualHW.version = "4"
+ide0:0.present = "true"
+ide0:0.deviceType = "ata-hardDisk"
+ide0:0.fileName = "/vmfs/volumes/missing/harddisk.vmdk"
+displayName = "test"
diff --git a/tests/vmx2xmldata/vmx2xml-harddisk-scsi-file-missing-file.vmx b/tests/vmx2xmldata/vmx2xml-harddisk-scsi-file-missing-file.vmx
new file mode 100644
index 000000000000..d39f657e437f
--- /dev/null
+++ b/tests/vmx2xmldata/vmx2xml-harddisk-scsi-file-missing-file.vmx
@@ -0,0 +1,7 @@
+config.version = "8"
+virtualHW.version = "4"
+scsi0.present = "true"
+scsi0:0.present = "true"
+scsi0:0.deviceType = "scsi-hardDisk"
+scsi0:0.fileName = "/vmfs/volumes/ds/missing.vmdk"
+displayName = "test"
diff --git a/tests/vmx2xmltest.c b/tests/vmx2xmltest.c
index 3a11dfb41ce8..d622e46fd563 100644
--- a/tests/vmx2xmltest.c
+++ b/tests/vmx2xmltest.c
@@ -247,6 +247,12 @@ mymain(void)
     DO_TEST("cdrom-ide-raw-auto-detect", "cdrom-ide-raw-auto-detect");
     DO_TEST("cdrom-ide-raw-auto-detect", "cdrom-ide-raw-auto-detect");
 
+    DO_TEST_FAIL("cdrom-ide-file-missing-datastore", "cdrom-ide-empty");
+    DO_TEST_FAIL("cdrom-ide-file-missing-file", "cdrom-ide-empty");
+
+    DO_TEST_FAIL("harddisk-ide-file-missing-datastore", "harddisk-ide-file");
+    DO_TEST_FAIL("harddisk-scsi-file-missing-file", "harddisk-scsi-file");
+
     DO_TEST("floppy-file", "floppy-file");
     DO_TEST("floppy-device", "floppy-device");
 
-- 
2.30.0




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux