From: James Simmons Date: Fri, 13 May 2011 13:25:01 +0000 (-0400) Subject: LU-321 Don't assume file system name for some test X-Git-Tag: 2.1.0-RC0~17 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=98aa568197c9eeb9e0348a08a59d12f2afb5d9b0 LU-321 Don't assume file system name for some test Some of the test assume the file system name is lustre which is not always the case. Change-Id: I582aa81fce5d1a881837dfa28bb0d6d84cfb5547 Signed-off-by: James Simmons Reviewed-on: http://review.whamcloud.com/253 Tested-by: Hudson Reviewed-by: Brian J. Murrell Reviewed-by: Yu Jian Tested-by: Yu Jian Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/ost-pools.sh b/lustre/tests/ost-pools.sh index 7e6cad3..4fbb75f 100644 --- a/lustre/tests/ost-pools.sh +++ b/lustre/tests/ost-pools.sh @@ -327,21 +327,21 @@ test_2c() { do_facet $SINGLEMDS lctl pool_remove $FSNAME.$POOL OST0000 drain_pool $POOL - # 2. lustre-OST0000 + # 2. $FSNAME-OST0000 do_facet $SINGLEMDS lctl pool_add $FSNAME.$POOL $FSNAME-OST0000 RC=$?; [[ $RC -eq 0 ]] || \ error "pool_add failed. $FSNAME $POOL $FSNAME-OST0000: $RC" do_facet $SINGLEMDS lctl pool_remove $FSNAME.$POOL $FSNAME-OST0000 drain_pool $POOL - # 3. lustre-OST0000_UUID + # 3. $FSNAME-OST0000_UUID do_facet $SINGLEMDS lctl pool_add $FSNAME.$POOL $FSNAME-OST0000_UUID RC=$?; [[ $RC -eq 0 ]] || \ error "pool_add failed. $FSNAME $POOL $FSNAME-OST0000_UUID: $RC" do_facet $SINGLEMDS lctl pool_remove $FSNAME.$POOL $FSNAME-OST0000_UUID drain_pool $POOL - # 4. lustre-OST[0,1,2,3,] + # 4. $FSNAME-OST[0,1,2,3,] TGT="$FSNAME-OST[" for i in $TGT_LIST; do TGT=${TGT}$(printf "$i," $i); done TGT="${TGT}]" @@ -351,7 +351,7 @@ test_2c() { do_facet $SINGLEMDS lctl pool_remove $FSNAME.$POOL $TGT drain_pool $POOL - # 5. lustre-OST[0-5/1] + # 5. $FSNAME-OST[0-5/1] do_facet $SINGLEMDS lctl pool_add $FSNAME.$POOL $TGT_ALL RC=$?; [[ $RC -eq 0 ]] || \ error "pool_add failed. $FSNAME $POOL" "$TGT_ALL $RC" diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 38fcd12..2bd1db9 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -1885,7 +1885,7 @@ test_33c() { for ostnum in $(seq $OSTCOUNT); do # test-framework's OST numbering is one-based, while Lustre's # is zero-based - ostname=$(printf "lustre-OST%.4d" $((ostnum - 1))) + ostname=$(printf "$FSNAME-OST%.4d" $((ostnum - 1))) # Parsing llobdstat's output sucks; we could grep the /proc # path, but that's likely to not be as portable as using the # llobdstat utility. So we parse lctl output instead. @@ -1909,7 +1909,7 @@ test_33c() { # Total up write_bytes after writing. We'd better find non-zeros. for ostnum in $(seq $OSTCOUNT); do - ostname=$(printf "lustre-OST%.4d" $((ostnum - 1))) + ostname=$(printf "$FSNAME-OST%.4d" $((ostnum - 1))) write_bytes=$(do_facet ost$ostnum lctl get_param -n \ obdfilter/$ostname/stats | awk '/^write_bytes/ {print $7}' ) @@ -1924,7 +1924,7 @@ test_33c() { if $all_zeros then for ostnum in $(seq $OSTCOUNT); do - ostname=$(printf "lustre-OST%.4d" $((ostnum - 1))) + ostname=$(printf "$FSNAME-OST%.4d" $((ostnum - 1))) echo "Check that write_bytes is present in obdfilter/*/stats:" do_facet ost$ostnum lctl get_param -n \ obdfilter/$ostname/stats