Whamcloud - gitweb
LU-18407 tests: check Lustre-patched filefrag 99/56899/2
authorJian Yu <yujian@whamcloud.com>
Wed, 6 Nov 2024 00:17:31 +0000 (16:17 -0800)
committerOleg Drokin <green@whamcloud.com>
Mon, 18 Nov 2024 17:42:46 +0000 (17:42 +0000)
In Lustre test suites, there are some subtests using filefrag
from Lustre-patched e2fsprogs. This patch adds checks in those
subtests to skip them if the Lustre-patched e2fsprogs is not
installed on Lustre client.

Test-Parameters: trivial
Test-Parameters: env=ONLY="228" clientdistro=ubuntu2204 testlist=sanity-hsm
Test-Parameters: env=ONLY="24a" clientdistro=ubuntu2204 testlist=sanity-pfl
Test-Parameters: env=ONLY="56" clientdistro=ubuntu2204 testlist=sanity-sec
Test-Parameters: env=ONLY="77n 130" clientdistro=ubuntu2204 testlist=sanity

Change-Id: I86e2edd18052ff7fb19e7cbcbb660aa383824372
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56899
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity-hsm.sh
lustre/tests/sanity-pfl.sh
lustre/tests/sanity-sec.sh
lustre/tests/sanity.sh

index 3d7122f..78209e8 100755 (executable)
@@ -4343,6 +4343,9 @@ test_227() {
 run_test 227 "changelog when explicit setting of HSM flags"
 
 test_228() {
+       local filefrag_op=$(filefrag -l 2>&1 | grep "invalid option")
+       [[ -z "$filefrag_op" ]] || skip_env "filefrag missing logical ordering"
+
        # test needs a running copytool
        copytool setup
        mkdir_on_mdt0 $DIR/$tdir
index f7c874b..138bf91 100644 (file)
@@ -2453,6 +2453,8 @@ cleanup_24() {
 }
 
 test_24a() {
+       local filefrag_op=$(filefrag -l 2>&1 | grep "invalid option")
+       [[ -z "$filefrag_op" ]] || skip_env "filefrag missing logical ordering"
        [ "$OSTCOUNT" -lt "3" ] && skip_env "needs >= 3 OSTs"
 
        trap cleanup_24 EXIT RETURN
index dfef66f..0c9ba01 100755 (executable)
@@ -4683,6 +4683,9 @@ test_55() {
 run_test 55 "access with seteuid"
 
 test_56() {
+       local filefrag_op=$(filefrag -l 2>&1 | grep "invalid option")
+       [[ -z "$filefrag_op" ]] || skip_env "filefrag missing logical ordering"
+
        local testfile=$DIR/$tdir/$tfile
 
        [[ $(facet_fstype ost1) == zfs ]] && skip "skip ZFS backend"
index 8db128e..3150d9a 100755 (executable)
@@ -10130,6 +10130,8 @@ check_filefrag_77n() {
 }
 
 test_77n() {
+       local filefrag_op=$(filefrag -l 2>&1 | grep "invalid option")
+       [[ -z "$filefrag_op" ]] || skip_env "filefrag missing logical ordering"
        [[ "$CKSUM_TYPES" =~ t10 ]] || skip "no T10 checksum support on osc"
 
        touch $DIR/$tfile
@@ -13805,8 +13807,8 @@ cleanup_130() {
 }
 
 test_130a() {
-       local filefrag_op=$(filefrag -e 2>&1 | grep "invalid option")
-       [[ -z "$filefrag_op" ]] || skip_env "filefrag does not support FIEMAP"
+       local filefrag_op=$(filefrag -l 2>&1 | grep "invalid option")
+       [[ -z "$filefrag_op" ]] || skip_env "filefrag missing logical ordering"
 
        trap cleanup_130 EXIT RETURN