Whamcloud - gitweb
LU-7342 test: test_85a: unused locks error 53/16953/5
authorChennaiah Palla <chennaiah.palla@seagate.com>
Tue, 27 Oct 2015 12:18:04 +0000 (17:48 +0530)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 27 Jul 2016 03:01:30 +0000 (03:01 +0000)
When we changed FSNAME from lustre to lustre-1, $3
will give “addr” value “clilov” instead of getting
proper address, due to this we are getting "Found no match" error.
But if we change $3 to $NF getting addr value correctly.
Generally NF will give total number of fields in the current
input, but in our case it happens to be last field.

Test-Parameters: trivial testlist=replay-single

Seagate-bug-id: MRP-2791
Signed-off-by: Chennaiah Palla <chennaiah.palla@seagate.com>
Change-Id: I1d5e95425fdf848907cb9617494aa1c7971d90a6
Reviewed-on: http://review.whamcloud.com/16953
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Saurabh Tandan <saurabh.tandan@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/replay-single.sh

index 80d8d0d..f0824b5 100755 (executable)
@@ -2952,7 +2952,7 @@ test_85a() { #bug 16774
        done
 
        lov_id=$(lctl dl | grep "clilov")
        done
 
        lov_id=$(lctl dl | grep "clilov")
-       addr=$(echo $lov_id | awk '{print $4}' | awk -F '-' '{print $3}')
+       addr=$(echo $lov_id | awk '{print $4}' | awk -F '-' '{print $NF}')
        count=$(lctl get_param -n \
                ldlm.namespaces.*MDT0000*$addr.lock_unused_count)
        echo "before recovery: unused locks count = $count"
        count=$(lctl get_param -n \
                ldlm.namespaces.*MDT0000*$addr.lock_unused_count)
        echo "before recovery: unused locks count = $count"