From cf742f4e8b3caec1136801713f8233d794650637 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Mon, 11 Jul 2016 22:10:41 +0200 Subject: [PATCH] tests: add encfs support to benchmark.bash and extractloop.bash Pass "-encfs" to test encfs instead of gocryptfs. --- benchmark.bash | 10 ++++++++-- tests/stress_tests/extractloop.bash | 14 ++++++++++---- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/benchmark.bash b/benchmark.bash index 55f6fa2..f1f0a2c 100755 --- a/benchmark.bash +++ b/benchmark.bash @@ -12,8 +12,14 @@ cd /tmp wget -nv --show-progress -c https://www.kernel.org/pub/linux/kernel/v3.0/linux-3.0.tar.gz DIR1=$(mktemp -d) DIR2=$(mktemp -d) -gocryptfs -q -init -extpass="echo test" $DIR1 -gocryptfs -q -extpass="echo test" $DIR1 $DIR2 + +if [ $# -eq 1 ] && [ "$1" == "-encfs" ]; then + echo "Testing EncFS" + encfs --extpass="echo test" --standard $DIR1 $DIR2 > /dev/null +else + gocryptfs -q -init -extpass="echo test" -scryptn=10 $DIR1 + gocryptfs -q -extpass="echo test" $DIR1 $DIR2 +fi cd $DIR2 # Benchmarks diff --git a/tests/stress_tests/extractloop.bash b/tests/stress_tests/extractloop.bash index af346c0..86f7802 100755 --- a/tests/stress_tests/extractloop.bash +++ b/tests/stress_tests/extractloop.bash @@ -14,14 +14,20 @@ set -eu cd "$(dirname "$0")" MD5="$PWD/linux-3.0.md5sums" -# Setup +# Setup dirs cd /tmp wget -nv --show-progress -c https://www.kernel.org/pub/linux/kernel/v3.0/linux-3.0.tar.gz DIR1=$(mktemp -d) DIR2=$(mktemp -d) -gocryptfs -q -init -extpass="echo test" $DIR1 -gocryptfs -q -extpass="echo test" -nosyslog $DIR1 $DIR2 -#gocryptfs -q -extpass="echo test" -nosyslog -memprofile /tmp/extractloop-mem $DIR1 $DIR2 + +# Mount +if [ $# -eq 1 ] && [ "$1" == "-encfs" ]; then + echo "Testing EncFS" + encfs --extpass="echo test" --standard $DIR1 $DIR2 > /dev/null +else + gocryptfs -q -init -extpass="echo test" -scryptn=10 $DIR1 + gocryptfs -q -extpass="echo test" $DIR1 $DIR2 +fi cd $DIR2 # Cleanup trap