From 45b64c44a738ab874c53349728649a46d84f8211 Mon Sep 17 00:00:00 2001 From: Eric Mei Date: Wed, 16 Jun 2010 20:14:13 -0600 Subject: [PATCH] b=21835 fix mdsrate script. r=robert.read --- lustre/tests/mdsrate-create-large.sh | 4 ++-- lustre/tests/mdsrate-create-small.sh | 4 ++-- lustre/tests/mdsrate-lookup-10dirs.sh | 2 +- lustre/tests/mdsrate-lookup-1dir.sh | 2 +- lustre/tests/mdsrate-stat-large.sh | 2 +- lustre/tests/mdsrate-stat-small.sh | 2 +- lustre/tests/test-framework.sh | 4 ++++ 7 files changed, 12 insertions(+), 8 deletions(-) diff --git a/lustre/tests/mdsrate-create-large.sh b/lustre/tests/mdsrate-create-large.sh index 5201349..614889c 100644 --- a/lustre/tests/mdsrate-create-large.sh +++ b/lustre/tests/mdsrate-create-large.sh @@ -32,7 +32,7 @@ log "===== $0 ====== " check_and_setup_lustre -IFree=$(inodes_available) +IFree=$(mdsrate_inodes_available) if [ $IFree -lt $NUM_FILES ]; then NUM_FILES=$IFree fi @@ -81,7 +81,7 @@ else fi fi -IFree=$(inodes_available) +IFree=$(mdsrate_inodes_available) if [ $IFree -lt $NUM_FILES ]; then NUM_FILES=$IFree fi diff --git a/lustre/tests/mdsrate-create-small.sh b/lustre/tests/mdsrate-create-small.sh index b5db20f..58f66da 100644 --- a/lustre/tests/mdsrate-create-small.sh +++ b/lustre/tests/mdsrate-create-small.sh @@ -40,7 +40,7 @@ log "===== $0 ====== " check_and_setup_lustre -IFree=$(inodes_available) +IFree=$(mdsrate_inodes_available) if [ $IFree -lt $NUM_FILES ]; then NUM_FILES=$IFree fi @@ -94,7 +94,7 @@ else fi fi -IFree=$(inodes_available) +IFree=$(mdsrate_inodes_available) if [ $IFree -lt $NUM_FILES ]; then NUM_FILES=$IFree fi diff --git a/lustre/tests/mdsrate-lookup-10dirs.sh b/lustre/tests/mdsrate-lookup-10dirs.sh index f132055..4655834 100644 --- a/lustre/tests/mdsrate-lookup-10dirs.sh +++ b/lustre/tests/mdsrate-lookup-10dirs.sh @@ -40,7 +40,7 @@ check_and_setup_lustre mkdir -p $TESTDIR chmod 0777 $TESTDIR -IFree=$(inodes_available) +IFree=$(($(mdsrate_inodes_available) - NUM_DIRS)) if [ $IFree -lt $((NUM_FILES * NUM_DIRS)) ]; then NUM_FILES=$((IFree / NUM_DIRS)) fi diff --git a/lustre/tests/mdsrate-lookup-1dir.sh b/lustre/tests/mdsrate-lookup-1dir.sh index 752deb7..b86a8b7 100644 --- a/lustre/tests/mdsrate-lookup-1dir.sh +++ b/lustre/tests/mdsrate-lookup-1dir.sh @@ -38,7 +38,7 @@ check_and_setup_lustre mkdir -p $TESTDIR chmod 0777 $TESTDIR -IFree=$(inodes_available) +IFree=$(mdsrate_inodes_available) if [ $IFree -lt $NUM_FILES ]; then NUM_FILES=$IFree fi diff --git a/lustre/tests/mdsrate-stat-large.sh b/lustre/tests/mdsrate-stat-large.sh index 730eb01..a136dea 100644 --- a/lustre/tests/mdsrate-stat-large.sh +++ b/lustre/tests/mdsrate-stat-large.sh @@ -43,7 +43,7 @@ check_and_setup_lustre mkdir -p $TESTDIR chmod 0777 $TESTDIR -IFree=$(inodes_available) +IFree=$(mdsrate_inodes_available) if [ $IFree -lt $NUM_FILES ]; then NUM_FILES=$IFree fi diff --git a/lustre/tests/mdsrate-stat-small.sh b/lustre/tests/mdsrate-stat-small.sh index 21e3a03..a153254 100644 --- a/lustre/tests/mdsrate-stat-small.sh +++ b/lustre/tests/mdsrate-stat-small.sh @@ -43,7 +43,7 @@ check_and_setup_lustre mkdir -p $TESTDIR chmod 0777 $TESTDIR -IFree=$(inodes_available) +IFree=$(mdsrate_inodes_available) if [ $IFree -lt $NUM_FILES ]; then NUM_FILES=$IFree fi diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 0654c53..04b7996 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -2855,6 +2855,10 @@ inodes_available () { echo $IFree } +mdsrate_inodes_available () { + echo $(($(inodes_available) - 1)) +} + # reset llite stat counters clear_llite_stats(){ lctl set_param -n llite.*.stats 0 -- 1.8.3.1