<div dir="ltr">Hi Eric,<div><br></div><div>thank you very much for your assistance! I'll take a look at writing that test tomorrow.</div><div><br></div><div>Wout.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, Dec 17, 2013 at 10:24 PM, Eric Blake <span dir="ltr"><<a href="mailto:eblake@redhat.com" target="_blank">eblake@redhat.com</a>></span> wrote:<br><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 12/17/2013 01:45 PM, Eric Blake wrote:<br>
> On 12/17/2013 01:42 PM, Eric Blake wrote:<br>
>> On 12/17/2013 10:04 AM, Wout Mertens wrote:<br>
>>> From: Wout Mertens <<a href="mailto:Wout.Mertens@gmail.com">Wout.Mertens@gmail.com</a>><br>
>>><br>
>>> vmx/vmx.c ignores the transient attribute on the disk xml format. This patch<br>
>>> adds a 1-1 relationship between it and [disk].mode = "independent-nonpersistent".<br>
>>><br>
>>> The other modes are ignored as before. It works in my testing.<br>
>>><br>
>>> <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1044023" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=1044023</a><br>
>>><br>
>>> ---<br>
>>>  src/vmx/vmx.c | 17 ++++++++++++++++-<br>
>>>  1 file changed, 16 insertions(+), 1 deletion(-)<br>
>><br>
>> Congrats on your first libvirt patch.  It failed 'make syntax-check':<br>
>><br>
><br>
>><br>
>> But I don't mind fixing those on a first-time submission.<br>
><br>
> Oh, I spoke too soon.  It also fails 'make check':<br>
><br>
> ../build-aux/test-driver: line 95: 19280 Segmentation fault      (core<br>
> dumped) "$@" > $log_file 2>&1<br>
> FAIL: vmx2xmltest<br>
><br>
> Not a good sign.  I can still try and fix that before pushing, but for<br>
> now your patch is not upstream.<br>
<br>
</div></div>Found it.  Would you also be willing to do a followup patch to enhance<br>
the testsuite to add a case of a vmx file that gets translated into the<br>
<transient> libvirt xml?  Pushed now, with this added:<br>
<br>
diff --git i/src/vmx/vmx.c w/src/vmx/vmx.c<br>
index c04e397..8fb2a93 100644<br>
--- i/src/vmx/vmx.c<br>
+++ w/src/vmx/vmx.c<br>
@@ -2181,7 +2181,9 @@ virVMXParseDisk(virVMXContext *ctx,<br>
<div class="im">virDomainXMLOptionPtr xmlopt, virConfPtr con<br>
             (*def)->src = ctx->parseFileName(fileName, ctx->opaque);<br>
             (*def)->cachemode = writeThrough ?<br>
VIR_DOMAIN_DISK_CACHE_WRITETHRU<br>
                                              :<br>
VIR_DOMAIN_DISK_CACHE_DEFAULT;<br>
-            (*def)->transient = STRCASEEQ(mode,<br>
</div>"independent-nonpersistent");<br>
+            if (mode)<br>
<div class="im">+                (*def)->transient = STRCASEEQ(mode,<br>
</div>+                                              "independent-nonpersistent");<br>
<div class="im"><br>
             if ((*def)->src == NULL) {<br>
                 goto cleanup;<br>
</div>@@ -2300,6 +2302,7 @@ virVMXParseDisk(virVMXContext *ctx,<br>
virDomainXMLOptionPtr xmlopt, virConfPtr con<br>
     VIR_FREE(deviceType);<br>
     VIR_FREE(fileType);<br>
     VIR_FREE(fileName);<br>
+    VIR_FREE(mode);<br>
<br>
     return result;<br>
<div class="HOEnZb"><div class="h5"><br>
--<br>
Eric Blake   eblake redhat com    <a href="tel:%2B1-919-301-3266" value="+19193013266">+1-919-301-3266</a><br>
Libvirt virtualization library <a href="http://libvirt.org" target="_blank">http://libvirt.org</a><br>
<br>
</div></div></blockquote></div><br></div>