summaryrefslogtreecommitdiff
path: root/tests/du/fd-leak
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2007-09-07 15:25:23 +0200
committerJim Meyering <jim@meyering.net>2007-09-15 08:40:38 +0200
commitec2064acc84d9cc6e0bfae04c591974efc449d8a (patch)
treefc20b7c780175d6f428c392ce333199c9b24e79f /tests/du/fd-leak
parent18b3231bbfdb1fe36c08511bda930588cc836c71 (diff)
downloadcoreutils-ec2064acc84d9cc6e0bfae04c591974efc449d8a.tar.xz
Convert tests/du/*, too.
Diffstat (limited to 'tests/du/fd-leak')
-rwxr-xr-xtests/du/fd-leak18
1 files changed, 3 insertions, 15 deletions
diff --git a/tests/du/fd-leak b/tests/du/fd-leak
index 6b25b8608..bc2ea81bf 100755
--- a/tests/du/fd-leak
+++ b/tests/du/fd-leak
@@ -1,7 +1,7 @@
#!/bin/sh
# check for file descriptor leak
-# Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2007 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,15 +24,8 @@ fi
# Call this an expensive test. It's not that expensive, but command line
# limitations might induce failure on some losing systems.
. $srcdir/../expensive
+. $srcdir/../test-lib.sh
-pwd=`pwd`
-t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
-trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0
-trap '(exit $?); exit $?' 1 2 13 15
-
-framework_failure=0
-mkdir -p $tmp || framework_failure=1
-cd $tmp || framework_failure=1
# Create 1296 (36^2) files.
# Their names and separating spaces take up 3887 bytes.
x='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 0 1 2 3 4 5 6 7 8 9'
@@ -44,12 +37,7 @@ for i in $x; do
done
# This may fail due to command line limitations.
-touch $f || framework_failure=1
-
-if test $framework_failure = 1; then
- echo "$0: failure in testing framework" 1>&2
- (exit 1); exit 1
-fi
+touch $f || framework_failure
fail=0