Whamcloud - gitweb
LU-16084 tests: fix lustre-patched filefrag check 36/55436/2
authorAndreas Dilger <adilger@whamcloud.com>
Wed, 10 Aug 2022 18:27:56 +0000 (12:27 -0600)
committerOleg Drokin <green@whamcloud.com>
Thu, 20 Jun 2024 21:34:04 +0000 (21:34 +0000)
commit797e0c7fb131f217fad03cab222979aa8a8f131e
treea1b824573905fac828a4e021af02df5814208c01
parent4697d74e00225c06b74ce6d5f850b54eb8383284
LU-16084 tests: fix lustre-patched filefrag check

Fix sanity test_130b thru test_130g to check for "filefrag -l"
instead of "filefrag -e", since the "-e" option has been in
upstream e2fsprogs since commit v1.42.6-50-g2508eaa7.  The "-l"
option (logical extent ordering) is really what is needed to
handle Lustre-striped files anyway.

While there, fix the code style in these subtests:
- use "local" and lower-case names for local variables
- use $(...) for subshells
- use (( ... )) for numeric comparisons
- use preferred "check || action" style checks
- use "skip_env" for environment configuration checks (e2fsprogs)
- use "skip" for test-related checks that can't be "fixed"
- use pre-defined $ost1_FSTYPE for checking OST filesystem type

Lustre-change: https://review.whamcloud.com/48188
Lustre-commit: fef1db004c4230e1051f9266f34a658501bf5d03

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I8eb7f17a9532796ab0274247194dd52cbc8a141c
Reviewed-by: Artem Blagodarenko <ablagodarenko@ddn.com>
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55436
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity.sh