[Bugs] [Bug 1574606] New: the regression test "tests/bugs/posix/bug-990028.t" fails
bugzilla at redhat.com
bugzilla at redhat.com
Thu May 3 16:09:33 UTC 2018
https://bugzilla.redhat.com/show_bug.cgi?id=1574606
Bug ID: 1574606
Summary: the regression test "tests/bugs/posix/bug-990028.t"
fails
Product: GlusterFS
Version: mainline
Component: tests
Assignee: bugs at gluster.org
Reporter: rabhat at redhat.com
CC: bugs at gluster.org
Description of problem:
The following regression test fails everytime with the the below error.
TEST: tests/bugs/posix/bug-990028.t
ERROR:
ok 163, LINENUM:78
tests/bugs/posix/../../include.rc: line 334: [: too many arguments
not ok 164 , LINENUM:82
FAILED COMMAND: [ 0x00000001 0x00000001 = 0x00000001 ]
not ok 165 , LINENUM:82
FAILED COMMAND: [ 0x00000001 0x00000001 = 0x00000001 ]
tests/bugs/posix/../../include.rc: line 334: [: too many arguments
ok 166, LINENUM:88
ok 167, LINENUM:91
ok 168, LINENUM:95
ok 169, LINENUM:99
ok 170, LINENUM:105
ok 171, LINENUM:108
ok 172, LINENUM:113
ok 173, LINENUM:116
ok 174, LINENUM:117
ok 175, LINENUM:123
ok 176, LINENUM:126
ok 177, LINENUM:128
ok 178, LINENUM:135
ok 179, LINENUM:135
ok 180, LINENUM:141
ok 181, LINENUM:146
ok 182, LINENUM:146
ok 183, LINENUM:149
ok 184, LINENUM:155
Failed 2/184 subtests
Test Summary Report
-------------------
tests/bugs/posix/bug-990028.t (Wstat: 0 Tests: 184 Failed: 2)
Failed tests: 164-165
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:
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
More information about the Bugs
mailing list