Whamcloud - gitweb
LU-8947 test: fix getting OST name at sanity test_253 87/24387/4
authorAlexander Boyko <alexander.boyko@seagate.com>
Fri, 16 Dec 2016 06:59:22 +0000 (09:59 +0300)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 18 Feb 2017 23:51:04 +0000 (23:51 +0000)
The test gets OST name the wrong way. And if system
has more than ten OSTs, the test fail. This patch
resolves the issue.

Signed-off-by: Alexander Boyko <alexander.boyko@seagate.com>
Seagate-bug-id: MRP-3330
Test-Parameters: trivial
Change-Id: Ic6080f725c6e693f6cca49d9aebf06c6add4610b
Reviewed-on: https://review.whamcloud.com/24387
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
lustre/tests/sanity.sh

index 0bcbeba..c24e419 100755 (executable)
@@ -14072,8 +14072,8 @@ test_253() {
        remote_mds_nodsh && skip "remote MDS with nodsh" && return
        remote_mgs_nodsh && skip "remote MGS with nodsh" && return
 
-       local ost_name=$($LFS osts | grep ${ostidx}": " | \
-               awk '{print $2}' | sed -e 's/_UUID$//')
+       local ost_name=$($LFS osts |
+               sed -n 's/^'$ostidx': \(.*\)_UUID .*/\1/p')
        # on the mdt's osc
        local mdtosc_proc1=$(get_mdtosc_proc_path $SINGLEMDS $ost_name)
        do_facet $SINGLEMDS $LCTL get_param -n \