]> Zhao Yanbai Git Server - minix.git/commitdiff
test56: fix race condition
authorDavid van Moolenbroek <david@minix3.org>
Sun, 27 Oct 2013 18:00:54 +0000 (19:00 +0100)
committerLionel Sambuc <lionel@minix3.org>
Sat, 1 Mar 2014 08:04:59 +0000 (09:04 +0100)
Change-Id: Ib8f435f2272fed96e99698ab5030531e733577ca

test/test56.c

index 6b46d9fdfdad6d520787dcdb061ac130d23201fe..88e0c49e7691b043d006cde16db4cc0ed8dc42e9 100644 (file)
@@ -3039,6 +3039,9 @@ test_nonblock(void)
 
                close(server_sd);
 
+               /* Let the socket become writable in the parent process. */
+               sleep(1);
+
                if (write(client_sd, buf, 1) != 1)
                        test_fail("write() should have succeeded");