From: Mikhail Pershin Date: Mon, 10 Nov 2014 17:12:39 +0000 (+0300) Subject: LU-5843 tests: fix recovery-small test_61 X-Git-Tag: 2.7.51~75 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=b2b005a51c88f01ab22525eb0f0845cde389b36a;hp=d0636eede1ab340421177c6a97ec27689099f953 LU-5843 tests: fix recovery-small test_61 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 Change-Id: If921cf41253450ab035a75be6fb34145aee1a197 Reviewed-on: http://review.whamcloud.com/12653 Tested-by: Jenkins Reviewed-by: Li Wei Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/recovery-small.sh b/lustre/tests/recovery-small.sh index f7cd763..ca9318c 100755 --- a/lustre/tests/recovery-small.sh +++ b/lustre/tests/recovery-small.sh @@ -1337,12 +1337,14 @@ test_61() 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 - + 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