diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2020-05-11 10:26:56 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2020-05-13 23:28:49 +0000 |
commit | e7d2122aa1abeab9b0aeb8f9334c53bd6e5a0f5f (patch) | |
tree | e58e775e2e7c642dbf9c4be35a399391abfcc36a | |
parent | 3da22f8cb08b05562a4c6bd2694f2f19199cff7f (diff) | |
download | glusterfs-e7d2122aa1abeab9b0aeb8f9334c53bd6e5a0f5f.tar.gz glusterfs-e7d2122aa1abeab9b0aeb8f9334c53bd6e5a0f5f.tar.xz glusterfs-e7d2122aa1abeab9b0aeb8f9334c53bd6e5a0f5f.zip |
Fix ./tests/basic/fencing/afr-lock-heal-basic.t failure
In brick-mux tests, all bricks of the volume have same pid.
"generate_brick_statedump" cleans up the older statedumps
with same brick pid. So successive calls to this function
will delete previous brick's statedump as all bricks share
same pid. So grep calls to the statedump were failing leading
to failure of the .t
To fix this, stored the result we need from statedump before calling
next brick's statedump
Fixes: #1234
Change-Id: I824ed4dff79e7242b3e980364836b9af0e87a6ee
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
-rw-r--r-- | tests/basic/fencing/afr-lock-heal-basic.t | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/basic/fencing/afr-lock-heal-basic.t b/tests/basic/fencing/afr-lock-heal-basic.t index c5d7d6fe8f..69131af085 100644 --- a/tests/basic/fencing/afr-lock-heal-basic.t +++ b/tests/basic/fencing/afr-lock-heal-basic.t @@ -56,8 +56,8 @@ EXPECT "Y" is_gfapi_program_alive $client1_pid # Check lock is present on brick-1 and brick-2 b1_sdump=$(generate_brick_statedump $V0 $H0 $B0/${V0}0) -b2_sdump=$(generate_brick_statedump $V0 $H0 $B0/${V0}1) c1_lock_on_b1="$(egrep "$inode" $b1_sdump -A3| egrep 'ACTIVE.*client-0'| uniq| awk '{print $1,$2,$3,S4,$5,$6,$7,$8}'|tr -d '(,), ,')" +b2_sdump=$(generate_brick_statedump $V0 $H0 $B0/${V0}1) c1_lock_on_b2="$(egrep "$inode" $b2_sdump -A3| egrep 'ACTIVE.*client-1'| uniq| awk '{print $1,$2,$3,S4,$5,$6,$7,$8}'|tr -d '(,), ,')" TEST [ "$c1_lock_on_b1" == "$c1_lock_on_b2" ] @@ -83,10 +83,10 @@ TEST sleep 10 #Needed for client to re-open fd? Otherwise client_pre_lk_v2() fai # Check that all bricks now have locks from client 2 only. b1_sdump=$(generate_brick_statedump $V0 $H0 $B0/${V0}0) -b2_sdump=$(generate_brick_statedump $V0 $H0 $B0/${V0}1) -b3_sdump=$(generate_brick_statedump $V0 $H0 $B0/${V0}2) c2_lock_on_b1="$(egrep "$inode" $b1_sdump -A3| egrep 'ACTIVE.*client-0'| uniq| awk '{print $1,$2,$3,S4,$5,$6,$7,$8}'|tr -d '(,), ,')" +b2_sdump=$(generate_brick_statedump $V0 $H0 $B0/${V0}1) c2_lock_on_b2="$(egrep "$inode" $b2_sdump -A3| egrep 'ACTIVE.*client-1'| uniq| awk '{print $1,$2,$3,S4,$5,$6,$7,$8}'|tr -d '(,), ,')" +b3_sdump=$(generate_brick_statedump $V0 $H0 $B0/${V0}2) c2_lock_on_b3="$(egrep "$inode" $b3_sdump -A3| egrep 'ACTIVE.*client-2'| uniq| awk '{print $1,$2,$3,S4,$5,$6,$7,$8}'|tr -d '(,), ,')" TEST [ "$c2_lock_on_b1" == "$c2_lock_on_b2" ] TEST [ "$c2_lock_on_b1" == "$c2_lock_on_b3" ] |