On
commit a076f497577605e4cf0e20c147711e03dee7b2c3
Author: database64128 <
free1...@hotmail.com>
Date: Fri Aug 22 01:03:42 2025 +0800
os: fix Root.MkdirAll to handle race of directory creation
No tests were added, because in order to reproduce, the directory would
have to be created precisely between the rootOpenDir and mkdirat calls,
which is impossible to do in a test.
Fixes #75114
you mentioned that testing this is impossible. In glibc, we have had
good success creating such impossible tests with custom FUSE file
systems. We use a service thread in the same process to respond to
kernel events, so it's easy enough the communicate with the test. We
don't have a mkdirhier function in glibc, but mkstemp faces a similar
testing challenge. Our FUSE test just pretends that all the files that
mkstemp tries to create already exist.
Thanks,
Florian