stress_tests: use /var/tmp by default

There is a good chance that /tmp is tmpfs, and we want to
run our tests on a real filesystem.
This commit is contained in:
Jakob Unterwurzacher 2019-10-06 22:34:19 +02:00
parent a1f6477401
commit 65bc006a78
3 changed files with 19 additions and 4 deletions

View File

@ -11,6 +11,11 @@
# #
# See Documentation/extractloop.md for example output. # See Documentation/extractloop.md for example output.
if [[ -z $TMPDIR ]]; then
TMPDIR=/var/tmp
export TMPDIR
fi
set -eu set -eu
# Run at low priority to not annoy the user too much # Run at low priority to not annoy the user too much
@ -23,8 +28,8 @@ source ../fuse-unmount.bash
# Setup dirs # Setup dirs
../dl-linux-tarball.bash ../dl-linux-tarball.bash
cd /tmp cd $TMPDIR
EXTRACTLOOP_TMPDIR=/tmp/extractloop_tmpdir EXTRACTLOOP_TMPDIR=$TMPDIR/extractloop_tmpdir
mkdir -p $EXTRACTLOOP_TMPDIR mkdir -p $EXTRACTLOOP_TMPDIR
CRYPT=$(mktemp -d $EXTRACTLOOP_TMPDIR/XXX) CRYPT=$(mktemp -d $EXTRACTLOOP_TMPDIR/XXX)
CSV=$CRYPT.csv CSV=$CRYPT.csv

View File

@ -12,6 +12,11 @@
# #
# Nowadays it should pass an indefinite number of iterations. # Nowadays it should pass an indefinite number of iterations.
if [[ -z $TMPDIR ]]; then
TMPDIR=/var/tmp
export TMPDIR
fi
set -eu set -eu
cd "$(dirname "$0")" cd "$(dirname "$0")"
@ -28,7 +33,7 @@ then
fi fi
# Backing directory # Backing directory
DIR=$(mktemp -d /tmp/$MYNAME.XXX) DIR=$(mktemp -d $TMPDIR/$MYNAME.XXX)
# Mountpoint # Mountpoint
MNT="$DIR.mnt" MNT="$DIR.mnt"
mkdir $MNT mkdir $MNT

View File

@ -12,6 +12,11 @@
# #
# See https://github.com/rfjakob/gocryptfs/issues/322 for details. # See https://github.com/rfjakob/gocryptfs/issues/322 for details.
if [[ -z $TMPDIR ]]; then
TMPDIR=/var/tmp
export TMPDIR
fi
cd "$(dirname "$0")" cd "$(dirname "$0")"
MYNAME=$(basename $0) MYNAME=$(basename $0)
source ../fuse-unmount.bash source ../fuse-unmount.bash
@ -20,7 +25,7 @@ source ../fuse-unmount.bash
GOPATH=$(go env GOPATH) GOPATH=$(go env GOPATH)
# Backing directory # Backing directory
DIR=$(mktemp -d /tmp/$MYNAME.XXX) DIR=$(mktemp -d $TMPDIR/$MYNAME.XXX)
$GOPATH/bin/gocryptfs -q -init -extpass "echo test" -scryptn=10 $DIR $GOPATH/bin/gocryptfs -q -init -extpass "echo test" -scryptn=10 $DIR
# Mountpoint # Mountpoint