[LTP] [RFC PATCH v2] syscalls/sendmmsg: add new test

Cyril Hrubis chrubis@suse.cz
Tue May 21 16:47:33 CEST 2019


Hi!
> Known issues/questions:
>  - This test occasionally gets stuck when the two messages get sent by
>    separate sendmmsg calls. The two sendmmsg calls complete successfully
>    but recvmmsg blocks indefinitely. I am not yet sure what would cause
>    this.

There is a race between the sender and receiver thread, if the sender
thread finishes before the receiver thread binds the socket the packets
are simply dropped since this is SOCK_DGRAM and nobody is listening at
the other side of the socket yet.

You have to synchronize the threads with checkpoints so that the sender
thread does not send anything until the receiver binds the socket.

>  - I have not used tst_get_unused_port() because I'm unsure of how that
>    function should be made available for both the new and old test API?
>    I can just create a duplicate function but is there a cleaner way?

Peter just merged patch that adds this functionality to new library.

You are also missing the SPDX licence identifier and other than this
there are minor coding style violation (hint use checkpatch.pl).

Apart from these the code looks good.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list