From a186ede286518472a127caa46b048bcbbd203284 Mon Sep 17 00:00:00 2001 From: Sundar Keshava Date: Wed, 21 Oct 2015 15:32:05 +0530 Subject: [PATCH] LU-7204 test: handle FSNAME with dashes in replay-single 85b If FSNAME contains a dash, test_85b incorrectly parses lctl dl output. Fix that. Also changed the checking of before recovery count value by using numeric comparison instead of string comparison. Used tabs in place of spaces. Test-Parameters: trivial testlist=replay-single envdefinitions=ONLY=85b Seagate-bug-id: MRP-2792 Signed-off-by: HemaHarish Change-Id: I392921b837dee573a704a3fec4b35c7bb79136bc Reviewed-on: http://review.whamcloud.com/16902 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Jian Yu Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- lustre/tests/replay-single.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lustre/tests/replay-single.sh b/lustre/tests/replay-single.sh index 31586b2..7e316ff 100755 --- a/lustre/tests/replay-single.sh +++ b/lustre/tests/replay-single.sh @@ -2992,11 +2992,11 @@ test_85b() { #bug 16774 done lov_id=$(lctl dl | grep "clilov") - addr=$(echo $lov_id | awk '{print $4}' | awk -F '-' '{print $3}') - count=$(lctl get_param \ - -n ldlm.namespaces.*OST0000*$addr.lock_unused_count) + addr=$(echo $lov_id | awk '{print $4}' | awk -F '-' '{print $NF}') + count=$(lctl get_param -n \ + ldlm.namespaces.*OST0000*$addr.lock_unused_count) echo "before recovery: unused locks count = $count" - [ $count != 0 ] || error "unused locks ($count) should be zero" + [ $count -ne 0 ] || error "unused locks ($count) should be zero" fail ost1 -- 1.8.3.1