Whamcloud - gitweb
LU-5843 tests: fix recovery-small test_61 53/12653/6
authorMikhail Pershin <mike.pershin@intel.com>
Mon, 10 Nov 2014 17:12:39 +0000 (20:12 +0300)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 3 Mar 2015 16:48:52 +0000 (16:48 +0000)
Test used obdfilter last_id as number while it is OID,
e.g. 0x100000000:16. Patch fixes test to exract object ID
from OID.

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: If921cf41253450ab035a75be6fb34145aee1a197
Reviewed-on: http://review.whamcloud.com/12653
Tested-by: Jenkins
Reviewed-by: Li Wei <wei.g.li@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/recovery-small.sh

index f7cd763..ca9318c 100755 (executable)
@@ -1337,12 +1337,14 @@ test_61()
 
        replay_barrier $SINGLEMDS
        createmany -o $DIR/$tdir/$tfile-%d 10 
 
        replay_barrier $SINGLEMDS
        createmany -o $DIR/$tdir/$tfile-%d 10 
-       local oid=`do_facet ost1 "lctl get_param -n obdfilter.${ost1_svc}.last_id"`
+       local oid=$(do_facet ost1 "lctl get_param -n \
+               obdfilter.${ost1_svc}.last_id" | sed -e 's/.*://')
 
        fail_abort $SINGLEMDS
 
        fail_abort $SINGLEMDS
-       
+
        touch $DIR/$tdir/$tfile
        touch $DIR/$tdir/$tfile
-       local id=`$LFS getstripe $DIR/$tdir/$tfile | awk '$1 == 0 { print $2 }'`
+       local id=$($LFS getstripe $DIR/$tdir/$tfile |
+               awk '$1 == 0 { print $2 }')
        [ $id -le $oid ] && error "the orphan objid was reused, failed"
 
        # Cleanup
        [ $id -le $oid ] && error "the orphan objid was reused, failed"
 
        # Cleanup