From acf992f396b7bd5c1b18bc7593359726b27dac63 Mon Sep 17 00:00:00 2001 From: huanghua Date: Fri, 27 Oct 2006 16:14:47 +0000 Subject: [PATCH] more efficient unlinkmany --- lustre/tests/sanity-lmv.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lustre/tests/sanity-lmv.sh b/lustre/tests/sanity-lmv.sh index 94f3ce6..debf9e3 100644 --- a/lustre/tests/sanity-lmv.sh +++ b/lustre/tests/sanity-lmv.sh @@ -239,13 +239,13 @@ run_test 1a " remove splitted dir =============================" test_1b() { mkdir $DIR/1b0 || error createmany -o $DIR/1b0/f 4000 || error - #find $DIR/1b0 -type f | xargs rm -f - for f in $DIR/1b0/*; do rm -fr $f; done + unlinkmany $DIR/1b0/f 4000 || error NUM=`ls $DIR/1b0 | wc -l` if [ $NUM -ne 0 ] ; then echo "dir must be empty" error fi + touch $DIR/1b0/file0 || error touch $DIR/1b0/file1 || error touch $DIR/1b0/file2 || error @@ -270,8 +270,7 @@ run_test 1b " remove splitted dir =============================" test_1c() { mkdir $DIR/1b1 || error createmany -o $DIR/1b1/f 4000 || error - #find $DIR/1b1 -type f | xargs rm -f - for f in $DIR/1b1/*; do rm -fr $f; done + unlinkmany $DIR/1b1/f 4000 || error NUM=`ls $DIR/1b1 | wc -l` if [ $NUM -ne 0 ] ; then echo "dir must be empty" -- 1.8.3.1