diff options
author | Jim Meyering <jim@meyering.net> | 2003-10-02 17:05:34 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2003-10-02 17:05:34 +0000 |
commit | 36337bfd1863d1d8125fa7c9f061ebf9038aaef8 (patch) | |
tree | 90c7bff5d28927217ada0128d13dc520bb63e78e /tests/rm/deep-1 | |
parent | c57d0486d022f1d1d8a20267348a60cdd73f1600 (diff) | |
download | coreutils-36337bfd1863d1d8125fa7c9f061ebf9038aaef8.tar.xz |
Ensure that du can process a hierarchy
of depth 400 while using no more than 50KB of stack space.
Diffstat (limited to 'tests/rm/deep-1')
-rwxr-xr-x | tests/rm/deep-1 | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/rm/deep-1 b/tests/rm/deep-1 index f653be9ba..2b7396b02 100755 --- a/tests/rm/deep-1 +++ b/tests/rm/deep-1 @@ -1,6 +1,7 @@ #!/bin/sh # This is a bit of a torture test for mkdir -p, too. +# Also make sure du can process this tree without using too much stack space. # GNU rm performs *much* better on systems that have a d_type member # in the directory structure because then it does only one stat per # command line argument. @@ -38,6 +39,13 @@ echo done # Make sure the deep dir was created. test -d $deep || fail=1 +# Make sure du can handle it without lots using of stack. +# Before switching to the non-recursive, fts-based version of du, +# this invocation of du would require a stack of at least 115KB +# on an x86 linux-2.4.22 system. The fts-based version needs +# only 8KB on that same system. +( ulimit -s 50; du -s $deep > /dev/null ) || fail=1 + echo "deleting $tmp..." |tr -d '\n' rm -r $tmp || fail=1 echo done |