diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2023-10-20 11:18:25 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2023-10-20 11:36:33 -0400 |
commit | 962d715ce2dee7a017dacca3b787ade6d33cd1c6 (patch) | |
tree | 93af44a1ec95d7d2be0e175ce21026c92036e4d3 /tests/stddirs.sh | |
parent | 156602895250813a8a5a0850f3fec5ed0c774796 (diff) | |
download | bfs-962d715ce2dee7a017dacca3b787ade6d33cd1c6.tar.xz |
tests: Use xtouch to create the whole deep tree at once
Diffstat (limited to 'tests/stddirs.sh')
-rw-r--r-- | tests/stddirs.sh | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/tests/stddirs.sh b/tests/stddirs.sh index e7f7246..acc23dc 100644 --- a/tests/stddirs.sh +++ b/tests/stddirs.sh @@ -79,24 +79,15 @@ make_deep() { # $name will be 255 characters, aka _XOPEN_NAME_MAX local name="0123456789ABCDEF" - name="${name}${name}${name}${name}" - name="${name}${name}${name}${name}" + name="$name$name$name$name" + name="$name$name$name$name" name="${name:0:255}" - for i in {0..9} A B C D E F; do - "$XTOUCH" -p "$1/$i/$name" + # 4 * 4 * 256 == 4096 >= PATH_MAX + local path="$name/$name/$name/$name" + path="$path/$path/$path/$path" - ( - 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 + "$XTOUCH" -p "$1"/{{0..9},A,B,C,D,E,F}/"$path/$name" } # Creates a directory structure with many different types, and therefore colors |