Whamcloud - gitweb
LU-5905 tests: add version check codes to conf-sanity test 56 45/13045/2
authorJian Yu <jian.yu@intel.com>
Fri, 12 Dec 2014 07:34:15 +0000 (23:34 -0800)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 26 Dec 2014 18:10:37 +0000 (18:10 +0000)
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_6 mdsjob=lustre-b2_6 ossbuildno=2 mdsbuildno=2 \
testlist=conf-sanity

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I8c1b41f6912c006d4bb9edd756af3fa345dd55f3
Reviewed-on: http://review.whamcloud.com/13045
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/conf-sanity.sh

index 006798d..37cd791 100644 (file)
@@ -3672,6 +3672,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
 
@@ -3692,13 +3693,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
-       $SETSTRIPE --stripe-count=-1 $DIR/$tfile ||
-               error "Unable to setstripe $DIR/$tfile"
-       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=$($LFS 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