diff options
author | Jakob Unterwurzacher | 2019-01-05 18:20:04 +0100 |
---|---|---|
committer | Jakob Unterwurzacher | 2019-01-05 18:20:04 +0100 |
commit | fb705f99782f222e72c42b23be9263bbd302a4d4 (patch) | |
tree | 03a074c35e016b498ff8200345f3b8e125ffef48 /tests/stress_tests/parallel_cp.sh | |
parent | 7e05e809b7579ad0473fff6ce466c19d417d4e93 (diff) |
tests: add parallel_cp stress test
Modeled after xfstests generic/273
https://github.com/rfjakob/gocryptfs/issues/322
Diffstat (limited to 'tests/stress_tests/parallel_cp.sh')
-rwxr-xr-x | tests/stress_tests/parallel_cp.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/stress_tests/parallel_cp.sh b/tests/stress_tests/parallel_cp.sh new file mode 100755 index 0000000..b37e681 --- /dev/null +++ b/tests/stress_tests/parallel_cp.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# +# Simplified xfstests generic/273 +# See https://github.com/rfjakob/gocryptfs/issues/322 + +echo "deleting old files" +rm -Rf origin sub_* + +SECONDS=0 +echo "creating files with dd" +mkdir -p origin +for i in $(seq 1 778) ; do + dd if=/dev/zero of=origin/file_$i bs=8192 count=1 status=none +done + +echo -n "cp starting: " +for i in $(seq 1 100) ; do + echo -n "$i " + (mkdir sub_$i && cp -r origin sub_$i ; echo -n "$i ") & +done + +echo +echo -n "cp finished: " +wait +echo +echo "Runtime was $SECONDS seconds" |