diff options
author | Lukasz Majewski <l.majewski@samsung.com> | 2014-11-07 14:05:55 +0100 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2014-11-14 21:09:12 +0100 |
commit | fbd3b79d77b136e85c115c09aaf5c9ce40446850 (patch) | |
tree | caae0c1ff45cfca498eb95c04314176296f73dbd /test | |
parent | 5610b05789fb6f6af7e13ac8e7cac99e0b2422c7 (diff) | |
download | u-boot-imx-fbd3b79d77b136e85c115c09aaf5c9ce40446850.zip u-boot-imx-fbd3b79d77b136e85c115c09aaf5c9ce40446850.tar.gz u-boot-imx-fbd3b79d77b136e85c115c09aaf5c9ce40446850.tar.bz2 |
test: ums: Add sleep before unmount directory
This change helps to run script on machines with quite long uptime.
Without this the following error emerges:
File: ./dat_14M.img
umount: /mnt/tmp-ums-test: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
TX: md5sum:083d3d22b542d3ecba61b12d17e03f9f
mount: /dev/sdd6 already mounted or /mnt/tmp-ums-test busy
mount: according to mtab, /dev/sdd6 is already mounted on /mnt/tmp-ums-test
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'test')
-rwxr-xr-x | test/ums/ums_gadget_test.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/ums/ums_gadget_test.sh b/test/ums/ums_gadget_test.sh index 56d4616..9da486b 100755 --- a/test/ums/ums_gadget_test.sh +++ b/test/ums/ums_gadget_test.sh @@ -11,6 +11,7 @@ clear COLOUR_RED="\33[31m" COLOUR_GREEN="\33[32m" +COLOUR_ORANGE="\33[33m" COLOUR_DEFAULT="\33[0m" DIR=./ @@ -59,8 +60,15 @@ ums_test_file () { fi cp ./$1 $MNT_DIR - umount $MNT_DIR + while true; do + umount $MNT_DIR > /dev/null 2>&1 + if [ $? -eq 0 ]; then + break + fi + printf "$COLOUR_ORANGE\tSleeping to wait for umount...$COLOUR_DEFAULT\n" + sleep 1 + done echo -n "TX: " calculate_md5sum $1 |