summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJakob Unterwurzacher2019-01-23 22:14:31 +0100
committerJakob Unterwurzacher2019-01-23 22:14:31 +0100
commitb86cc3304f9cbae92e851b3f524dc16ddabb4b52 (patch)
treeeabcc6e3a7b2605f09eb280ce4cb4c27129e6621 /tests
parentda3ba5e7f5efb164acb1292dd85b4fe25dd8e3bf (diff)
tests: simplify parallel_cp.sh
Get rid of one extra directory level. Hopefully makes it easier to follow the debug logs.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/stress_tests/parallel_cp.sh15
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/stress_tests/parallel_cp.sh b/tests/stress_tests/parallel_cp.sh
index b37e681..324e0c6 100755
--- a/tests/stress_tests/parallel_cp.sh
+++ b/tests/stress_tests/parallel_cp.sh
@@ -1,7 +1,16 @@
#!/bin/bash
#
# Simplified xfstests generic/273
-# See https://github.com/rfjakob/gocryptfs/issues/322
+#
+# Fails with
+#
+# cp: cannot create regular file 'sub_49/file_773': No such file or directory
+#
+# If you cannot reproduce, try running this in the background:
+#
+# while sleep 0.1 ; do echo 3 > /proc/sys/vm/drop_caches ; done"
+#
+# See https://github.com/rfjakob/gocryptfs/issues/322 for details.
echo "deleting old files"
rm -Rf origin sub_*
@@ -12,11 +21,13 @@ 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
+# Perform the shell expansion only once and store the list
+ORIGIN_FILES=origin/*
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 ") &
+ (mkdir sub_$i && cp $ORIGIN_FILES sub_$i ; echo -n "$i ") &
done
echo