From b2b005a51c88f01ab22525eb0f0845cde389b36a Mon Sep 17 00:00:00 2001 From: Mikhail Pershin Date: Mon, 10 Nov 2014 20:12:39 +0300 Subject: [PATCH] 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 --- lustre/tests/recovery-small.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 -- 1.8.3.1