From ca58dff781a0da2bae04cccb40965deab30447be Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 13 Jul 2022 15:45:53 -0400 Subject: tests: Limit path lengths passed to mkdir FreeBSD limits mkdir() to 1023 bytes, not 4096. --- tests/tests.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/tests.sh b/tests/tests.sh index 96af49c..dce421a 100755 --- a/tests/tests.sh +++ b/tests/tests.sh @@ -1067,17 +1067,20 @@ function make_deep() { name="${name}${name}${name}${name}" name="${name:0:255}" - # 4 * 4 * 256 - 1 == 4095 == PATH_MAX - 1 + # 4 * 256 - 1 == 1023 local names="$name/$name/$name/$name" - names="$names/$names/$names/$names" for i in {0..9} A B C D E F; do ( mkdir "$1/$i" cd "$1/$i" - mkdir -p "$names" - cd "$names" + # 4 * 1024 == 4096 == PATH_MAX + for _ in {1..4}; do + mkdir -p "$names" + cd "$names" + done + $TOUCH "$name" ) done -- cgit v1.2.3