Whamcloud - gitweb
LU-5969 tests: allow "version" without "lustre:" prefix 47/26047/2
authorAndreas Dilger <andreas.dilger@intel.com>
Thu, 16 Mar 2017 21:09:04 +0000 (15:09 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Sun, 26 Mar 2017 06:49:13 +0000 (06:49 +0000)
commitd73cf7722417c78ad07d88189421cfc8ef3fb8a7
tree5283b80ad0130863de4bfb76f5ab58c30494bdce
parent56203820a260e9ddb6e084df842e6697c7a4eca7
LU-5969 tests: allow "version" without "lustre:" prefix

Fix lustre_build_version() to handle if "lctl get_param version"
returns a bare version number like "2.9.54" as done with the
upstream kernel client and once https://review.whamcloud.com/25632
lands, instead of the old prefixed "lustre: 2.8.53" version string.

This was already fixed in "lctl lustre_build_version" in patch
https://review.whamcloud.com/25324 but due to the order of checks
in lustre_build_version() the fallback of using "lctl --version"
took precedence, which returns only the build version of the lctl
tool itself and not the Lustre module version.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I1b0d87d186d234b62aa59bcadde42452323ebbe5
Reviewed-on: https://review.whamcloud.com/26047
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/test-framework.sh