diff options
Diffstat (limited to 'tests/stress_tests')
| -rwxr-xr-x | tests/stress_tests/pjdfstest.bash | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/stress_tests/pjdfstest.bash b/tests/stress_tests/pjdfstest.bash new file mode 100755 index 0000000..a786e41 --- /dev/null +++ b/tests/stress_tests/pjdfstest.bash @@ -0,0 +1,34 @@ +#!/usr/bin/env bash +# +# Mount a gocryptfs filesystem in /var/tmp and run pjdfstest against it + +set -eu + +export TMPDIR=${TMPDIR:-/var/tmp} + +cd "$(dirname "$0")" +MYNAME=$(basename "$0") +source ../fuse-unmount.bash + +pjdfstest_dir=$(realpath ../../../pjdfstest) +if [[ ! -x $pjdfstest_dir/pjdfstest ]] +then + echo "$MYNAME: pjdfstest binary not found at $pjdfstest_dir/pjdfstest" + echo "Please clone and build https://github.com/pjd/pjdfstest" + exit 1 +fi + +# Backing directory + mountpoint +DIR=$(mktemp -d "$TMPDIR/$MYNAME.XXX") +MNT="$DIR.mnt" +mkdir "$MNT" + +../../gocryptfs -q -init -extpass "echo test" -scryptn=10 "$DIR" +sudo ../../gocryptfs -q -extpass "echo test" -nosyslog -allow_other "$DIR" "$MNT" +cd "$MNT" + +# Cleanup trap +trap "cd /tmp ; fuse-unmount -z $MNT" EXIT + +echo "Starting pjdfstest" +sudo prove -r "$pjdfstest_dir/tests"
\ No newline at end of file |
