tests: fsstress: clean up leftover mounts on startup

Broken mounts may accumulate when the fs crashes.
This commit is contained in:
Jakob Unterwurzacher 2019-11-10 22:06:40 +01:00
parent d404dcd3e3
commit f7ddae24ed
1 changed files with 5 additions and 0 deletions

View File

@ -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"