From: Jian Yu Date: Sun, 14 Dec 2014 07:25:37 +0000 (-0800) Subject: LU-5905 tests: add version check codes to conf-sanity test 56 X-Git-Tag: 2.5.3.90~20 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=ee5e67a03e92d47f50a9b5d1371a8548d44732df;hp=b3ee5c2d4672c557d133f0f1299c8986fa5bb948;p=fs%2Flustre-release.git LU-5905 tests: add version check codes to conf-sanity test 56 This patch adds Lustre version check codes into conf-sanity test 56 to make the test interoperate with servers that do not have the following changes: Lustre-commit: 3dc232918c7c9b95398ac6a0dc4c2130adc2851d Lustre-change: http://review.whamcloud.com/12145 or Lustre-commit: e6745116cc372647f785c4063389734620c92e91 Lustre-change: http://review.whamcloud.com/12319 Test-Parameters: alwaysuploadlogs envdefinitions=ONLY=56 \ ossjob=lustre-b2_4 mdsjob=lustre-b2_4 ossbuildno=73 mdsbuildno=73 \ testlist=conf-sanity Signed-off-by: Jian Yu Change-Id: I903d9d5779cedd5b73a903b3b0d46c102ab038fd Reviewed-on: http://review.whamcloud.com/13046 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Li Wei Reviewed-by: Bob Glossman Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index fa35185..6c5748e 100644 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -3652,6 +3652,7 @@ test_55() { run_test 55 "check lov_objid size" test_56() { + local server_version=$(lustre_version_code $SINGLEMDS) local mds_journal_size_orig=$MDSJOURNALSIZE local n @@ -3672,12 +3673,19 @@ test_56() { mount_client $MOUNT || error "Unable to mount client" echo ok $LFS osts - wait_osc_import_state mds ost1 FULL - wait_osc_import_state mds ost2 FULL - $LFS setstripe --stripe-count=-1 $DIR/$tfile || error "Unable to create" - n=$($LFS getstripe --stripe-count $DIR/$tfile) - [ "$n" -eq 2 ] || error "Stripe count not two: $n" - rm $DIR/$tfile + + if [[ $server_version -ge $(version_code 2.6.54) ]] || + [[ $server_version -ge $(version_code 2.5.4) && + $server_version -lt $(version_code 2.5.11) ]]; then + wait_osc_import_state mds ost1 FULL + wait_osc_import_state mds ost2 FULL + $SETSTRIPE --stripe-count=-1 $DIR/$tfile || + error "Unable to setstripe $DIR/$tfile" + n=$($GETSTRIPE --stripe-count $DIR/$tfile) + [[ $n -eq 2 ]] || error "Stripe count not two: $n" + rm $DIR/$tfile + fi + stopall MDSJOURNALSIZE=$mds_journal_size_orig reformat