<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Aug 6, 2014 at 1:31 AM, Marek Chalupa <span dir="ltr"><<a href="mailto:mchqwerty@gmail.com" target="_blank">mchqwerty@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
After the new patches for socket automatic naming the socket test, namely socket_path_overflow_server_<u></u>create, fails. Probably introduced in 79b1d2039aeb77b712cf4e1bb4049e<u></u>bf9c453b59. It does not set errno as expected:<br>

<br>
error: socket path "/run/user/1000/<u></u>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<u></u>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<u></u>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<u></u>aaaaaaaaaaaaaaaaaa" plus null terminator exceeds 108 bytes<br>

lt-socket-test: tests/socket-test.c:83: socket_path_overflow_server_<u></u>create: Assertion `(*__errno_location ()) == 36' failed.<br>
zsh: abort      ./socket-test socket_path_overflow_server_<u></u>create<br></blockquote><div><br></div><div>What exactly is going on here?<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
Moreover, there's a bug. When you add a socket, then add the same socket again, the original socket is removed, i. e.:<br>
<br>
    /* OK */<br>
    wl_display_add_socket(display, "wayland-0");<br>
<br>
    /* this call fails and will delete the original socket */<br>
    wl_display_add_socket(display, "wayland-0");<br></blockquote><div><br></div><div>Yes, we need to fix this.  We should be able to add multiple sockets.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
I wrote tests for it, sending them right away.<br>
<br>
And one more thing... well, rather idea. Maybe it'd be nice to print:<br>
<br>
   unable to lock lockfile /run/user/1000/wayland-0.lock, maybe another compositor is running<br>
   unable to lock lockfile /run/user/1000/wayland-1.lock, maybe another compositor is running<br>
   unable to lock lockfile /run/user/1000/wayland-2.lock, maybe another compositor is running<br>
    .... etc. ...<br>
<br>
only when manually adding the socket. It's really annoying when the terminal gets flooded<br>
by 30 lines of this. But it's not a big deal either.<br></blockquote><div><br></div><div>Sure, we could use wl_log for that.<br></div><div>--Jason Ekstrand<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
<br>
Regards,<br>
Marek Chalupa<br>
______________________________<u></u>_________________<br>
wayland-devel mailing list<br>
<a href="mailto:wayland-devel@lists.freedesktop.org" target="_blank">wayland-devel@lists.<u></u>freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/wayland-devel" target="_blank">http://lists.freedesktop.org/<u></u>mailman/listinfo/wayland-devel</a><br>
</blockquote></div><br></div></div>