Whamcloud - gitweb
LU-15235 tests: skip sanity/56od in interop 80/51580/2
authorAndreas Dilger <adilger@whamcloud.com>
Wed, 5 Jul 2023 20:07:52 +0000 (14:07 -0600)
committerOleg Drokin <green@whamcloud.com>
Thu, 24 Aug 2023 04:34:20 +0000 (04:34 +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.

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/fs/lustre-release/+/51580
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Deiter <alex.deiter@gmail.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity.sh

index 31cb213..706de96 100755 (executable)
@@ -6851,33 +6851,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