[Bugs] [Bug 1580511] New: the regression test "tests/bugs/posix/bug-990028.t" fails

bugzilla at redhat.com bugzilla at redhat.com
Mon May 21 16:44:34 UTC 2018


https://bugzilla.redhat.com/show_bug.cgi?id=1580511

            Bug ID: 1580511
           Summary: the regression test "tests/bugs/posix/bug-990028.t"
                    fails
           Product: Red Hat Gluster Storage
           Version: 3.4
         Component: unclassified
          Assignee: amukherj at redhat.com
          Reporter: rabhat at redhat.com
        QA Contact: rhinduja at redhat.com
                CC: bugs at gluster.org, rhs-bugs at redhat.com,
                    sankarshan at redhat.com, smohan at redhat.com,
                    storage-qa-internal at redhat.com
        Depends On: 1574606



+++ This bug was initially created as a clone of Bug #1574606 +++

Description of problem:

The following regression test fails everytime with the the below error.

18:28:07 ok 162, LINENUM:74
18:28:07 ok 163, LINENUM:78
18:28:07 not ok 164 , LINENUM:82
18:28:07 FAILED COMMAND: [ 0x00000001 0x00000001 = 0x00000001 ]
18:28:07 not ok 165 , LINENUM:82
18:28:07 FAILED COMMAND: [ 0x00000001 0x00000001 = 0x00000001 ]
18:28:07 ok 166, LINENUM:88
18:28:07 ok 167, LINENUM:91
18:28:07 ok 168, LINENUM:95
18:28:07 ok 169, LINENUM:99
18:28:07 ok 170, LINENUM:105
18:28:07 ok 171, LINENUM:108
18:28:07 ok 172, LINENUM:113
18:28:07 ok 173, LINENUM:116
18:28:07 ok 174, LINENUM:117
18:28:07 ok 175, LINENUM:123
18:28:07 ok 176, LINENUM:126
18:28:07 ok 177, LINENUM:128
18:28:07 ok 178, LINENUM:135
18:28:07 ok 179, LINENUM:135
18:28:07 ok 180, LINENUM:141
18:28:07 ok 181, LINENUM:146
18:28:07 ok 182, LINENUM:146
18:28:07 ok 183, LINENUM:149
18:28:07 ok 184, LINENUM:155
18:28:07 Failed 2/184 subtests 
18:28:07 
18:28:07 Test Summary Report
18:28:07 -------------------
18:28:07 ./tests/bugs/posix/bug-990028.t (Wstat: 0 Tests: 184 Failed: 2)
18:28:07   Failed tests:  164-165
18:28:07 Files=1, Tests=184,  7 wallclock secs ( 0.03 usr  0.00 sys +  0.73
cusr  1.12 csys =  1.88 CPU)
18:28:07 Result: FAIL
18:28:07 End of test ./tests/bugs/posix/bug-990028.t



The failure happens because in the line 82 the getfattr command to get the
value of the xattr trusted.pgfid.<gfid> each line fails and it still prints the
output of 2 lines (i.e. both the xattrs, instead of the xattr that correspond
to the file in interest)

getfattr -m "trusted.pgfid.*" -de hex /d/backends/brick/dir2/file2 2>&1 | grep
"trusted.pgfid" | cut -d$'\n' -f 1 | cut -d'=' -f2
0x00000001
0x00000001
[root at hp-dl380pgen8-02-vm-10 gluster-gerrit]# getfattr -m "trusted.pgfid.*" -de
hex /d/backends/brick/dir2/file2 2>&1 | grep "trusted.pgfid" | cut -d$'\n' -f 1
trusted.pgfid.1373485a-2780-4101-96ba-e5f4a63005cd=0x00000001
trusted.pgfid.e7180d50-89f4-4624-b4e3-408327fa695b=0x00000001



After some investigation found the below FIX:

The following for loop (which makes use of "awk -v n=$i 'NR==n'" will print
only one line at a time (1st line for 1st iteration of the for loop and 2nd
line for the 2nd iteration of the for loop)

for i in $(seq 1 2) ; do getfattr -m "trusted.pgfid.*" -de hex
/d/backends/brick/dir$i/file$i 2>&1 | grep "trusted.pgfid"  | awk -v n=$i
'NR==n'; done
trusted.pgfid.1373485a-2780-4101-96ba-e5f4a63005cd=0x00000001
trusted.pgfid.e7180d50-89f4-4624-b4e3-408327fa695b=0x00000001

With the above change all the tests passed from this test case.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

--- Additional comment from Worker Ant on 2018-05-03 12:21:51 EDT ---

REVIEW: https://review.gluster.org/19959 (use awk to get a specific line from
the output instead of cut) posted (#1) for review on master by Raghavendra Bhat

--- Additional comment from Worker Ant on 2018-05-04 00:53:00 EDT ---

COMMIT: https://review.gluster.org/19959 committed in master by "Amar Tumballi"
<amarts at redhat.com> with a commit message- use awk to get a specific line from
the output instead of cut

cut -d$'\n' is not separating the xattrs shown as part of getfattr output.
Hence use awk to get the nth line of getfattr output for nth iteration
in the for loop.

Change-Id: I1a96cd3f72f4f407f9a783375f78d9a69d5d3885
fixes: bz#1574606
Signed-off-by: Raghavendra Bhat <raghavendra at redhat.com>


Referenced Bugs:

https://bugzilla.redhat.com/show_bug.cgi?id=1574606
[Bug 1574606] the regression test "tests/bugs/posix/bug-990028.t" fails
-- 
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=Zhkki4MdmD&a=cc_unsubscribe


More information about the Bugs mailing list