The routine get_lustre_env() is available to all Lustre test
suites and sets environment variables for the Lustre version
installed on servers and clients.
Replace calls to lustre_version_code() and facet_fstype()
for all server types with definitions from get_lustre_env()
for the large-lun, lfsck-performance, sanity-selinux and
scrub-performance test suites.
While doing this, replace ‘$SINGLEMDS’ with ‘MDS1_VERSION’
in lustre_version_code() and facet_fstype().
Test-Parameters: trivial fstype=ldiskfs testlist=sanity-selinux,scrub-performance
Test-Parameters: fstype=zfs testlist=ldiskfs testlist=sanity-selinux,scrub-performance
Test-Parameters: fstype=ldiskfs testlist=large-lun,lfsck-performance
Test-Parameters: fstype=zfs testlist=ldiskfs testlist=large-lun,lfsck-performance
Signed-off-by: James Nunez <jnunez@whamcloud.com>
Change-Id: Ie1a04103b8d721ab20992ed0a9afb3a399270937
Reviewed-on: https://review.whamcloud.com/36380
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
trap cleanupall EXIT
test_1 () {
trap cleanupall EXIT
test_1 () {
- [ $(facet_fstype $SINGLEMDS) != ldiskfs ] &&
- skip_env "ldiskfs only test"
+ [ "$mds1_FSTYPE" != ldiskfs ] && skip_env "ldiskfs only test"
+
for num in $(seq $OSTCOUNT); do
dev=$(ostdevname $num)
log "run llverdev on the OST $dev"
for num in $(seq $OSTCOUNT); do
dev=$(ostdevname $num)
log "run llverdev on the OST $dev"
run_test 0 "lfsck namespace performance (routine case) without load"
test_1() {
run_test 0 "lfsck namespace performance (routine case) without load"
test_1() {
- [ $(facet_fstype $SINGLEMDS) != ldiskfs ] &&
+ [ "$mds1_FSTYPE" != ldiskfs ] &&
skip_env "not implemented for ZFS"
local BCOUNT=0
skip_env "not implemented for ZFS"
local BCOUNT=0
- if [ $MDS1_VERSION -lt $(version_code 2.12.50) ] ||
- [ $CLIENT_VERSION -lt $(version_code 2.12.50) ]; then
+ if [ "$MDS1_VERSION" -lt $(version_code 2.12.50) ] ||
+ [ "$CLIENT_VERSION" -lt $(version_code 2.12.50) ]; then
skip "Need version >= 2.12.50"
fi
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs"
skip "Need version >= 2.12.50"
fi
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs"
- local sepol
-
- [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.11.56) ] &&
+ [ "$MDS1_VERSION" -lt $(version_code 2.11.56) ] &&
skip "Need MDS >= 2.11.56"
skip "Need MDS >= 2.11.56"
# umount client
if [ "$MOUNT_2" ] && $(grep -q $MOUNT2' ' /proc/mounts); then
umount_client $MOUNT2 || error "umount $MOUNT2 failed"
# umount client
if [ "$MOUNT_2" ] && $(grep -q $MOUNT2' ' /proc/mounts); then
umount_client $MOUNT2 || error "umount $MOUNT2 failed"
run_test 21a "Send sepol at connect"
test_21b() {
run_test 21a "Send sepol at connect"
test_21b() {
- local sepol
-
- [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.11.56) ] &&
+ [ "$MDS1_VERSION" -lt $(version_code 2.11.56) ] &&
skip "Need MDS >= 2.11.56"
skip "Need MDS >= 2.11.56"
mkdir -p $DIR/$tdir || error "failed to create $DIR/$tdir"
echo test > $DIR/$tdir/toopen ||
error "failed to write to $DIR/$tdir/toopen"
mkdir -p $DIR/$tdir || error "failed to create $DIR/$tdir"
echo test > $DIR/$tdir/toopen ||
error "failed to write to $DIR/$tdir/toopen"
[ "$SLOW" = "no" ] &&
skip "skip scrub performance test under non-SLOW mode" && exit 0
[ "$SLOW" = "no" ] &&
skip "skip scrub performance test under non-SLOW mode" && exit 0
-[ $(facet_fstype $SINGLEMDS) != ldiskfs ] &&
- skip "ldiskfs only test" && exit 0
-[[ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.2.90) ]] &&
- skip "Need MDS version at least 2.2.90" && exit 0
+[ "$mds1_FSTYPE" != ldiskfs ] &&
+ skip "ldiskfs only test"
+[[ "$MDS1_VERSION" -lt $(version_code 2.2.90) ]] &&
+ skip "Need MDS version at least 2.2.90"
require_dsh_mds || exit 0
NTHREADS=${NTHREADS:-0}
require_dsh_mds || exit 0
NTHREADS=${NTHREADS:-0}