mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
btrfs/132: wait the writer to avoid EBUSY
The kill and wait method will only wait for the children process to exit, while the xfs_io can still run at background. This makes the test always fails on HDD backed physical machine. Use the "while ps aux | grep" method in btrfs/069 to truely wait the xfs_io to finish. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Reviewed-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
+4
-3
@@ -94,9 +94,10 @@ sleep $sleep_time
|
|||||||
kill $pids
|
kill $pids
|
||||||
wait
|
wait
|
||||||
|
|
||||||
# Sync the fs to avoid EBUSY while umount, which is quite common for btrfs
|
# Wait all writers really exits
|
||||||
# compression
|
while ps aux | grep "$SCRATCH_MNT" | grep -qv grep; do
|
||||||
sync
|
sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
echo "Silence is golden"
|
echo "Silence is golden"
|
||||||
status=0
|
status=0
|
||||||
|
|||||||
Reference in New Issue
Block a user