Whamcloud - gitweb
LU-15235 tests: skip sanity/56od in interop
authorAndreas Dilger <adilger@whamcloud.com>
Wed, 5 Jul 2023 20:13:42 +0000 (14:13 -0600)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 6 Jul 2023 04:15:00 +0000 (04:15 +0000)
Sanity test_56oc and test_56od were using the btime_supported()
function to check it "lfs find" supported file birth time, but
this did not properly check whether the MDS supported this option.

Remove the btime_supported() check and just use the version, since
this has been around a few releases already.

Lustre-change: https://review.whamcloud.com/51580
Lustre-commit: TBD (from 8add332bda0c58d9908478b9263e8aea46edc135)

Fixes: 186b97e68abb ("LU-11971 utils: Send file creation time to clients")
Test-Parameters: trivial testlist=sanity serverversion=2.12.9 env=ONLY=56
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I0c85103c843d3b993e3e112bf5d0da976d3ebbe5
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/51581
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/tests/sanity.sh

index 98bed04..a26e4f7 100755 (executable)
@@ -6285,33 +6285,21 @@ test_56oc() {
        test_newerXY_base "m" "t"
        test_newerXY_base "c" "t"
 
-       [[ $MDS1_VERSION -lt $(version_code 2.13.54) ||
-          $CLIENT_VERSION -lt $(version_code 2.13.54) ]] &&
-               ! btime_supported && echo "btime unsupported" && return 0
+       (( $MDS1_VERSION >= $(version_code v2_13_53-145-g186b97e68a) &&
+          $CLIENT_VERSION >= $(version_code v2_13_53-145-g186b97e68a) )) ||
+               { echo "btime needs v2_13_53-145-g186b97e68a"; return 0; }
 
        test_newerXY_base "b" "b"
        test_newerXY_base "b" "t"
 }
 run_test 56oc "check lfs find -newerXY work"
 
-btime_supported() {
-       local dir=$DIR/$tdir
-       local rc
-
-       mkdir -p $dir
-       touch $dir/$tfile
-       $LFS find $dir -btime -1d -type f
-       rc=$?
-       rm -rf $dir
-       return $rc
-}
-
 test_56od() {
-       [ $MDS1_VERSION -lt $(version_code 2.13.53) ] &&
-               ! btime_supported && skip "btime unsupported on MDS"
+       (( $MDS1_VERSION >= $(version_code v2_13_53-145-g186b97e68a) )) ||
+               skip "btime unsupported on MDS < v2_13_53-145-g186b97e68a"
 
-       [ $CLIENT_VERSION -lt $(version_code 2.13.53) ] &&
-               ! btime_supported && skip "btime unsupported on clients"
+       (( $CLIENT_VERSION >= $(version_code v2_13_53-145-g186b97e68a) )) ||
+               skip "btime unsupported on clients < v2_13_53-145-g186b97e68a"
 
        local dir=$DIR/$tdir
        local ref=$DIR/$tfile.ref