summaryrefslogtreecommitdiffstats
path: root/tests/tests.sh
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-10-02 14:13:49 -0400
committerTavian Barnes <tavianator@tavianator.com>2023-10-02 14:13:49 -0400
commitc1103834065bbd1182a90b9723dbd89a4a908731 (patch)
tree787c2791812002a058dfd109f3b2c6dc0519cb9e /tests/tests.sh
parent1c775d0128a797370bbc0bbd527b4bbbc9d0b83d (diff)
downloadbfs-c1103834065bbd1182a90b9723dbd89a4a908731.tar.xz
tests: Fix make_deep() on FreeBSD
I keep forgetting that PATH_MAX is only 1024 there.
Diffstat (limited to 'tests/tests.sh')
-rwxr-xr-xtests/tests.sh19
1 files changed, 10 insertions, 9 deletions
diff --git a/tests/tests.sh b/tests/tests.sh
index 121cd85..663f5aa 100755
--- a/tests/tests.sh
+++ b/tests/tests.sh
@@ -389,18 +389,19 @@ function make_deep() {
name="${name}${name}${name}${name}"
name="${name:0:255}"
- # 4 * 256 - 1 == 1023
- local names="$name/$name/$name/$name"
-
for i in {0..9} A B C D E F; do
"$XTOUCH" -p "$1/$i/$name"
- # 4 * 1024 == 4096 == PATH_MAX
- for _ in {1..4}; do
- mv "$1/$i/$name" "$1/"
- mkdir -p "$1/$i/$names"
- mv "$1/$name" "$1/$i/$names/"
- done
+ (
+ cd "$1/$i"
+
+ # 8 * 512 == 4096 >= PATH_MAX
+ for _ in {1..8}; do
+ mv "$name" ..
+ mkdir -p "$name/$name"
+ mv "../$name" "$name/$name/"
+ done
+ )
done
}
make_deep "$TMP/deep"