summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-05-18 14:24:58 +0000
committerJim Meyering <jim@meyering.net>2000-05-18 14:24:58 +0000
commitf01f28a92add2b07d52dde1e1e8a00ff9a9b5cf1 (patch)
tree17ff93ac6d2ee649b30f2e7a8223ad853605ad44 /tests
parentba798c599850a1448ae0aaf764c355e05914df60 (diff)
downloadcoreutils-f01f28a92add2b07d52dde1e1e8a00ff9a9b5cf1.tar.xz
*** empty log message ***
Diffstat (limited to 'tests')
-rwxr-xr-xtests/rm/hash37
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/rm/hash b/tests/rm/hash
new file mode 100755
index 000000000..e274c1f42
--- /dev/null
+++ b/tests/rm/hash
@@ -0,0 +1,37 @@
+#!/bin/sh
+# Exercise a bug that was fixed in 4.0s.
+# Before then, rm would fail occasionally, sometimes via
+# a failed assertion, others with a seg fault.
+
+if test "$VERBOSE" = yes; then
+ set -x
+ rm --version
+fi
+
+pwd=`pwd`
+tmp=hash-$$
+trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0
+trap 'exit $?' 1 2 13 15
+
+framework_failure=0
+mkdir $tmp || framework_failure=1
+cd $tmp
+
+# Create a hierarchy with 3*26 leaf directories, each at depth 153.
+y=`yes |tr '\012' / |head -c 300`
+for i in 1 2 3; do
+ 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 z; do
+ mkdir -p t/$i/$j/$y || framework_failure=1
+ done
+done
+
+if test $framework_failure = 1; then
+ echo 'failure in testing framework'
+ exit 1
+fi
+
+fail=0
+
+rm -r t || fail=1
+
+exit $fail