Whamcloud - gitweb
LU-790 tests: clean up lustre version checking 73/4173/14
authorAndreas Dilger <andreas.dilger@intel.com>
Wed, 3 Oct 2012 21:41:07 +0000 (15:41 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 28 Apr 2015 05:26:26 +0000 (05:26 +0000)
commit2a223541d299bc8287472a671152ee3ded3b7b86
tree20107edc40389e43c9f0779fe1145ab1ec198a51
parent8ca3a752fc428d35f6ce4cf035dafdfc3d25d4e7
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>
lustre/tests/sanity.sh
lustre/tests/sanityn.sh
lustre/tests/test-framework.sh
lustre/tests/yaml.sh