From f7ddae24eda373e8680ffb9d4b7ef74dea36f60f Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 10 Nov 2019 22:06:40 +0100 Subject: tests: fsstress: clean up leftover mounts on startup Broken mounts may accumulate when the fs crashes. --- tests/stress_tests/fsstress-gocryptfs.bash | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/stress_tests/fsstress-gocryptfs.bash') diff --git a/tests/stress_tests/fsstress-gocryptfs.bash b/tests/stress_tests/fsstress-gocryptfs.bash index 2a75c90..0a79c76 100755 --- a/tests/stress_tests/fsstress-gocryptfs.bash +++ b/tests/stress_tests/fsstress-gocryptfs.bash @@ -41,6 +41,11 @@ mkdir $MNT # Set the GOPATH variable to the default if it is empty GOPATH=$(go env GOPATH) +# Clean up old mounts +for i in $(mount | cut -d" " -f3 | grep $TMPDIR/$MYNAME) ; do + fusermount -u $i +done + # FS-specific compile and mount if [ $MYNAME = fsstress-loopback.bash ]; then echo "Recompile go-fuse loopback" -- cgit v1.2.3