[parted-devel] [PATCH 3/3] tests: update resize-fs to use wait_for_dev_to_appear_
Jim Meyering
jim at meyering.net
Wed Jun 30 06:22:37 UTC 2010
Otavio Salvador wrote:
> * t3000-resize-fs.sh: rely on wait_for_dev_to_appear_ to wait for the
> device to be crated.
> ---
> tests/t3000-resize-fs.sh | 8 +-------
> 1 files changed, 1 insertions(+), 7 deletions(-)
>
> diff --git a/tests/t3000-resize-fs.sh b/tests/t3000-resize-fs.sh
> index 5cc46d3..f93de4b 100755
> --- a/tests/t3000-resize-fs.sh
> +++ b/tests/t3000-resize-fs.sh
> @@ -79,13 +79,7 @@ for fs_type in hfs+ fat32; do
> # as $dev, the loop below typically iterates 7-20 times.
>
> # wait for new partition device to appear
> - i=0
> - while :; do
> - test -e "${dev}1" && break; test $i = 90 && break;
> - i=$(expr $i + 1)
> - sleep .01 2>/dev/null || sleep 1
> - done
> - test $i = 90 && fail=1
> + wait_for_dev_to_appear_ ${dev}1
>
> case $fs_type in
> fat32) mkfs_cmd='mkfs.vfat -F 32';;
ACK
More information about the parted-devel
mailing list