<div dir="ltr"><div class="gmail_extra">On Thu, Aug 29, 2013 at 5:19 AM, Michal Privoznik <span dir="ltr"><<a href="mailto:mprivozn@redhat.com" target="_blank">mprivozn@redhat.com</a>></span> wrote:<br><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 28.08.2013 23:53, Doug Goldstein wrote:<br>
> A user was having an issue with this specific VMWare Fusion config and<br>
> he gave me permission to add it as part of our test suite to further<br>
> expand our VMX test coverage. Unfortunately our VMX parser and<br>
> generator does not support many features contained within and just<br>
> silently ignores fields it does not understand so they had to<br>
> be removed out in the xml2vmx test. The original unmodified version<br>
> exists in the vmx2xml test.<br>
> ---<br>
>  tests/vmx2xmldata/vmx2xml-fusion-in-the-wild-1.vmx | 88 ++++++++++++++++++++++<br>
>  tests/vmx2xmldata/vmx2xml-fusion-in-the-wild-1.xml | 38 ++++++++++<br>
>  tests/vmx2xmltest.c                                |  2 +<br>
>  tests/xml2vmxdata/xml2vmx-fusion-in-the-wild-1.vmx | 30 ++++++++<br>
>  tests/xml2vmxdata/xml2vmx-fusion-in-the-wild-1.xml | 40 ++++++++++<br>
>  tests/xml2vmxtest.c                                |  2 +<br>
>  6 files changed, 200 insertions(+)<br>
>  create mode 100644 tests/vmx2xmldata/vmx2xml-fusion-in-the-wild-1.vmx<br>
>  create mode 100644 tests/vmx2xmldata/vmx2xml-fusion-in-the-wild-1.xml<br>
>  create mode 100644 tests/xml2vmxdata/xml2vmx-fusion-in-the-wild-1.vmx<br>
>  create mode 100644 tests/xml2vmxdata/xml2vmx-fusion-in-the-wild-1.xml<br>
><br>
> diff --git a/tests/vmx2xmldata/vmx2xml-fusion-in-the-wild-1.vmx b/tests/vmx2xmldata/vmx2xml-fusion-in-the-wild-1.vmx<br>
> new file mode 100644<br>
> index 0000000..ef6af19<br>
> --- /dev/null<br>
> +++ b/tests/vmx2xmldata/vmx2xml-fusion-in-the-wild-1.vmx<br>
> @@ -0,0 +1,88 @@<br>
> +.encoding = "UTF-8"<br>
> +config.version = "8"<br>
> +virtualHW.version = "9"<br>
> +memsize = "3572"<br>
> +MemAllowAutoScaleDown = "FALSE"<br>
> +MemTrimRate = "-1"<br>
> +displayName = "ATTM_VM"<br>
> +guestOS = "winxppro"<br>
> +numvcpus = "2"<br>
> +sound.present = "TRUE"<br>
> +sound.filename = "-1"<br>
> +sound.autodetect = "TRUE"<br>
> +usb.present = "TRUE"<br>
> +ethernet0.present = "TRUE"<br>
> +ethernet0.addressType = "generated"<br>
> +ethernet0.connectionType = "bridged"<br>
> +ethernet1.present = "TRUE"<br>
> +ethernet1.addressType = "generated"<br>
> +ethernet1.connectionType = "bridged"<br>
> +scsi0:0.present = "TRUE"<br>
> +scsi0:0.fileName = "ATTM_VM.vmdk"<br>
> +pciBridge0.present = "TRUE"<br>
> +tools.upgrade.policy = "useGlobal"<br>
> +ehci.present = "TRUE"<br>
> +ide0:0.present = "TRUE"<br>
> +ide0:0.autodetect = "TRUE"<br>
> +ide0:0.filename = "auto detect"<br>
> +ide0:0.deviceType = "atapi-cdrom"<br>
> +scsi0.present = "TRUE"<br>
> +scsi0.virtualDev = "buslogic"<br>
> +buslogic.noDriver = "FALSE"<br>
> +extendedConfigFile = "ATTM_VM.vmxf"<br>
> +virtualHW.productCompatibility = "hosted"<br>
> +pciBridge4.present = "TRUE"<br>
> +pciBridge4.virtualDev = "pcieRootPort"<br>
> +pciBridge4.pciSlotNumber = "21"<br>
> +pciBridge4.functions = "8"<br>
> +pciBridge5.present = "TRUE"<br>
> +pciBridge5.virtualDev = "pcieRootPort"<br>
> +pciBridge5.pciSlotNumber = "22"<br>
> +pciBridge5.functions = "8"<br>
> +pciBridge6.present = "TRUE"<br>
> +pciBridge6.virtualDev = "pcieRootPort"<br>
> +pciBridge6.pciSlotNumber = "23"<br>
> +pciBridge6.functions = "8"<br>
> +pciBridge7.present = "TRUE"<br>
> +pciBridge7.virtualDev = "pcieRootPort"<br>
> +pciBridge7.pciSlotNumber = "24"<br>
> +pciBridge7.functions = "8"<br>
> +vmci0.present = "TRUE"<br>
> +hpet0.present = "TRUE"<br>
> +usb.vbluetooth.startConnected = "TRUE"<br>
> +mks.enable3d = "TRUE"<br>
> +ethernet0.linkStatePropagation.enable = "TRUE"<br>
> +ethernet1.linkStatePropagation.enable = "TRUE"<br>
> +ide0:0.startConnected = "FALSE"<br>
> +ethernet0.generatedAddress = "00:0c:29:3b:64:ea"<br>
> +ethernet1.generatedAddress = "00:0c:29:3b:64:f4"<br>
> +<a href="http://vmci0.id" target="_blank">vmci0.id</a> = "-952408854"<br>
> +tools.syncTime = "FALSE"<br>
> +uuid.location = "56 4d 70 88 01 a1 98 32-e7 2b 67 90 c7 3b 64 ea"<br>
> +uuid.bios = "56 4d 70 88 01 a1 98 32-e7 2b 67 90 c7 3b 64 ea"<br>
> +cleanShutdown = "TRUE"<br>
> +replay.supported = "FALSE"<br>
> +replay.filename = ""<br>
> +scsi0:0.redo = ""<br>
> +pciBridge0.pciSlotNumber = "17"<br>
> +scsi0.pciSlotNumber = "16"<br>
> +usb.pciSlotNumber = "32"<br>
> +ethernet0.pciSlotNumber = "33"<br>
> +ethernet1.pciSlotNumber = "34"<br>
> +sound.pciSlotNumber = "35"<br>
> +ehci.pciSlotNumber = "36"<br>
> +vmci0.pciSlotNumber = "37"<br>
> +usb:1.present = "TRUE"<br>
> +ethernet0.generatedAddressOffset = "0"<br>
> +ethernet1.generatedAddressOffset = "10"<br>
> +vmotion.checkpointFBSize = "134217728"<br>
> +usb:1.speed = "2"<br>
> +usb:1.deviceType = "hub"<br>
> +usb:1.port = "1"<br>
> +usb:1.parent = "-1"<br>
> +floppy0.startConnected = "FALSE"<br>
> +softPowerOff = "FALSE"<br>
> +usb:0.present = "TRUE"<br>
> +usb:0.deviceType = "hid"<br>
> +usb:0.port = "0"<br>
> +usb:0.parent = "-1"<br>
> diff --git a/tests/vmx2xmldata/vmx2xml-fusion-in-the-wild-1.xml b/tests/vmx2xmldata/vmx2xml-fusion-in-the-wild-1.xml<br>
> new file mode 100644<br>
> index 0000000..dd8c12a<br>
> --- /dev/null<br>
> +++ b/tests/vmx2xmldata/vmx2xml-fusion-in-the-wild-1.xml<br>
> @@ -0,0 +1,38 @@<br>
> +<domain type='vmware'><br>
> +  <name>ATTM_VM</name><br>
> +  <uuid>564d7088-01a1-9832-e72b-6790c73b64ea</uuid><br>
> +  <memory unit='KiB'>3657728</memory><br>
> +  <currentMemory unit='KiB'>3657728</currentMemory><br>
> +  <vcpu placement='static'>2</vcpu><br>
> +  <os><br>
> +    <type arch='i686'>hvm</type><br>
> +  </os><br>
> +  <clock offset='utc'/><br>
> +  <on_poweroff>destroy</on_poweroff><br>
> +  <on_reboot>restart</on_reboot><br>
> +  <on_crash>destroy</on_crash><br>
> +  <devices><br>
> +    <disk type='file' device='disk'><br>
> +      <source file='[datastore] directory/ATTM_VM.vmdk'/><br>
> +      <target dev='sda' bus='scsi'/><br>
> +      <address type='drive' controller='0' bus='0' target='0' unit='0'/><br>
> +    </disk><br>
> +    <disk type='block' device='cdrom'><br>
<br>
</div></div>This fails the test until we add:<br>
<br>
<source dev='auto detect'/><br>
<div class="im"><br>
> +      <target dev='hda' bus='ide' tray='open'/><br>
> +      <address type='drive' controller='0' bus='0' target='0' unit='0'/><br>
> +    </disk><br>
> +    <controller type='scsi' index='0' model='buslogic'/><br>
> +    <controller type='ide' index='0'/><br>
> +    <interface type='bridge'><br>
> +      <mac address='00:0c:29:3b:64:ea'/><br>
> +      <source bridge=''/><br>
> +    </interface><br>
> +    <interface type='bridge'><br>
> +      <mac address='00:0c:29:3b:64:f4'/><br>
> +      <source bridge=''/><br>
> +    </interface><br>
> +    <video><br>
> +      <model type='vmvga' vram='4096'/><br>
> +    </video><br>
</div><div><div class="h5">> +  </devices><br>
> +</domain><br>
> diff --git a/tests/vmx2xmltest.c b/tests/vmx2xmltest.c<br>
> index 479c84c..9e6e9fd 100644<br>
> --- a/tests/vmx2xmltest.c<br>
> +++ b/tests/vmx2xmltest.c<br>
> @@ -286,6 +286,8 @@ mymain(void)<br>
>      DO_TEST("ws-in-the-wild-1", "ws-in-the-wild-1");<br>
>      DO_TEST("ws-in-the-wild-2", "ws-in-the-wild-2");<br>
><br>
> +    DO_TEST("fusion-in-the-wild-1", "fusion-in-the-wild-1");<br>
> +<br>
>      DO_TEST("annotation", "annotation");<br>
><br>
>      DO_TEST("smbios", "smbios");<br>
> diff --git a/tests/xml2vmxdata/xml2vmx-fusion-in-the-wild-1.vmx b/tests/xml2vmxdata/xml2vmx-fusion-in-the-wild-1.vmx<br>
> new file mode 100644<br>
> index 0000000..7f6551b<br>
> --- /dev/null<br>
> +++ b/tests/xml2vmxdata/xml2vmx-fusion-in-the-wild-1.vmx<br>
> @@ -0,0 +1,30 @@<br>
> +.encoding = "UTF-8"<br>
> +config.version = "8"<br>
> +virtualHW.version = "9"<br>
> +guestOS = "other"<br>
> +uuid.bios = "56 4d 70 88 01 a1 98 32-e7 2b 67 90 c7 3b 64 ea"<br>
> +displayName = "ATTM_VM"<br>
> +memsize = "3572"<br>
> +numvcpus = "2"<br>
> +scsi0.present = "true"<br>
> +scsi0.virtualDev = "buslogic"<br>
> +scsi0:0.present = "true"<br>
> +scsi0:0.deviceType = "scsi-hardDisk"<br>
> +scsi0:0.fileName = "/vmfs/volumes/datastore/directory/ATTM_VM.vmdk"<br>
> +ide0:0.present = "true"<br>
> +ide0:0.autodetect = "true"<br>
<br>
</div></div>This ^^^<br>
<div class="im"><br>
> +ide0:0.deviceType = "atapi-cdrom"<br>
> +ide0:0.fileName = "auto detect"<br>
<br>
</div>and this ^^^ line make the testsuite fail.<br></blockquote><div><br></div><div style>Doh. I dropped the "auto detect" patch from the series and I must have tested with it still in. Re-spin coming.</div><div>
 </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><br>
