aboutsummaryrefslogtreecommitdiff
path: root/tests/stress_tests
diff options
context:
space:
mode:
authorJakob Unterwurzacher2019-11-10 22:06:40 +0100
committerJakob Unterwurzacher2019-11-10 22:06:40 +0100
commitf7ddae24eda373e8680ffb9d4b7ef74dea36f60f (patch)
treeb6c8bc50de5fdb0fcbe84381e5abc2ec24b2fc36 /tests/stress_tests
parentd404dcd3e3696fbf6197ea7100ff2bed062ab2be (diff)
tests: fsstress: clean up leftover mounts on startup
Broken mounts may accumulate when the fs crashes.
Diffstat (limited to 'tests/stress_tests')
-rwxr-xr-xtests/stress_tests/fsstress-gocryptfs.bash5
1 files changed, 5 insertions, 0 deletions
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"