[LTP] [PATCH v4 3/3] Add connection tests for bind()

Petr Vorel pvorel@suse.cz
Fri Mar 20 10:53:12 CET 2020


Hi Martin,

> +	SAFE_LISTEN(listen_sock, 1);
> +	SAFE_PTHREAD_CREATE(&thread_id, NULL, peer_thread, &tc_copy);
> +	sock = accept(listen_sock, (struct sockaddr *)&remote_addr,
> +		&remote_len);
> +
> +	if (sock < 0)
> +		tst_brk(TBROK | TERRNO, "accept() failed");
We can just use 
	sock = SAFE_ACCEPT(listen_sock, (struct sockaddr *)&remote_addr,
 		&remote_len);

Whole patch set looks ok to me.

Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr


More information about the ltp mailing list