2 # Create and remove a directory with more than 254 files.
4 # Copyright (C) 1997-2023 Free Software Foundation, Inc.
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <https://www.gnu.org/licenses/>.
20 # An early version of my rewritten rm failed to remove all of
21 # the files on SunOS4 when there were 254 or more in a directory.
23 # And the rm from coreutils-5.0 exposes the same problem when there
24 # are 338 or more files in a directory on a Darwin-6.5 system
26 .
"${srcdir=.}/tests/init.sh"; path_prepend_ .
/src
29 mkdir t || framework_failure_
30 cd t || framework_failure_
32 # Create 500 files (20 * 25).
33 for i
in 0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j
; do
35 for j
in a b c d e f g h i j k l m n o p q r s t u v w x y
; do
38 touch $files || framework_failure_
41 test -f 0a || framework_failure_
42 test -f by || framework_failure_
43 cd .. || framework_failure_