diff options
Diffstat (limited to 'tests/stress_tests')
| -rwxr-xr-x | tests/stress_tests/extractloop.bash | 2 | ||||
| -rwxr-xr-x | tests/stress_tests/fsstress-gocryptfs.bash | 2 | ||||
| -rwxr-xr-x | tests/stress_tests/pingpong.bash | 2 | ||||
| -rwxr-xr-x | tests/stress_tests/pjdfstest.bash | 34 |
4 files changed, 37 insertions, 3 deletions
diff --git a/tests/stress_tests/extractloop.bash b/tests/stress_tests/extractloop.bash index 1f78a5e..714d2d7 100755 --- a/tests/stress_tests/extractloop.bash +++ b/tests/stress_tests/extractloop.bash @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Mount a gocryptfs filesystem somewhere on /tmp, then run two parallel # infinite loops inside that do the following: diff --git a/tests/stress_tests/fsstress-gocryptfs.bash b/tests/stress_tests/fsstress-gocryptfs.bash index e6c3281..7e3f160 100755 --- a/tests/stress_tests/fsstress-gocryptfs.bash +++ b/tests/stress_tests/fsstress-gocryptfs.bash @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Mount a gocryptfs filesystem in /var/tmp and run fsstress against it # in an infinite loop, only exiting on errors. diff --git a/tests/stress_tests/pingpong.bash b/tests/stress_tests/pingpong.bash index d0d21b3..4fd5ff2 100755 --- a/tests/stress_tests/pingpong.bash +++ b/tests/stress_tests/pingpong.bash @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Mounts two gocryptfs filesystems, "ping" and "pong" and moves the # linux-3.0 kernel tree back and forth between them, checking integrity 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 |
