mirror of
https://github.com/containers/fuse-overlayfs.git
synced 2025-08-03 18:05:58 -04:00
test: fix race when opening file
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
c25c60ed8d
commit
cbb4594654
@ -205,11 +205,12 @@ touch merged/$(printf %${merged_max_filename_len}s | tr ' ' A})
|
||||
|
||||
# If a file is removed but referenced, we must still be able to access it.
|
||||
echo 12345 | tee merged/toremove
|
||||
cat merged/toremove
|
||||
sleep 90 < merged/toremove &
|
||||
exec 3<> merged/toremove
|
||||
sleep 90 &
|
||||
exec 3>&-
|
||||
sleep_pid=$!
|
||||
rm merged/toremove
|
||||
grep 12345 /proc/$sleep_pid/fd/0
|
||||
grep 12345 /proc/$sleep_pid/fd/3
|
||||
|
||||
touch merged/a merged/b
|
||||
chmod 6 merged/a
|
||||
|
Loading…
x
Reference in New Issue
Block a user