[libvirt] [PATCH v2] [TCK] nwfilter: Add test cases for ipset

Eric Blake eblake at redhat.com
Fri Apr 27 14:19:26 UTC 2012


On 04/27/2012 05:25 AM, Stefan Berger wrote:
> Add test cases for ipset support.
> 
> Since ipset may not be available on all system, the first line of the XML
> file containing the test filter has been extended with a specially
> formatted
> XML comment containing a command line test for whether the test case can be
> run at all. The format of that line is:
> 
> <!-- #<command line test># -->
> 
> If the tests in this line don't succeed, the test case is skipped.
> 
> Also add a test case cleaning up the created ipset. Run this test after all
> other tests using alphabetical ordering.
> 
> ---
>  v2:
>   - addressed Eric Blake's comments

ACK with one nit, and once the libvirt side is in:


>    if [ ! -r "${xmlfile}" ]; then

Here you are quoting, which means you are worried ${xmlfile} might
contain spaces...

>      echo "FAIL : Cannot access filter XML file ${xmlfile}."
>      return 1
>    fi
> 
> -  ${VIRSH} nwfilter-define "${xmlfile}" > /dev/null
> +  # Check whether we can run this test at all
> +  cmd=$(sed -n '1 s/^<\!--[     ]*#\(.*\)#[     ]*-->/\1/p' ${xmlfile})

...so you must be consistent and also quote ${xmlfile} here.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120427/e59694a3/attachment-0001.sig>


More information about the libvir-list mailing list