> +floppy0.present = "false"<br>
> +floppy1.present = "false"<br>
> +ethernet0.present = "true"<br>
> +ethernet0.connectionType = "bridged"<br>
> +ethernet0.addressType = "generated"<br>
> +ethernet0.generatedAddress = "00:0c:29:3b:64:ea"<br>
> +ethernet0.generatedAddressOffset = "0"<br>
> +ethernet1.present = "true"<br>
> +ethernet1.connectionType = "bridged"<br>
> +ethernet1.addressType = "generated"<br>
> +ethernet1.generatedAddress = "00:0c:29:3b:64:f4"<br>
> +ethernet1.generatedAddressOffset = "0"<br>
> +svga.vramSize = "4194304"<br>
> diff --git a/tests/xml2vmxdata/xml2vmx-fusion-in-the-wild-1.xml b/tests/xml2vmxdata/xml2vmx-fusion-in-the-wild-1.xml<br>
> new file mode 100644<br>
> index 0000000..4a09add<br>
> --- /dev/null<br>
> +++ b/tests/xml2vmxdata/xml2vmx-fusion-in-the-wild-1.xml<br>
> @@ -0,0 +1,40 @@<br>
> +<domain type='vmware'><br>
> +  <name>ATTM_VM</name><br>
> +  <uuid>564d7088-01a1-9832-e72b-6790c73b64ea</uuid><br>
> +  <memory unit='KiB'>3657728</memory><br>
> +  <currentMemory unit='KiB'>3657728</currentMemory><br>
> +  <vcpu placement='static'>2</vcpu><br>
> +  <os><br>
> +    <type arch='i686'>hvm</type><br>
> +  </os><br>
> +  <clock offset='utc'/><br>
> +  <on_poweroff>destroy</on_poweroff><br>
> +  <on_reboot>restart</on_reboot><br>
> +  <on_crash>destroy</on_crash><br>
> +  <devices><br>
> +    <disk type='file' device='disk'><br>
> +      <source file='[datastore] directory/ATTM_VM.vmdk'/><br>
> +      <target dev='sda' bus='scsi'/><br>
> +      <address type='drive' controller='0' bus='0' target='0' unit='0'/><br>
> +    </disk><br>
> +    <disk type='block' device='cdrom'><br>
> +      <driver name='atapi'/><br>
> +      <target dev='hda' bus='ide' tray='open'/><br>
> +      <address type='drive' controller='0' bus='0' target='0' unit='0'/><br>
> +    </disk><br>
> +    <controller type='scsi' index='0' model='buslogic'/><br>
> +    <controller type='ide' index='0'/><br>
> +    <interface type='bridge'><br>
> +      <mac address='00:0c:29:3b:64:ea'/><br>
> +      <source bridge=''/><br>
> +    </interface><br>
> +    <interface type='bridge'><br>
> +      <mac address='00:0c:29:3b:64:f4'/><br>
> +      <source bridge=''/><br>
> +    </interface><br>
> +    <video><br>
> +      <model type='vmvga' vram='4096'/><br>
> +    </video><br>
> +    <memballoon model='none'/><br>
> +  </devices><br>
> +</domain><br>
> diff --git a/tests/xml2vmxtest.c b/tests/xml2vmxtest.c<br>
> index cb1c29c..ebd54fc 100644<br>
> --- a/tests/xml2vmxtest.c<br>
> +++ b/tests/xml2vmxtest.c<br>
> @@ -299,6 +299,8 @@ mymain(void)<br>
>      DO_TEST("ws-in-the-wild-1", "ws-in-the-wild-1", 8);<br>
>      DO_TEST("ws-in-the-wild-2", "ws-in-the-wild-2", 8);<br>
><br>
> +    DO_TEST("fusion-in-the-wild-1", "fusion-in-the-wild-1", 9);<br>
> +<br>
>      DO_TEST("annotation", "annotation", 4);<br>
><br>
>      DO_TEST("smbios", "smbios", 4);<br>
><br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Doug Goldstein
</div></div>