Whamcloud - gitweb
LU-7746 tests: skip tests for older (upstream) client 11/31111/2
authorAndreas Dilger <andreas.dilger@intel.com>
Fri, 25 Aug 2017 19:02:01 +0000 (13:02 -0600)
committerJohn L. Hammond <john.hammond@intel.com>
Mon, 26 Feb 2018 19:12:23 +0000 (19:12 +0000)
Skip some tests when running newer sanity.sh on an older client.
This typically only happens when testing the upstream client,
since otherwise the tests will always match the client version.

Lustre-change: https://review.whamcloud.com/28718
Lustre-commit: a8d33a29e77e102505ee3916782dc697ad121ff8

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I78e1b0a6ae98879a2039817696c3a0dd15621fcc
Reviewed-by: Steve Guminski <stephenx.guminski@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31111
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
lustre/tests/sanity.sh

index f7e62f9..cda9106 100755 (executable)
@@ -1926,12 +1926,6 @@ check_seq_oid()
                        ff_pstripe=$(cut -d: -f3 <<<$ff_parent | sed -e 's/]//')
                fi
 
-               if grep -q 'stripe_count=' <<<$ff; then
-                       local ff_scnt=$(sed -e 's/.*stripe_count=//' \
-                                           -e 's/ .*//' <<<$ff)
-                       [ $lmm_count = $ff_scnt ] ||
-                               error "FF stripe count $lmm_count != $ff_scnt"
-               fi
                # compare lmm_seq and filter_fid->ff_parent.f_seq
                [ $ff_pseq = $lmm_seq ] ||
                        error "FF parent SEQ $ff_pseq != $lmm_seq"
@@ -1942,6 +1936,14 @@ check_seq_oid()
                        error "FF stripe $ff_pstripe != $stripe_nr"
 
                stripe_nr=$((stripe_nr + 1))
+               [ $(lustre_version_code client) -lt $(version_code 2.9.55) ] &&
+                       continue
+               if grep -q 'stripe_count=' <<<$ff; then
+                       local ff_scnt=$(sed -e 's/.*stripe_count=//' \
+                                           -e 's/ .*//' <<<$ff)
+                       [ $lmm_count = $ff_scnt ] ||
+                               error "FF stripe count $lmm_count != $ff_scnt"
+               fi
        done
 }
 
@@ -2071,7 +2073,8 @@ test_27D() {
        local skip27D
        [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.8.55) ] &&
                skip27D += "-s 29"
-       [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.9.55) ] &&
+       [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.9.55) -o \
+         $(lustre_version_code client) -lt $(version_code 2.9.55) ] &&
                skip27D += "-s 30,31"
        llapi_layout_test -d$DIR/$tdir -p$POOL -o$OSTCOUNT $skip27D ||
                error "llapi_layout_test failed"
@@ -10699,7 +10702,8 @@ run_test 154f "get parent fids by reading link ea"
 
 test_154g()
 {
-       [[ $(lustre_version_code $SINGLEMDS) -ge $(version_code 2.6.92) ]] ||
+       [[ $(lustre_version_code $SINGLEMDS) -ge $(version_code 2.6.92) && \
+          $(lustre_version_code client) -gt $(version_code 2.6.99) ]] ||
                { skip "Need MDS version at least 2.6.92"; return 0; }
        [ -n "$FILESET" ] && skip "SKIP due to FILESET set" && return
 
@@ -16452,7 +16456,8 @@ test_404() { # LU-6601
 run_test 404 "validate manual {de}activated works properly for OSPs"
 
 test_405() {
-       [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.6.92) ] &&
+       [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.6.92) -o \
+       [ $(lustre_version_code client) -lt $(version_code 2.6.99) ] &&
                skip "Layout swap lock is not supported" && return
 
        check_swap_layouts_support && return 0
@@ -16625,6 +16630,9 @@ run_test 409 "Large amount of cross-MDTs hard links on the same file"
 
 test_410()
 {
+       [[ $(lustre_version_code client) -lt $(version_code 2.9.59) ]] &&
+               skip "Need client version at least 2.9.59" && return
+
        # Create a file, and stat it from the kernel
        local testfile=$DIR/$tfile
        touch $testfile