From b6026aa350434b6425d80a809e3cadaa15512ff2 Mon Sep 17 00:00:00 2001 From: josch Date: Sun, 26 Oct 2014 14:10:49 +0100 Subject: [PATCH] valgrind_fuse: only wait 10 seconds for fuse to be mounted --- tests/valgrind_fuse.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/valgrind_fuse.sh b/tests/valgrind_fuse.sh index fa055fc..13eced3 100755 --- a/tests/valgrind_fuse.sh +++ b/tests/valgrind_fuse.sh @@ -33,12 +33,20 @@ $cmd "${binary_dir}/mediafire-fuse" -s -f -d /mnt & fusepid="$!" # once the file system is found to be mounted, print the tree and unmount -while sleep 1; do +for i in `seq 1 10`; do + sleep 1 if [ `mount -t fuse.mediafire-fuse | wc -l` -ne 0 ]; then break; fi done +if [ `mount -t fuse.mediafire-fuse | wc -l` -eq 0 ]; then + echo "cannot mount fuse" >&2 + fusermount -u /mnt + wait "$fusepid" + exit 1 +fi + tree /mnt fusermount -u /mnt