From: Qu Wenruo Date: Mon, 26 Dec 2016 04:57:52 +0000 (+0800) Subject: btrfs/132: wait the writer to avoid EBUSY X-Git-Tag: v2022.05.01~2251 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2333197d308e0674aefb90620a833cb7e0ee6b6e;p=xfstests-dev.git 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 Reviewed-by: Eryu Guan Signed-off-by: Eryu Guan --- diff --git a/tests/btrfs/132 b/tests/btrfs/132 index 05161772..db0dcb04 100755 --- a/tests/btrfs/132 +++ b/tests/btrfs/132 @@ -94,9 +94,10 @@ sleep $sleep_time kill $pids wait -# Sync the fs to avoid EBUSY while umount, which is quite common for btrfs -# compression -sync +# Wait all writers really exits +while ps aux | grep "$SCRATCH_MNT" | grep -qv grep; do + sleep 1 +done echo "Silence is golden" status=0