LU-790 tests: clean up lustre version checking
Since commit
48bad5d9db9baa7bca093de5c54294adf1cf8303, the check in
sanity-scrub.sh to verify if the MDS had a new enough Lustre version
was being run before modules are loaded, if sanity-scrub.sh was run
stand-alone. In addition to using "lctl get_param version" to get
the version, use "lctl lustre_build_version" or "lctl --version",
which will always work, even if the modules are not loaded on the
node. This also avoids the need to load the modules just to find
that the test should not be run.
While cleaning up this code, move the lustre_version_code() earlier in
test-framework.sh, so that it is declared before calling functions,
and is co-located with the other version checking code. Not strictly
necessary for bash scripts, but nicer when reading the code.
Fix test regressions in sanity.sh test_48[ab] since commit
13b269ab77
that incorrectly used a full path for test_mkdir() opertations instead
of using a relative filename as the test originally intended.
Also remove the obsolete check_kernel_version() code, which was only
used when we had a patched client kernel, which is no longer the case,
and remove a few overly verbose logging lines from tests.
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I8a8aec11370d395dcb4f4b250001ecdb40500c1e
Reviewed-on: http://review.whamcloud.com/4173
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>