Re: [PATCH bpf v2] selftests/bpf: test_progs: fix client/server race in tcp_rtt

2019-09-25 Thread Daniel Borkmann
On Mon, Sep 23, 2019 at 11:41:12AM -0700, Stanislav Fomichev wrote: > This is the same problem I found earlier in test_sockopt_inherit: > there is a race between server thread doing accept() and client > thread doing connect(). Let's explicitly synchronize them via > pthread conditional variable. >

[PATCH bpf v2] selftests/bpf: test_progs: fix client/server race in tcp_rtt

2019-09-23 Thread Stanislav Fomichev
This is the same problem I found earlier in test_sockopt_inherit: there is a race between server thread doing accept() and client thread doing connect(). Let's explicitly synchronize them via pthread conditional variable. v2: * don't exit from server_thread without signaling condvar, fixes possi