From 5a1ea896c02285041e1c3f296e877935f8230a90 Mon Sep 17 00:00:00 2001 From: Jian Yu Date: Tue, 5 Nov 2024 16:17:31 -0800 Subject: [PATCH] LU-18407 tests: check Lustre-patched filefrag 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 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56899 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Yang Sheng Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- lustre/tests/sanity-hsm.sh | 3 +++ lustre/tests/sanity-pfl.sh | 2 ++ lustre/tests/sanity-sec.sh | 3 +++ lustre/tests/sanity.sh | 6 ++++-- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lustre/tests/sanity-hsm.sh b/lustre/tests/sanity-hsm.sh index 3d7122f..78209e8 100755 --- a/lustre/tests/sanity-hsm.sh +++ b/lustre/tests/sanity-hsm.sh @@ -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 diff --git a/lustre/tests/sanity-pfl.sh b/lustre/tests/sanity-pfl.sh index f7c874b..138bf91 100644 --- a/lustre/tests/sanity-pfl.sh +++ b/lustre/tests/sanity-pfl.sh @@ -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 diff --git a/lustre/tests/sanity-sec.sh b/lustre/tests/sanity-sec.sh index dfef66f..0c9ba01 100755 --- a/lustre/tests/sanity-sec.sh +++ b/lustre/tests/sanity-sec.sh @@ -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" diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 8db128e..3150d9a 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -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 -- 1.8.3.1