From ec2064acc84d9cc6e0bfae04c591974efc449d8a Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 7 Sep 2007 15:25:23 +0200 Subject: Convert tests/du/*, too. --- tests/du/fd-leak | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'tests/du/fd-leak') 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 -- cgit v1.2.3-70-g09d2