Whamcloud - gitweb
LU-4656 tests: Add MOUNT_FLAGS variable and rename MOUNTOPT 32/9332/16
authorRyan Haasken <haasken@cray.com>
Thu, 20 Feb 2014 21:13:50 +0000 (15:13 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 1 Aug 2014 06:45:28 +0000 (06:45 +0000)
commit3da5ac8cf543bd3caf0008d08536c620ac58560f
tree2e18810ee1996738f3f819f30ab85c3f4603d14c
parentdb1b3bec6ee1d24d56969543539c1b1f91e8bc6a
LU-4656 tests: Add MOUNT_FLAGS variable and rename MOUNTOPT

This patch adds a MOUNT_FLAGS variable which can be set to any extra
flags to the mount command, such as "-n".  MOUNTOPT was renamed to
MOUNT_OPTS to reflect that is a list of options. It should now contain
just a comma-separated list of mount options which will be passed to
the mount command as "-o $MOUNT_OPTS".  MOUNT_OPTS should not include
the "-o" anymore.

MOUNT_FLAGS was added to the mount commands and output messages in
zconf_mount and zconf_mount_clients in test-framework.sh.  MOUNT_OPTS
was prepended with the "-o" before being passed to the mount command.
MOUNT_FLAGS was given an empty default value in cfg/local.sh, and some
short documentation was added above MOUNT_OPTS and MOUNT_FLAGS.  Any
place which called zconf_mount or zconf_mount_clients was updated to
pass the mount options without the "-o".

All code which added an option to MOUNT_OPTS was updated to add the
option correctly, with a comma only if necessary.  Wherever possible,
the new mount options were passed to zconf_mount* to avoid modifying
global state.  In som_mode_switch, som_preview was removed from the
options correctly, removing a comma if necessary.

Two lines in test_132 were also edited to use "lctl get_param -n"
instead of piping the output of "lctl get_param" through an awk
command.

Test-Parameters:     envdefinitions=MOUNT_OPTS=user_xattr,MOUNT_FLAGS="-o flock"
Signed-off-by: Ryan Haasken <haasken@cray.com>
Change-Id: I32d078fc6b64ee93199ad7b881791e872590f711
Reviewed-on: http://review.whamcloud.com/9332
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Robert Read <robert.read@intel.com>
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/cfg/local.sh
lustre/tests/conf-sanity.sh
lustre/tests/functions.sh
lustre/tests/parallel-scale-nfs.sh
lustre/tests/recovery-small.sh
lustre/tests/sanity-gss.sh
lustre/tests/sanity-krb5.sh
lustre/tests/sanity.sh
lustre/tests/test-framework.sh