Whamcloud - gitweb
LU-5965 tests: fix parsing for older Lustre versions 93/28793/2
authorAndreas Dilger <andreas.dilger@intel.com>
Wed, 30 Aug 2017 06:57:03 +0000 (00:57 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Sun, 10 Sep 2017 04:54:59 +0000 (04:54 +0000)
commit1b109418d6eeccb9d134e1d555656fb8dad11dd8
tree053ba0d699a9974050347d04089730083f3a1be7
parent9da376b7b3526c1c5bf4c5b26fc6ed692e13f9b7
LU-5965 tests: fix parsing for older Lustre versions

Fix parsing of Lustre version generated by "lctl get_param version"
before release 2.7.  The old code generated a valid version number
even for older releases, except in the case where the "build:" line
did not start with a numeric value, since that line was incorrectly
being parsed instead of the "lustre:" line due to "$ver" not being
double-quoted properly, so "$ver" was being treated as a single
line and "head -n 1" was doing nothing.  This was offset by sed
dropping everything before the _last_ ":" instead of before the
_first_ ":", and then using the "build: " line.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Ifd7dc95aaf0d6edf3558e18b85a78bea861248d0
Reviewed-on: https://review.whamcloud.com/28793
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/test-framework.sh