From: Li Wei Date: Thu, 21 Mar 2013 07:55:16 +0000 (+0800) Subject: LU-3002 tests: Fix an OST index issue in replay-single X-Git-Tag: 2.3.64~77 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=9dabff0dc806cfb6a8de6e8bc27271425ba7261d;p=fs%2Flustre-release.git LU-3002 tests: Fix an OST index issue in replay-single When run with 16 OSTs, replay-single 90 happened to pick ost14 as ostfail and complained: lfs find does not report the affected lustre-OST000d_UUID for fd The "d" in "fd" is a hexadecimal OST index, taken from "lustre-OST000d_UUID". Because the actual file names use decimal OST indices, the test failed to match the file "f13" with "fd". Moreover, the test assumes the OST index is a single-digit number, which may not be case with more than 15 OSTs. This patch changes the test to simply calculate the index from the facet name. Test-Parameters: ostcount=32 testlist=replay-single envdefinitions=ONLY=90 Change-Id: I0c95d28f83c41cabf4ed8e5ed618897d6000da3b Signed-off-by: Li Wei Reviewed-on: http://review.whamcloud.com/5796 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Jian Yu Reviewed-by: wangdi Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/replay-single.sh b/lustre/tests/replay-single.sh index 1f9a43f..7e02176 100755 --- a/lustre/tests/replay-single.sh +++ b/lustre/tests/replay-single.sh @@ -2747,7 +2747,7 @@ test_90() { # bug 19494 # Before failing an OST, get its obd name and index local varsvc=${ostfail}_svc local obd=$(do_facet $ostfail lctl get_param -n obdfilter.${!varsvc}.uuid) - local index=${obd:(-6):1} + local index=$(($(facet_number $ostfail) - 1)) echo "Fail $ostfail $obd, display the list of affected files" shutdown_facet $ostfail || return 2