public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 2/2] Add connection tests for bind()
Date: Mon, 23 Sep 2019 19:02:25 +0200	[thread overview]
Message-ID: <20190923170225.GA10355@dell5510> (raw)
In-Reply-To: <20190919145911.22278-3-mdoucha@suse.cz>

Hi Martin,

> Add two new test programs to verify that bind() will open sockets for incoming
> connections. Both programs follow the same test scenario:
> - Create and bind() a socket
> - Wait for connection from peer thread
> - Send request to peer thread
> - Receive and verify response from peer thread

> bind04 tests stream-oriented sockets (SOCK_STREAM and SOCK_SEQPACKET).
> bind05 tests datagram-oriented sockets (SOCK_DGRAM).

> Both programs test the following socket types:
> - AF_UNIX (pathname and abstract addresses)
> - AF_INET (loopback)
> - AF_INET6 (loopback)

I'd drop libbind.c and move content into libbind.h, using inline functions.

Both tests also share a lot of code. I understand you don't want to mix TCP and
UDP tests (I would probably do), but could you at least move setup() and constants into libbind.h?

I'd also test:
IPPROTO_SCTP (SOCK_STREAM) for TCP and
IPPROTO_UDPLITE (SOCK_DGRAM) for UDP.

+ test some protocols for other sock types: 
IPPROTO_SCTP (SOCK_STREAM).

> Signed-off-by: Martin Doucha <mdoucha@suse.cz>
Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr

      reply	other threads:[~2019-09-23 17:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-19 14:59 [LTP] [PATCH 0/2] Increase bind() converage - GH#538 Martin Doucha
2019-09-19 14:59 ` [LTP] [PATCH 1/2] Update syscalls/bind02 to new API Martin Doucha
2019-09-23 16:11   ` Petr Vorel
2019-09-19 14:59 ` [LTP] [PATCH 2/2] Add connection tests for bind() Martin Doucha
2019-09-23 17:02   ` Petr Vorel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190923170225.GA10355@dell5510 \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox