From e159c070bdf539adba8863a08c6c65cc46bab4ca Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Fri, 25 Aug 2017 13:02:01 -0600 Subject: [PATCH] LU-7746 tests: skip tests for older (upstream) client 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 Change-Id: I78e1b0a6ae98879a2039817696c3a0dd15621fcc Reviewed-by: Steve Guminski Reviewed-by: James Nunez Signed-off-by: Minh Diep Reviewed-on: https://review.whamcloud.com/31111 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: John L. Hammond --- lustre/tests/sanity.sh | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index f7e62f9..cda9106 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -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 -- 1.8.3.1