]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
tests: Test vmx files with missing images
authorMartin Kletzander <mkletzan@redhat.com>
Tue, 5 Jan 2021 13:19:34 +0000 (14:19 +0100)
committerMartin Kletzander <mkletzan@redhat.com>
Wed, 6 Jan 2021 01:05:10 +0000 (02:05 +0100)
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
tests/vmx2xmldata/vmx2xml-cdrom-ide-file-missing-datastore.vmx [new file with mode: 0644]
tests/vmx2xmldata/vmx2xml-cdrom-ide-file-missing-file.vmx [new file with mode: 0644]
tests/vmx2xmldata/vmx2xml-harddisk-ide-file-missing-datastore.vmx [new file with mode: 0644]
tests/vmx2xmldata/vmx2xml-harddisk-scsi-file-missing-file.vmx [new file with mode: 0644]
tests/vmx2xmltest.c

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 (file)
index 0000000..8a8de89
--- /dev/null
@@ -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 (file)
index 0000000..6ee2fb5
--- /dev/null
@@ -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 (file)
index 0000000..9d89ce7
--- /dev/null
@@ -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 (file)
index 0000000..d39f657
--- /dev/null
@@ -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"
index 3a11dfb41ce869e6d5315576e9a62ab9c0648f3f..d622e46fd5631c24739f4c50d2b178919949b0fc 100644 (file)
@@ -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");