Lines Matching refs:error
51 GError *error = NULL; in echo_server_dgram_thread() local
59 nread = g_socket_receive_from (sock, &sa, buf, sizeof (buf), cancellable, &error); in echo_server_dgram_thread()
60 if (error && g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) in echo_server_dgram_thread()
62 g_assert_no_error (error); in echo_server_dgram_thread()
65 nwrote = g_socket_send_to (sock, sa, buf, nread, cancellable, &error); in echo_server_dgram_thread()
66 if (error && g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) in echo_server_dgram_thread()
68 g_assert_no_error (error); in echo_server_dgram_thread()
74 g_clear_error (&error); in echo_server_dgram_thread()
84 GError *error = NULL; in echo_server_thread() local
88 sock = g_socket_accept (data->server, NULL, &error); in echo_server_thread()
89 g_assert_no_error (error); in echo_server_thread()
93 nread = g_socket_receive (sock, buf, sizeof (buf), NULL, &error); in echo_server_thread()
94 g_assert_no_error (error); in echo_server_thread()
100 nwrote = g_socket_send (sock, buf, nread, NULL, &error); in echo_server_thread()
101 g_assert_no_error (error); in echo_server_thread()
105 g_socket_close (sock, &error); in echo_server_thread()
106 g_assert_no_error (error); in echo_server_thread()
116 GError **error) in create_server_full() argument
129 error); in create_server_full()
131 goto error; in create_server_full()
145 g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, in create_server_full()
147 goto error; in create_server_full()
160 if (!g_socket_bind (server, addr, TRUE, error)) in create_server_full()
163 goto error; in create_server_full()
167 addr = g_socket_get_local_address (server, error); in create_server_full()
169 goto error; in create_server_full()
175 if (!g_socket_listen (server, error)) in create_server_full()
176 goto error; in create_server_full()
187 error: in create_server_full()
198 GError **error) in create_server() argument
200 return create_server_full (family, G_SOCKET_TYPE_STREAM, server_thread, v4mapped, error); in create_server()
211 GError *error = NULL; in test_ip_async_read_ready() local
217 len = g_socket_receive (client, buf, sizeof (buf), NULL, &error); in test_ip_async_read_ready()
218 g_assert_no_error (error); in test_ip_async_read_ready()
234 GError *error = NULL; in test_ip_async_write_ready() local
240 len = g_socket_send (client, testbuf, strlen (testbuf) + 1, NULL, &error); in test_ip_async_write_ready()
241 g_assert_no_error (error); in test_ip_async_write_ready()
259 GError *error = NULL; in test_ip_async_timed_out() local
267 len = g_socket_receive (client, buf, sizeof (buf), NULL, &error); in test_ip_async_timed_out()
269 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_TIMED_OUT); in test_ip_async_timed_out()
270 g_clear_error (&error); in test_ip_async_timed_out()
288 GError *error = NULL; in test_ip_async_connected() local
293 g_socket_check_connect_result (client, &error); in test_ip_async_connected()
294 g_assert_no_error (error); in test_ip_async_connected()
305 len = g_socket_receive (client, buf, sizeof (buf), NULL, &error); in test_ip_async_connected()
307 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK); in test_ip_async_connected()
308 g_clear_error (&error); in test_ip_async_connected()
334 GError *error = NULL; in test_ip_async() local
341 data = create_server (family, echo_server_thread, FALSE, &error); in test_ip_async()
342 if (error != NULL) in test_ip_async()
344 gchar *message = g_strdup_printf ("Failed to create server: %s", error->message); in test_ip_async()
347 g_clear_error (&error); in test_ip_async()
352 addr = g_socket_get_local_address (data->server, &error); in test_ip_async()
353 g_assert_no_error (error); in test_ip_async()
358 &error); in test_ip_async()
359 g_assert_no_error (error); in test_ip_async()
369 if (g_socket_connect (client, addr, NULL, &error)) in test_ip_async()
371 g_assert_no_error (error); in test_ip_async()
376 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_PENDING); in test_ip_async()
377 g_clear_error (&error); in test_ip_async()
390 g_socket_shutdown (client, FALSE, TRUE, &error); in test_ip_async()
391 g_assert_no_error (error); in test_ip_async()
399 TRUE, NULL, &error); in test_ip_async()
400 g_assert_no_error (error); in test_ip_async()
407 TRUE, NULL, &error); in test_ip_async()
408 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_CONNECTION_CLOSED); in test_ip_async()
410 g_clear_error (&error); in test_ip_async()
413 g_socket_close (client, &error); in test_ip_async()
414 g_assert_no_error (error); in test_ip_async()
415 g_socket_close (data->server, &error); in test_ip_async()
416 g_assert_no_error (error); in test_ip_async()
448 GError *error = NULL; in test_ip_sync() local
454 data = create_server (family, echo_server_thread, FALSE, &error); in test_ip_sync()
455 if (error != NULL) in test_ip_sync()
457 gchar *message = g_strdup_printf ("Failed to create server: %s", error->message); in test_ip_sync()
460 g_clear_error (&error); in test_ip_sync()
464 addr = g_socket_get_local_address (data->server, &error); in test_ip_sync()
465 g_assert_no_error (error); in test_ip_sync()
470 &error); in test_ip_sync()
471 g_assert_no_error (error); in test_ip_sync()
480 g_socket_connect (client, addr, NULL, &error); in test_ip_sync()
481 g_assert_no_error (error); in test_ip_sync()
488 len = g_socket_receive (client, buf, sizeof (buf), NULL, &error); in test_ip_sync()
490 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_TIMED_OUT); in test_ip_sync()
491 g_clear_error (&error); in test_ip_sync()
494 len = g_socket_send (client, testbuf, strlen (testbuf) + 1, NULL, &error); in test_ip_sync()
495 g_assert_no_error (error); in test_ip_sync()
498 len = g_socket_receive (client, buf, sizeof (buf), NULL, &error); in test_ip_sync()
499 g_assert_no_error (error); in test_ip_sync()
522 len = g_socket_send_message (client, NULL, v, G_N_ELEMENTS (v), NULL, 0, 0, NULL, &error); in test_ip_sync()
523 g_assert_no_error (error); in test_ip_sync()
527 len = g_socket_receive (client, buf, sizeof (buf), NULL, &error); in test_ip_sync()
528 g_assert_no_error (error); in test_ip_sync()
533 g_socket_shutdown (client, FALSE, TRUE, &error); in test_ip_sync()
534 g_assert_no_error (error); in test_ip_sync()
541 len = g_socket_receive (client, buf, sizeof (buf), NULL, &error); in test_ip_sync()
542 g_assert_no_error (error); in test_ip_sync()
548 len = g_socket_send (client, testbuf, strlen (testbuf) + 1, NULL, &error); in test_ip_sync()
549 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_CONNECTION_CLOSED); in test_ip_sync()
551 g_clear_error (&error); in test_ip_sync()
554 g_socket_close (client, &error); in test_ip_sync()
555 g_assert_no_error (error); in test_ip_sync()
556 g_socket_close (data->server, &error); in test_ip_sync()
557 g_assert_no_error (error); in test_ip_sync()
587 GError *error = NULL; in test_ip_sync_dgram() local
594 echo_server_dgram_thread, FALSE, &error); in test_ip_sync_dgram()
595 if (error != NULL) in test_ip_sync_dgram()
597 gchar *message = g_strdup_printf ("Failed to create server: %s", error->message); in test_ip_sync_dgram()
600 g_clear_error (&error); in test_ip_sync_dgram()
604 dest_addr = g_socket_get_local_address (data->server, &error); in test_ip_sync_dgram()
609 &error); in test_ip_sync_dgram()
610 g_assert_no_error (error); in test_ip_sync_dgram()
619 len = g_socket_send_to (client, dest_addr, testbuf, strlen (testbuf) + 1, NULL, &error); in test_ip_sync_dgram()
620 g_assert_no_error (error); in test_ip_sync_dgram()
623 len = g_socket_receive_from (client, NULL, buf, sizeof (buf), NULL, &error); in test_ip_sync_dgram()
624 g_assert_no_error (error); in test_ip_sync_dgram()
665 len = g_socket_send_message (client, dest_addr, v, G_N_ELEMENTS (v), NULL, 0, 0, NULL, &error); in test_ip_sync_dgram()
666 g_assert_no_error (error); in test_ip_sync_dgram()
670 len = g_socket_receive_from (client, NULL, buf, sizeof (buf), NULL, &error); in test_ip_sync_dgram()
671 g_assert_no_error (error); in test_ip_sync_dgram()
685 len = g_socket_send_messages (client, m, G_N_ELEMENTS (m), 0, NULL, &error); in test_ip_sync_dgram()
686 g_assert_no_error (error); in test_ip_sync_dgram()
693 len = g_socket_receive_from (client, NULL, buf, sizeof (buf), NULL, &error); in test_ip_sync_dgram()
694 g_assert_no_error (error); in test_ip_sync_dgram()
698 len = g_socket_receive_from (client, NULL, buf, sizeof (buf), NULL, &error); in test_ip_sync_dgram()
699 g_assert_no_error (error); in test_ip_sync_dgram()
705 len = g_socket_receive_from (client, NULL, buf, sizeof (buf), NULL, &error); in test_ip_sync_dgram()
706 g_assert_no_error (error); in test_ip_sync_dgram()
716 len = g_socket_send_messages (client, m, G_N_ELEMENTS (m), 0, NULL, &error); in test_ip_sync_dgram()
717 g_assert_no_error (error); in test_ip_sync_dgram()
732 NULL, &error); in test_ip_sync_dgram()
733 g_assert_no_error (error); in test_ip_sync_dgram()
748 len = g_socket_send_messages (client, m, G_N_ELEMENTS (m), 0, NULL, &error); in test_ip_sync_dgram()
749 g_assert_no_error (error); in test_ip_sync_dgram()
765 len = g_socket_send_messages (client, m, G_N_ELEMENTS (m), 0, NULL, &error); in test_ip_sync_dgram()
768 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_FAILED); in test_ip_sync_dgram()
770 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_NOT_CONNECTED); in test_ip_sync_dgram()
772 g_clear_error (&error); in test_ip_sync_dgram()
779 len = g_socket_receive_from (client, NULL, buf, sizeof (buf), NULL, &error); in test_ip_sync_dgram()
787 g_socket_close (client, &error); in test_ip_sync_dgram()
788 g_assert_no_error (error); in test_ip_sync_dgram()
789 g_socket_close (data->server, &error); in test_ip_sync_dgram()
790 g_assert_no_error (error); in test_ip_sync_dgram()
833 GError *error = NULL; in test_ip_sync_dgram_timeouts() local
846 &error); in test_ip_sync_dgram_timeouts()
847 g_assert_no_error (error); in test_ip_sync_dgram_timeouts()
858 g_socket_bind (client, addr, TRUE, &error); in test_ip_sync_dgram_timeouts()
860 g_assert_no_error (error); in test_ip_sync_dgram_timeouts()
886 NULL, &error); in test_ip_sync_dgram_timeouts()
887 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK); in test_ip_sync_dgram_timeouts()
889 g_clear_error (&error); in test_ip_sync_dgram_timeouts()
897 NULL, &error); in test_ip_sync_dgram_timeouts()
898 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_TIMED_OUT); in test_ip_sync_dgram_timeouts()
901 g_clear_error (&error); in test_ip_sync_dgram_timeouts()
911 cancellable, &error); in test_ip_sync_dgram_timeouts()
912 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_CANCELLED); in test_ip_sync_dgram_timeouts()
915 g_clear_error (&error); in test_ip_sync_dgram_timeouts()
920 g_socket_close (client, &error); in test_ip_sync_dgram_timeouts()
921 g_assert_no_error (error); in test_ip_sync_dgram_timeouts()
950 GError *error = NULL; in graceful_server_thread() local
953 sock = g_socket_accept (data->server, NULL, &error); in graceful_server_thread()
954 g_assert_no_error (error); in graceful_server_thread()
956 len = g_socket_send (sock, testbuf, strlen (testbuf) + 1, NULL, &error); in graceful_server_thread()
957 g_assert_no_error (error); in graceful_server_thread()
968 GError *error = NULL; in test_close_graceful() local
974 data = create_server (family, graceful_server_thread, FALSE, &error); in test_close_graceful()
975 if (error != NULL) in test_close_graceful()
977 gchar *message = g_strdup_printf ("Failed to create server: %s", error->message); in test_close_graceful()
980 g_clear_error (&error); in test_close_graceful()
984 addr = g_socket_get_local_address (data->server, &error); in test_close_graceful()
985 g_assert_no_error (error); in test_close_graceful()
990 &error); in test_close_graceful()
991 g_assert_no_error (error); in test_close_graceful()
1000 g_socket_connect (client, addr, NULL, &error); in test_close_graceful()
1001 g_assert_no_error (error); in test_close_graceful()
1008 g_socket_shutdown (server, FALSE, TRUE, &error); in test_close_graceful()
1009 g_assert_no_error (error); in test_close_graceful()
1012 g_socket_condition_wait (client, G_IO_HUP, NULL, &error); in test_close_graceful()
1013 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_TIMED_OUT); in test_close_graceful()
1014 g_clear_error (&error); in test_close_graceful()
1017 len = g_socket_receive (client, buf, strlen (testbuf) + 1, NULL, &error); in test_close_graceful()
1018 g_assert_no_error (error); in test_close_graceful()
1022 len = g_socket_receive (client, buf, sizeof (buf), NULL, &error); in test_close_graceful()
1023 g_assert_no_error (error); in test_close_graceful()
1026 g_socket_close (server, &error); in test_close_graceful()
1027 g_assert_no_error (error); in test_close_graceful()
1029 g_socket_close (client, &error); in test_close_graceful()
1030 g_assert_no_error (error); in test_close_graceful()
1045 GError *error = NULL; in v4mapped_server_thread() local
1048 sock = g_socket_accept (data->server, NULL, &error); in v4mapped_server_thread()
1049 g_assert_no_error (error); in v4mapped_server_thread()
1053 addr = g_socket_get_local_address (sock, &error); in v4mapped_server_thread()
1054 g_assert_no_error (error); in v4mapped_server_thread()
1058 addr = g_socket_get_remote_address (sock, &error); in v4mapped_server_thread()
1059 g_assert_no_error (error); in v4mapped_server_thread()
1063 g_socket_close (sock, &error); in v4mapped_server_thread()
1064 g_assert_no_error (error); in v4mapped_server_thread()
1073 GError *error = NULL; in test_ipv6_v4mapped() local
1084 data = create_server (G_SOCKET_FAMILY_IPV6, v4mapped_server_thread, TRUE, &error); in test_ipv6_v4mapped()
1085 if (error != NULL) in test_ipv6_v4mapped()
1087 gchar *message = g_strdup_printf ("Failed to create server: %s", error->message); in test_ipv6_v4mapped()
1090 g_clear_error (&error); in test_ipv6_v4mapped()
1097 &error); in test_ipv6_v4mapped()
1098 g_assert_no_error (error); in test_ipv6_v4mapped()
1103 addr = g_socket_get_local_address (data->server, &error); in test_ipv6_v4mapped()
1104 g_assert_no_error (error); in test_ipv6_v4mapped()
1110 g_socket_connect (client, v4addr, NULL, &error); in test_ipv6_v4mapped()
1111 g_assert_no_error (error); in test_ipv6_v4mapped()
1116 g_socket_close (client, &error); in test_ipv6_v4mapped()
1117 g_assert_no_error (error); in test_ipv6_v4mapped()
1118 g_socket_close (data->server, &error); in test_ipv6_v4mapped()
1119 g_assert_no_error (error); in test_ipv6_v4mapped()
1133 GError *error = NULL; in test_timed_wait() local
1145 data = create_server (G_SOCKET_FAMILY_IPV4, echo_server_thread, FALSE, &error); in test_timed_wait()
1146 if (error != NULL) in test_timed_wait()
1148 gchar *message = g_strdup_printf ("Failed to create server: %s", error->message); in test_timed_wait()
1151 g_clear_error (&error); in test_timed_wait()
1155 addr = g_socket_get_local_address (data->server, &error); in test_timed_wait()
1156 g_assert_no_error (error); in test_timed_wait()
1161 &error); in test_timed_wait()
1162 g_assert_no_error (error); in test_timed_wait()
1167 g_socket_connect (client, addr, NULL, &error); in test_timed_wait()
1168 g_assert_no_error (error); in test_timed_wait()
1173 NULL, &error); in test_timed_wait()
1174 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_TIMED_OUT); in test_timed_wait()
1175 g_clear_error (&error); in test_timed_wait()
1181 g_socket_close (client, &error); in test_timed_wait()
1182 g_assert_no_error (error); in test_timed_wait()
1186 g_socket_close (data->server, &error); in test_timed_wait()
1187 g_assert_no_error (error); in test_timed_wait()
1222 GError *error = NULL; in test_fd_reuse() local
1232 data = create_server (G_SOCKET_FAMILY_IPV4, echo_server_thread, FALSE, &error); in test_fd_reuse()
1233 if (error != NULL) in test_fd_reuse()
1235 gchar *message = g_strdup_printf ("Failed to create server: %s", error->message); in test_fd_reuse()
1238 g_clear_error (&error); in test_fd_reuse()
1242 addr = g_socket_get_local_address (data->server, &error); in test_fd_reuse()
1243 g_assert_no_error (error); in test_fd_reuse()
1248 &error); in test_fd_reuse()
1249 g_assert_no_error (error); in test_fd_reuse()
1254 g_socket_connect (client, addr, NULL, &error); in test_fd_reuse()
1255 g_assert_no_error (error); in test_fd_reuse()
1261 client2 = g_socket_new_from_fd (fd, &error); in test_fd_reuse()
1262 g_assert_no_error (error); in test_fd_reuse()
1268 len = g_socket_send (client2, testbuf, strlen (testbuf) + 1, NULL, &error); in test_fd_reuse()
1269 g_assert_no_error (error); in test_fd_reuse()
1272 len = g_socket_receive (client2, buf, sizeof (buf), NULL, &error); in test_fd_reuse()
1273 g_assert_no_error (error); in test_fd_reuse()
1278 g_socket_shutdown (client, FALSE, TRUE, &error); in test_fd_reuse()
1279 g_assert_no_error (error); in test_fd_reuse()
1287 g_socket_close (client, &error); in test_fd_reuse()
1288 g_assert_no_error (error); in test_fd_reuse()
1289 g_socket_close (client2, &error); in test_fd_reuse()
1290 g_assert_no_error (error); in test_fd_reuse()
1291 g_socket_close (data->server, &error); in test_fd_reuse()
1292 g_assert_no_error (error); in test_fd_reuse()
1312 GError *error = NULL; in test_sockaddr() local
1333 g_socket_address_to_native (saddr, &gsin6, sizeof (gsin6), &error); in test_sockaddr()
1334 g_assert_no_error (error); in test_sockaddr()
1349 GError *error; in test_unix_from_fd() local
1355 error = NULL; in test_unix_from_fd()
1356 s = g_socket_new_from_fd (fd, &error); in test_unix_from_fd()
1357 g_assert_no_error (error); in test_unix_from_fd()
1368 GError *error; in test_unix_connection() local
1375 error = NULL; in test_unix_connection()
1376 s = g_socket_new_from_fd (fd, &error); in test_unix_connection()
1377 g_assert_no_error (error); in test_unix_connection()
1503 GError *error = NULL; in test_source_postmortem() local
1506 …ket = g_socket_new (G_SOCKET_FAMILY_UNIX, G_SOCKET_TYPE_STREAM, G_SOCKET_PROTOCOL_DEFAULT, &error); in test_source_postmortem()
1507 g_assert_no_error (error); in test_source_postmortem()
1517 g_socket_close (socket, &error); in test_source_postmortem()
1518 g_assert_no_error (error); in test_source_postmortem()
1536 GError *error = NULL; in test_reuse_tcp() local
1543 &error); in test_reuse_tcp()
1544 g_assert_no_error (error); in test_reuse_tcp()
1549 g_socket_bind (sock1, addr, TRUE, &error); in test_reuse_tcp()
1551 g_assert_no_error (error); in test_reuse_tcp()
1553 g_socket_listen (sock1, &error); in test_reuse_tcp()
1554 g_assert_no_error (error); in test_reuse_tcp()
1559 &error); in test_reuse_tcp()
1560 g_assert_no_error (error); in test_reuse_tcp()
1562 addr = g_socket_get_local_address (sock1, &error); in test_reuse_tcp()
1563 g_assert_no_error (error); in test_reuse_tcp()
1564 g_socket_bind (sock2, addr, TRUE, &error); in test_reuse_tcp()
1565 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_ADDRESS_IN_USE); in test_reuse_tcp()
1566 g_clear_error (&error); in test_reuse_tcp()
1577 GError *error = NULL; in test_reuse_udp() local
1584 &error); in test_reuse_udp()
1585 g_assert_no_error (error); in test_reuse_udp()
1590 g_socket_bind (sock1, addr, TRUE, &error); in test_reuse_udp()
1592 g_assert_no_error (error); in test_reuse_udp()
1597 &error); in test_reuse_udp()
1598 g_assert_no_error (error); in test_reuse_udp()
1600 addr = g_socket_get_local_address (sock1, &error); in test_reuse_udp()
1601 g_assert_no_error (error); in test_reuse_udp()
1602 g_socket_bind (sock2, addr, TRUE, &error); in test_reuse_udp()
1604 g_assert_no_error (error); in test_reuse_udp()
1760 GError *error = NULL; in test_read_write_write_thread() local
1763 res = g_output_stream_write_all (data->os, data->write_data, 1024, &bytes_written, NULL, &error); in test_read_write_write_thread()
1765 g_assert_no_error (error); in test_read_write_write_thread()
1776 GError *error = NULL; in test_read_write_read_thread() local
1779 res = g_input_stream_read_all (data->is, data->read_data, 1024, &bytes_read, NULL, &error); in test_read_write_read_thread()
1781 g_assert_no_error (error); in test_read_write_read_thread()
1792 GError *error = NULL; in test_read_write_writev_thread() local
1803 …output_stream_writev_all (data->os, vectors, G_N_ELEMENTS (vectors), &bytes_written, NULL, &error); in test_read_write_writev_thread()
1805 g_assert_no_error (error); in test_read_write_writev_thread()
1907 GError *error = NULL; in test_nosigpipe() local
1913 &error); in test_nosigpipe()
1914 g_assert_no_error (error); in test_nosigpipe()
1916 g_socket_get_option (sock, SOL_SOCKET, SO_NOSIGPIPE, &value, &error); in test_nosigpipe()
1917 g_assert_no_error (error); in test_nosigpipe()
1932 GError *error = NULL; in test_credentials_tcp_client() local
1937 data = create_server (family, echo_server_thread, FALSE, &error); in test_credentials_tcp_client()
1938 if (error != NULL) in test_credentials_tcp_client()
1940 gchar *message = g_strdup_printf ("Failed to create server: %s", error->message); in test_credentials_tcp_client()
1943 g_clear_error (&error); in test_credentials_tcp_client()
1947 addr = g_socket_get_local_address (data->server, &error); in test_credentials_tcp_client()
1948 g_assert_no_error (error); in test_credentials_tcp_client()
1953 &error); in test_credentials_tcp_client()
1954 g_assert_no_error (error); in test_credentials_tcp_client()
1959 g_socket_connect (client, addr, NULL, &error); in test_credentials_tcp_client()
1960 g_assert_no_error (error); in test_credentials_tcp_client()
1963 creds = g_socket_get_credentials (client, &error); in test_credentials_tcp_client()
1973 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED); in test_credentials_tcp_client()
1974 g_print ("Unsupported on this OS: %s\n", error->message); in test_credentials_tcp_client()
1975 g_clear_error (&error); in test_credentials_tcp_client()
1978 g_socket_close (client, &error); in test_credentials_tcp_client()
1979 g_assert_no_error (error); in test_credentials_tcp_client()
1983 g_socket_close (data->server, &error); in test_credentials_tcp_client()
1984 g_assert_no_error (error); in test_credentials_tcp_client()
1998 GError *error = NULL; in test_credentials_tcp_server() local
2009 &error); in test_credentials_tcp_server()
2010 if (error != NULL) in test_credentials_tcp_server()
2018 if (!g_socket_bind (server, addr, TRUE, &error)) in test_credentials_tcp_server()
2021 if (!g_socket_listen (server, &error)) in test_credentials_tcp_server()
2026 sock = g_socket_accept (server, NULL, &error); in test_credentials_tcp_server()
2027 g_assert_no_error (error); in test_credentials_tcp_server()
2029 creds = g_socket_get_credentials (sock, &error); in test_credentials_tcp_server()
2039 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED); in test_credentials_tcp_server()
2040 g_print ("Unsupported on this OS: %s\n", error->message); in test_credentials_tcp_server()
2041 g_clear_error (&error); in test_credentials_tcp_server()
2048 gchar *message = g_strdup_printf ("Failed to create server: %s", error->message); in test_credentials_tcp_server()
2056 g_clear_error (&error); in test_credentials_tcp_server()
2076 GError *error = NULL; in client_setup_thread() local
2078 addr = g_socket_get_local_address (data->server, &error); in client_setup_thread()
2079 g_assert_no_error (error); in client_setup_thread()
2084 &error); in client_setup_thread()
2085 g_assert_no_error (error); in client_setup_thread()
2090 g_socket_connect (client, addr, NULL, &error); in client_setup_thread()
2091 g_assert_no_error (error); in client_setup_thread()
2105 GError *error = NULL; in test_credentials_unix_socketpair() local
2111 sock = g_socket_new_from_fd (fds[0], &error); in test_credentials_unix_socketpair()
2113 creds = g_socket_get_credentials (sock, &error); in test_credentials_unix_socketpair()
2123 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED); in test_credentials_unix_socketpair()
2124 g_print ("Unsupported on this OS: %s\n", error->message); in test_credentials_unix_socketpair()
2125 g_clear_error (&error); in test_credentials_unix_socketpair()
2139 GError *error = NULL; in main() local
2147 &error); in main()
2155 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED); in main()
2156 g_clear_error (&error); in main()