chiark / gitweb /
test-dhcp-client: add a kludge to make valgrind happy
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 2 Feb 2015 19:50:56 +0000 (14:50 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 3 Feb 2015 01:31:18 +0000 (20:31 -0500)
src/libsystemd-network/test-dhcp-client.c

index 831ec19..8e88641 100644 (file)
@@ -521,5 +521,12 @@ int main(int argc, char *argv[]) {
         test_discover_message(e);
         test_addr_acq(e);
 
         test_discover_message(e);
         test_addr_acq(e);
 
+#ifdef VALGRIND
+        /* Make sure the async_close thread has finished.
+         * valgrind would report some of the phread_* structures
+         * as not cleaned up properly. */
+        sleep(1);
+#endif
+
         return 0;
 }
         return 0;
 }