From da65a46854d8758f3d3dcf1eac5bfcdae025c198 Mon Sep 17 00:00:00 2001
From: grev <grev>
Date: Fri, 31 Oct 2008 17:21:35 +0000
Subject: [PATCH] b=17540 i=Nikita test_53 fix

---
 lustre/tests/sanity.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh
index a90ba467b5..a03d22cd9f 100644
--- a/lustre/tests/sanity.sh
+++ b/lustre/tests/sanity.sh
@@ -2350,8 +2350,9 @@ test_53() {
 	# only test MDT0000
         for value in $(do_facet $SINGLEMDS lctl get_param osc.*-osc-MDT0000.prealloc_last_id) ; do
                 param=`echo ${value[0]} | cut -d "=" -f1`
-                mds_last=$(do_facet $SINGLEMDS lctl get_param -n $param)
                 ostname=`echo $param | cut -d "." -f2 | cut -d - -f 1-2`
+                mds_last=$(do_facet $SINGLEMDS lctl get_param -n $param)
+                ostnum=$(echo $ostname | sed "s/${FSNAME}-OST//g" | awk '{print ($1+1)}' )
                 ost_last=$(do_facet ost$ostnum lctl get_param -n obdfilter.$ostname.last_id | head -n 1)
                 echo "$ostname.last_id=$ost_last ; MDS.last_id=$mds_last"
                 if [ $ost_last != $mds_last ]; then
-- 
GitLab