Whamcloud - gitweb
LU-7204 test: handle FSNAME with dashes in replay-single 85b 02/16902/4
authorSundar Keshava <sundar.sinnurkar@seagate.com>
Wed, 21 Oct 2015 10:02:05 +0000 (15:32 +0530)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 22 Jun 2016 02:54:09 +0000 (02:54 +0000)
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 <hema.yarramilli@seagate.com>
Change-Id: I392921b837dee573a704a3fec4b35c7bb79136bc
Reviewed-on: http://review.whamcloud.com/16902
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/replay-single.sh

index 31586b2..7e316ff 100755 (executable)
@@ -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