From: Martin Kletzander Date: Tue, 5 Jan 2021 13:19:34 +0000 (+0100) Subject: tests: Test vmx files with missing images X-Git-Tag: v7.0.0-rc1~100 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6c001a37e4009b6a3b3aecd3c3717e951e8f9011;p=thirdparty%2Flibvirt.git tests: Test vmx files with missing images Signed-off-by: Martin Kletzander --- 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 0000000000..8a8de892c8 --- /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 0000000000..6ee2fb553a --- /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 0000000000..9d89ce7158 --- /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 0000000000..d39f657e43 --- /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 3a11dfb41c..d622e46fd5 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");