[libvirt] [PATCH V5 4/4] Add test cases for parsing of list values

Eric Blake eblake at redhat.com
Wed Nov 2 23:21:01 UTC 2011


On 10/31/2011 07:01 AM, Stefan Berger wrote:
> This patch adds test cases for parsing of parameters with
> multiple occurrances of the same name.

s/occurrances/occurrences/

> +++ libvirt-acl/tests/nwfilterxml2xmlin/attr-value-test.xml
> @@ -0,0 +1,27 @@
> +<filter name='testcase'>
> +<uuid>83011800-f663-96d6-8841-fd836b4318c6</uuid>
> +<filterref filter='clean-traffic'>
> +<parameter name='a' value='1.2.3.4'/>
> +<parameter name='a' value='1.2.3.5'/>
> +<parameter name='c' value='1.1.1.1'/>
> +<parameter name='b' value='1.2.3.10'/>
> +<parameter name='a' value='1.2.3.6'/>
> +<parameter name='b' value='1.2.3.11'/>
> +<parameter name='c' value='2.2.2.2'/>
> +<parameter name='b' value='1.2.3.12'/>

This is still sorted by value on input.  Swap the first two lines of 
name='a' value='1.2.3.[45]', so that...

> Index: libvirt-acl/tests/nwfilterxml2xmlout/attr-value-test.xml
> ===================================================================
> --- /dev/null
> +++ libvirt-acl/tests/nwfilterxml2xmlout/attr-value-test.xml
> @@ -0,0 +1,22 @@
> +<filter name='testcase' chain='root'>
> +<uuid>83011800-f663-96d6-8841-fd836b4318c6</uuid>
> +<filterref filter='clean-traffic'>
> +<parameter name='a' value='1.2.3.4'/>
> +<parameter name='a' value='1.2.3.5'/>

they show up swapped here as well, proving that we sorted by name while 
keeping value stable.

ACK with that change.

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




More information about the libvir-list mailing list