From: huanghua Date: Wed, 9 Aug 2006 03:14:02 +0000 (+0000) Subject: (1) some computer may not have "which" command X-Git-Tag: v1_8_0_110~486^2~1228 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=d91429be093173d26339d25eaca7036ddd098157;p=fs%2Flustre-release.git (1) some computer may not have "which" command (2) avoid a found bug in fid reusing in test 44a. --- diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index bbe88b9..9823ef2 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -1750,7 +1750,7 @@ run_test 43 "execution of file opened for write should return -ETXTBSY" test_43a() { mkdir -p $DIR/d43 - cp -p `which multiop` $DIR/d43/multiop + cp -p `which multiop` $DIR/d43/multiop || cp -p multiop $DIR/d43/multiop $DIR/d43/multiop $TMP/test43.junk O_c & MULTIPID=$! sleep 1 @@ -1763,7 +1763,7 @@ run_test 43a "open(RDWR) of file being executed should return -ETXTBSY" test_43b() { mkdir -p $DIR/d43 - cp -p `which multiop` $DIR/d43/multiop + cp -p `which multiop` $DIR/d43/multiop || cp -p multiop $DIR/d43/multiop $DIR/d43/multiop $TMP/test43.junk O_c & MULTIPID=$! sleep 1 @@ -1802,21 +1802,23 @@ test_44a() { OFFSETS="0 $((stride/2)) $((stride-1))" for offset in $OFFSETS ; do for i in `seq 0 $((nstripe-1))`; do - rm -f $DIR/d44a local GLOBALOFFSETS="" local size=$((((i + 2 * $nstripe )*$stride + $offset))) # Bytes - ll_sparseness_write $DIR/d44a $size || error "ll_sparseness_write" + local myfn=$DIR/d44a-$size + echo "--------writing $myfn at $size" + ll_sparseness_write $myfn $size || error "ll_sparseness_write" GLOBALOFFSETS="$GLOBALOFFSETS $size" - ll_sparseness_verify $DIR/d44a $GLOBALOFFSETS \ + ll_sparseness_verify $myfn $GLOBALOFFSETS \ || error "ll_sparseness_verify $GLOBALOFFSETS" for j in `seq 0 $((nstripe-1))`; do size=$((((j + $nstripe )*$stride + $offset))) # Bytes - ll_sparseness_write $DIR/d44a $size || error "ll_sparseness_write" + ll_sparseness_write $myfn $size || error "ll_sparseness_write" GLOBALOFFSETS="$GLOBALOFFSETS $size" done - ll_sparseness_verify $DIR/d44a $GLOBALOFFSETS \ + ll_sparseness_verify $myfn $GLOBALOFFSETS \ || error "ll_sparseness_verify $GLOBALOFFSETS" + rm -f $myfn done done }