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

Re: [libvirt] [PATCHv2 06/13] snapshot: test domainsnapshot indentation

On 10/20/2011 01:23 AM, Hai Dong Li wrote:
On 09/30/2011 12:22 AM, Eric Blake wrote:
diff --git a/tests/domainsnapshotxml2xmlout/all_parameters.xml
index ed4a600..eb2ee85 100644
--- a/tests/domainsnapshotxml2xmlout/all_parameters.xml
+++ b/tests/domainsnapshotxml2xmlout/all_parameters.xml
@@ -1,10 +1,10 @@
<name>my snap name</name>
<description>! #$%^</description>
I failed to see why this line is moved here.
The definition of struct _virDomainSnapshotDef shows that the member
state is after the member creationTime. Could you please let me know the
sorting order?

Previously, the test was useful only for schema validation of input, and our schema allows elements to be interleaved in any order. But now that we are adding a test of our XML generation matching expected output, then this file has to match what we generate (domain_conf.c virDomainSnapshotDefFormat). Besides, our documentation already mentioned <state> before <parent> (docs/formatsnapshot.html.in).

On 10/20/2011 03:00 AM, Peter Krempa wrote:
> Dňa 29.9.2011 18:22, Eric Blake wrote / napísal(a):
>> Add a test for the simple parts of my indentation changes, and
>> fix the fallout.
>> * tests/domainsnapshotxml2xmltest.c: New test.
>> * tests/Makefile.am (domainsnapshotxml2xmltest_SOURCES): Build it.
>> * src/conf/domain_conf.c (virDomainSnapshotDefFormat): Avoid NULL
>> deref, match documented order.
>> * src/conf/domain_conf.h (virDomainSnapshotDefFormat): Add const.
>> * tests/domainsnapshotxml2xmlout/all_parameters.xml: Tweak output.
>> * tests/domainsnapshotxml2xmlout/disk_snapshot.xml: Likewise.
>> * tests/domainsnapshotxml2xmlout/full_domain.xml: Likewise.
>> * .gitignore: Exempt new binary.
>> ---
> Definitely looks nicer when correctly indented. ACK.

Pushed.  I also had to rebase this one on top of recent test changes.

Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

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