From becbc7263598e10212f1dcb8eb2cc9446c3c01bb Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Fri, 26 Aug 2011 02:26:51 -0600 Subject: [PATCH] LU-614 tests: speed up needlessly long tests Fix unlinkmany to use the original $next_id instead of the one seen after createmany was run. Signed-off-by: Andreas Dilger Change-Id: I816081ab1ee04fe66d6c14b76eb076262215bc32 Reviewed-on: http://review.whamcloud.com/1298 Reviewed-by: Yu Jian Tested-by: Yu Jian Tested-by: Hudson Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/tests/sanity.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 18b91e4..e0acee1 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -8260,21 +8260,22 @@ test_220() { #LU-325 echo "OST still has $count objects" free=$((count + last_id - next_id)) - echo "create $free files..." + echo "create $((free - next_id)) files @next_id..." createmany -o $DIR/$tdir/f $next_id $free || return 3 - local last_id=$(do_facet mds${MDSIDX} lctl get_param -n \ + local last_id2=$(do_facet mds${MDSIDX} lctl get_param -n \ osc.$mdtosc_proc1.prealloc_last_id) - local next_id=$(do_facet mds${MDSIDX} lctl get_param -n \ + local next_id2=$(do_facet mds${MDSIDX} lctl get_param -n \ osc.$mdtosc_proc1.prealloc_next_id) - echo "after creation, last_id=$last_id, next_id=$next_id" + echo "after creation, last_id=$last_id2, next_id=$next_id2" $LFS df -i echo "cleanup..." do_facet mgs $LCTL pool_remove $FSNAME.$TESTNAME $OST || return 4 do_facet mgs $LCTL pool_destroy $FSNAME.$TESTNAME || return 5 + echo "unlink $((free - next_id)) files @ $next_id..." unlinkmany $DIR/$tdir/f $next_id $free || return 3 } run_test 220 "the preallocated objects in MDS still can be used if ENOSPC is returned by OST with enough disk space" -- 1.8.3.1