mirror of
https://github.com/containers/fuse-overlayfs.git
synced 2025-08-03 18:05:58 -04:00
tests: fix race condition
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
4ad759b35a
commit
79f885bc7b
@ -204,8 +204,9 @@ fi
|
|||||||
touch merged/$(printf %${merged_max_filename_len}s | tr ' ' A})
|
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.
|
# If a file is removed but referenced, we must still be able to access it.
|
||||||
echo 12345 > merged/toremove
|
echo 12345 | tee merged/toremove
|
||||||
sleep 30 < merged/toremove &
|
cat merged/toremove
|
||||||
|
sleep 90 < merged/toremove &
|
||||||
sleep_pid=$!
|
sleep_pid=$!
|
||||||
rm merged/toremove
|
rm merged/toremove
|
||||||
grep 12345 /proc/$sleep_pid/fd/0
|
grep 12345 /proc/$sleep_pid/fd/0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user