Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1712220

Summary: tests/geo-rep: arequal checksum comparison always succeeds
Product: [Community] GlusterFS Reporter: Kotresh HR <khiremat>
Component: testsAssignee: Kotresh HR <khiremat>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6CC: bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-23 11:29:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kotresh HR 2019-05-21 04:57:10 UTC
This bug was initially created as a copy of Bug #1707742

I am copying this bug because: 



Description of problem:
arequal checksum comparison always succeeds in all geo-rep test cases.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
Run any geo-rep test case with bash -x
bash -x tests/00-geo-rep/georep-basic-dr-tarssh.t


+ _EXPECT_WITHIN 109 120 0 arequal_checksum /mnt/glusterfs/0 /mnt/glusterfs/1
+ TESTLINE=109
..
..

+ dbg 'TEST 35 (line 109): 0 arequal_checksum /mnt/glusterfs/0 /mnt/glusterfs/1'
+ '[' x0 = x0 ']'
+ saved_cmd='0 arequal_checksum /mnt/glusterfs/0 /mnt/glusterfs/1'
+ e=0
+ a=
+ shift
++ date +%s
+ local endtime=1557300038
+ EW_RETRIES=0
++ date +%s
+ '[' 1557299918 -lt 1557300038 ']'
++ tail -1
++ arequal_checksum /mnt/glusterfs/0 /mnt/glusterfs/1
++ master=/mnt/glusterfs/0
++ slave=/mnt/glusterfs/1
++ wc -l
++ diff /dev/fd/63 /dev/fd/62
+++ arequal-checksum -p /mnt/glusterfs/1
+++ arequal-checksum -p /mnt/glusterfs/0
++ exit 0
+ a=20
+ '[' 0 -ne 0 ']'
+ [[ 20 =~ 0 ]]          <<<< Even though it's not equal it went to break in first iteration
+ break



Actual results:
arequal exists on first call even if it's not matched.

Expected results:
arequal should exists only on successful match

Additional info:

Comment 1 Worker Ant 2019-05-21 05:00:08 UTC
REVIEW: https://review.gluster.org/22751 (tests/geo-rep: Fix arequal checksum comparison) posted (#1) for review on release-6 by Kotresh HR

Comment 2 Worker Ant 2019-05-23 11:29:31 UTC
REVIEW: https://review.gluster.org/22751 (tests/geo-rep: Fix arequal checksum comparison) merged (#2) on release-6 by Kotresh HR