aboutsummaryrefslogtreecommitdiff
path: root/tests/stress_tests/parallel_cp.sh
diff options
context:
space:
mode:
authorJakob Unterwurzacher2019-10-06 22:34:19 +0200
committerJakob Unterwurzacher2019-10-06 22:34:19 +0200
commit65bc006a78c67b8f8cf0b01f8ed948dca6c1e408 (patch)
treeb0d70bf38a380a7581741df6f7d6b20089fbd6b0 /tests/stress_tests/parallel_cp.sh
parenta1f647740182a74eb84eed3135b0f171ac753fdb (diff)
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.
Diffstat (limited to 'tests/stress_tests/parallel_cp.sh')
-rwxr-xr-xtests/stress_tests/parallel_cp.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/stress_tests/parallel_cp.sh b/tests/stress_tests/parallel_cp.sh
index b9e6b4b..ad98e5e 100755
--- a/tests/stress_tests/parallel_cp.sh
+++ b/tests/stress_tests/parallel_cp.sh
@@ -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
@@ -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