Re: [PATCH v3] selftests: vsock: avoid races creating Unix socket paths

From: Jakub Kicinski

Date: Fri Apr 10 2026 - 16:47:44 EST


On Fri, 10 Apr 2026 18:07:00 +0800 Cao Ruichuang wrote:
> vmtest.sh currently uses mktemp -u to precompute Unix socket paths for the
> namespace bridge helpers. That only returns an unused pathname and leaves a
> time-of-check/time-of-use window before socat binds or connects to it.
>
> Create a private temporary directory with mktemp -d and place the
> socket path inside it instead. This removes the pathname race while
> keeping cleanup straightforward.

And you actually run into this as a real problem?
How do you repro the failure?

Basic netdev rules:
- don't post new version of patches in reply to the old ones
- no more than 1 posting in a 24h period