[libvirt] Start of freeze for libvirt-0.9.7 and availability of rc1

Eric Blake eblake at redhat.com
Wed Nov 2 21:35:47 UTC 2011


On 11/02/2011 02:24 PM, Stefan Berger wrote:
> @@ -214,6 +219,19 @@ static int testSocketUNIXAccept(const void *data
> ATTRIBUTE_UNUSED)
> }
> }
>
> + if (strlen(path) >= sizeof(sun.sun_path)) {
> + if (!virStrcpy(path, "/tmp/test.sock.XXXXXX", sizeof(sun.sun_path))) {
> + VIR_DEBUG("Unexpected error using virStrcpyStatic");
> + goto cleanup;
> + }
> + tmpfd = mkostemp(path, 0700);
> + if (tmpfd < 0) {
> + virReportSystemError(errno, "%s",
> + _("Failed to create temporary file"));
> + goto cleanup;
> + }
> + }
> +
> if (virNetSocketNewListenUNIX(path, 0700, -1, getgid(), &lsock) < 0)

This relies on the guts of NewListenUNIX to do an unlink() of the file 
that we still have an open fd on, and create a socket in its place; 
which is slightly racy, not to mention non-portable to platforms where 
unlink() fails with open fds (then again, Unix sockets don't exist on 
those platforms - specifically mingw).

But we already have precedence of skipping tests in deep hierarchies:

TEST: daemon-conf
 
.................................../../../../../tests/daemon-conf: 
skipping test: CWD too long
SKIP: daemon-conf

Maybe we should just skip instead of playing around with /tmp in that case?

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




More information about the libvir-list mailing list