On Wed, Nov 19, 2025 at 06:10:18PM -0800, Jakub Kicinski wrote:
> There's a common synchronization problem when a script (Python test)
> uses a C program to set up some state (usually start a receiving
> process for traffic). The script needs to know when the process
> has fully initialized. The inverse of the problem exists for shutting
> the process down - we need a reliable way to tell the process to exit.
>
> We added helpers to do this safely in
> commit 71477137994f ("selftests: drv-net: add a way to wait for a local
> process")
> unfortunately the two operations (wait for init, and shutdown) are
> controlled by a single parameter (ksft_wait). Add support for using
> ksft_ready without using the second fd for exit.
>
> This is useful for programs which wait for a specific number of packets
> to rx so exit_wait is a good match, but we still need to wait for init.
>
> Reviewed-by: Petr Machata <[email protected]>
> Reviewed-by: Willem de Bruijn <[email protected]>
> Signed-off-by: Jakub Kicinski <[email protected]>
Reviewed-by: breno Leitao <[email protected]>