@@ -360,58 +360,6 @@ static void test_in_addr_ifindex_from_string_auto(void) {
360360 assert_se (in_addr_ifindex_from_string_auto ("fe80::19%thisinterfacecantexist" , & family , & ua , & ifindex ) == - ENODEV );
361361}
362362
363- static void * connect_thread (void * arg ) {
364- union sockaddr_union * sa = arg ;
365- _cleanup_close_ int fd = -1 ;
366-
367- fd = socket (AF_INET , SOCK_STREAM | SOCK_CLOEXEC , 0 );
368- assert_se (fd >= 0 );
369-
370- assert_se (connect (fd , & sa -> sa , sizeof (sa -> in )) == 0 );
371-
372- return NULL ;
373- }
374-
375- static void test_nameinfo_pretty (void ) {
376- _cleanup_free_ char * stdin_name = NULL , * localhost = NULL ;
377-
378- union sockaddr_union s = {
379- .in .sin_family = AF_INET ,
380- .in .sin_port = 0 ,
381- .in .sin_addr .s_addr = htobe32 (INADDR_ANY ),
382- };
383- int r ;
384-
385- union sockaddr_union c = {};
386- socklen_t slen = sizeof (c .in ), clen = sizeof (c .in );
387-
388- _cleanup_close_ int sfd = -1 , cfd = -1 ;
389- r = getnameinfo_pretty (STDIN_FILENO , & stdin_name );
390- log_info_errno (r , "No connection remote: %m" );
391-
392- assert_se (r < 0 );
393-
394- sfd = socket (AF_INET , SOCK_STREAM |SOCK_CLOEXEC , 0 );
395- assert_se (sfd >= 0 );
396-
397- assert_se (bind (sfd , & s .sa , sizeof (s .in )) == 0 );
398-
399- /* find out the port number */
400- assert_se (getsockname (sfd , & s .sa , & slen ) == 0 );
401-
402- assert_se (listen (sfd , 1 ) == 0 );
403-
404- assert_se (asynchronous_job (connect_thread , & s ) == 0 );
405-
406- log_debug ("Accepting new connection on fd:%d" , sfd );
407- cfd = accept4 (sfd , & c .sa , & clen , SOCK_CLOEXEC );
408- assert_se (cfd >= 0 );
409-
410- r = getnameinfo_pretty (cfd , & localhost );
411- log_info ("Connection from %s" , localhost );
412- assert_se (r == 0 );
413- }
414-
415363static void test_sockaddr_equal (void ) {
416364 union sockaddr_union a = {
417365 .in .sin_family = AF_INET ,
@@ -561,8 +509,6 @@ int main(int argc, char *argv[]) {
561509 test_in_addr_ifindex_to_string ();
562510 test_in_addr_ifindex_from_string_auto ();
563511
564- test_nameinfo_pretty ();
565-
566512 test_sockaddr_equal ();
567513
568514 test_sockaddr_un_len ();
0 commit comments