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

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

 



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@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]