Skip to content

Commit

Permalink
stress_tests: use /var/tmp by default
Browse files Browse the repository at this point in the history
There is a good chance that /tmp is tmpfs, and we want to
run our tests on a real filesystem.
  • Loading branch information
rfjakob committed Oct 6, 2019
1 parent a1f6477 commit 65bc006
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
9 changes: 7 additions & 2 deletions tests/stress_tests/extractloop.bash
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
#
# See Documentation/extractloop.md for example output.

if [[ -z $TMPDIR ]]; then
TMPDIR=/var/tmp
export TMPDIR
fi

set -eu

# Run at low priority to not annoy the user too much
Expand All @@ -23,8 +28,8 @@ source ../fuse-unmount.bash

# Setup dirs
../dl-linux-tarball.bash
cd /tmp
EXTRACTLOOP_TMPDIR=/tmp/extractloop_tmpdir
cd $TMPDIR
EXTRACTLOOP_TMPDIR=$TMPDIR/extractloop_tmpdir
mkdir -p $EXTRACTLOOP_TMPDIR
CRYPT=$(mktemp -d $EXTRACTLOOP_TMPDIR/XXX)
CSV=$CRYPT.csv
Expand Down
7 changes: 6 additions & 1 deletion tests/stress_tests/fsstress-gocryptfs.bash
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
#
# Nowadays it should pass an indefinite number of iterations.

if [[ -z $TMPDIR ]]; then
TMPDIR=/var/tmp
export TMPDIR
fi

set -eu

cd "$(dirname "$0")"
Expand All @@ -28,7 +33,7 @@ then
fi

# Backing directory
DIR=$(mktemp -d /tmp/$MYNAME.XXX)
DIR=$(mktemp -d $TMPDIR/$MYNAME.XXX)
# Mountpoint
MNT="$DIR.mnt"
mkdir $MNT
Expand Down
7 changes: 6 additions & 1 deletion tests/stress_tests/parallel_cp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
#
# See https://github.com/rfjakob/gocryptfs/issues/322 for details.

if [[ -z $TMPDIR ]]; then
TMPDIR=/var/tmp
export TMPDIR
fi

cd "$(dirname "$0")"
MYNAME=$(basename $0)
source ../fuse-unmount.bash
Expand All @@ -20,7 +25,7 @@ source ../fuse-unmount.bash
GOPATH=$(go env GOPATH)

# 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

# Mountpoint
Expand Down

0 comments on commit 65bc006

Please sign in to comment.