Whamcloud - gitweb
LU-16084 tests: fix lustre-patched filefrag check 88/48188/3
authorAndreas Dilger <adilger@whamcloud.com>
Wed, 10 Aug 2022 18:27:56 +0000 (12:27 -0600)
committerOleg Drokin <green@whamcloud.com>
Thu, 1 Sep 2022 05:55:06 +0000 (05:55 +0000)
commitfef1db004c4230e1051f9266f34a658501bf5d03
tree8b3b539df5824dd418080993621e0dbe12802ee9
parent162336079df221454a273e1c306bcb0531407a1b
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

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