[libvirt] [PATCH v2] tests: Skip daemon-conf test if dir exceeds UNIX_PATH_MAX

Eric Blake eblake at redhat.com
Mon May 17 18:32:12 UTC 2010


On 05/17/2010 12:21 PM, Cole Robinson wrote:
> +++ b/tests/daemon-conf
> @@ -76,6 +76,13 @@ sed 's,^log_outputs.*,log_outputs="3:file:'"$(pwd)/log"'",' tmp.conf > k \
>      || fail=1
>  mv k tmp.conf || fail=1
>  
> +# Unix socket max path size is 108 on linux. If the generated sock path
> +# exceeds this, the test will fail, so skip it if CWD is too long
> +SOCKPATH=`pwd`/libvirt-sock
> +if test 108 -lt `echo $SOCKPATH | wc -c`; then
> +    skip_test_ "CWD too long"
> +fi

Makes for a smaller diff with the early exit :)

ACK.

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

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


More information about the libvir-list mailing list