[Bugs] [Bug 1672480] Bugs Test Module tests failing on s390x

bugzilla at redhat.com bugzilla at redhat.com
Mon Mar 4 07:19:31 UTC 2019


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

abhays <abhaysingh1722 at yahoo.in> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|needinfo?(abhaysingh1722 at ya |
                   |hoo.in)                     |



--- Comment #55 from abhays <abhaysingh1722 at yahoo.in> ---
(In reply to Nithya Balachandran from comment #54)
> > 
> > However, the test cases are still failing and only pass if x86 hash values
> > are provided(Refer to comment#8):-
> > ./tests/bugs/glusterfs/bug-902610.t
> > ./tests/bugs/posix/bug-1619720.t
> 
> Please provide more information on what changes you tried.

For tests/bugs/glusterfs/bug-902610.t:-
In the test case, after the kill_brick function is run, the mkdir $M0/dir1
doesn't work and hence the get_layout function test fails. So,as a workaround
we tried not killing the brick and then checked the functionality of the test
case, after which the dir1 did get created in all the 4 bricks, however, the
test failed with the following output:-
=========================
TEST 9 (line 59): ls -l /mnt/glusterfs/0
ok 9, LINENUM:59
RESULT 9: 0
getfattr: Removing leading '/' from absolute path names
/d/backends/patchy3/dir1 /d/backends/patchy0/dir1 /d/backends/patchy2/dir1
/d/backends/patchy1/dir1
layout1 from 00000000 to 00000000
layout2 from 00000000 to 55555554
target for layout2 = 55555555
=========================
TEST 10 (line 72): 0 echo 1
not ok 10 Got "1" instead of "0", LINENUM:72
RESULT 10: 1
Failed 1/10 subtests
=========================

But, the below patch works for the test case(only on Big Endian):-

diff --git a/tests/bugs/glusterfs/bug-902610.t
b/tests/bugs/glusterfs/bug-902610.t
index b45e92b8a..8a8eaf7a3 100755
--- a/tests/bugs/glusterfs/bug-902610.t
+++ b/tests/bugs/glusterfs/bug-902610.t
@@ -2,6 +2,7 @@

 . $(dirname $0)/../../include.rc
 . $(dirname $0)/../../volume.rc
+. $(dirname $0)/../../dht.rc

 cleanup;

@@ -11,11 +12,11 @@ function get_layout()
         layout1=`getfattr -n trusted.glusterfs.dht -e hex $1 2>&1|grep dht
|cut -d = -f2`
        layout1_s=$(echo $layout1 | cut -c 19-26)
        layout1_e=$(echo $layout1 | cut -c 27-34)
-       #echo "layout1 from $layout1_s to $layout1_e" > /dev/tty
+       echo "layout1 from $layout1_s to $layout1_e" > /dev/tty
         layout2=`getfattr -n trusted.glusterfs.dht -e hex $2 2>&1|grep dht
|cut -d = -f2`
        layout2_s=$(echo $layout2 | cut -c 19-26)
        layout2_e=$(echo $layout2 | cut -c 27-34)
-       #echo "layout2 from $layout2_s to $layout2_e" > /dev/tty
+       echo "layout2 from $layout2_s to $layout2_e" > /dev/tty

        if [ x"$layout2_s" = x"00000000" ]; then
                # Reverse so we only have the real logic in one place.
@@ -29,7 +30,7 @@ function get_layout()

        # Figure out where the join point is.
        target=$( $PYTHON -c "print '%08x' % (0x$layout1_e + 1)")
-       #echo "target for layout2 = $target" > /dev/tty
+       echo "target for layout2 = $target" > /dev/tty

        # The second layout should cover everything that the first doesn't.
        if [ x"$layout2_s" = x"$target" -a x"$layout2_e" = x"ffffffff" ]; then
@@ -41,26 +42,30 @@ function get_layout()

 BRICK_COUNT=4

-TEST glusterd
+TEST glusterd --log-level DEBUG
 TEST pidof glusterd

 TEST $CLI volume create $V0 $H0:$B0/${V0}0 $H0:$B0/${V0}1 $H0:$B0/${V0}2
$H0:$B0/${V0}3
 ## set subvols-per-dir option
 TEST $CLI volume set $V0 subvols-per-directory 3
 TEST $CLI volume start $V0
+TEST $CLI volume set $V0 client-log-level DEBUG
+TEST $CLI volume set $V0 brick-log-level DEBUG
+

 ## Mount FUSE
 TEST glusterfs -s $H0 --volfile-id $V0 $M0 --entry-timeout=0
--attribute-timeout=0;

 TEST ls -l $M0
+#brick_loc=$(get_backend_paths $M0)

 ## kill 2 bricks to bring down available subvol < spread count
-kill_brick $V0 $H0 $B0/${V0}2
-kill_brick $V0 $H0 $B0/${V0}3
+kill_brick $V0 $H0 $B0/${V0}0
+kill_brick $V0 $H0 $B0/${V0}1

 mkdir $M0/dir1 2>/dev/null

-get_layout $B0/${V0}0/dir1 $B0/${V0}1/dir1
+get_layout $B0/${V0}2/dir1 $B0/${V0}3/dir1
 EXPECT "0" echo $?

 cleanup;


>From above patch, the below output is seen:-
=========================
TEST 9 (line 59): ls -l /mnt/glusterfs/0
ok 9, LINENUM:59
RESULT 9: 0
Socket=/var/run/gluster/e90af2b6fbd74dbe.socket
Brick=/d/backends/patchy0
connected
disconnected
OK
Socket=/var/run/gluster/d7212ecddcb22a08.socket
Brick=/d/backends/patchy1
connected
disconnected
OK
layout1 from 00000000 to 7ffffffe
layout2 from 7fffffff to ffffffff
target for layout2 = 7fffffff
=========================
TEST 10 (line 72): 0 echo 0
ok 10, LINENUM:72
RESULT 10: 0
ok
All tests successful.
Files=1, Tests=10, 13 wallclock secs ( 0.03 usr  0.01 sys +  2.05 cusr  0.34
csys =  2.43 CPU)
Result: PASS
=========================


Therefore, can these changes be added in the test case with a condition for
s390x separately?

Also, We have a few queries on the tests behaviour.
When a directory or a file gets created, according to me, it should be placed
in the brick depending on its hash range and value of the file/directory.
However, in the above test, as you can see, if we don't kill the bricks{2,3},
the directory gets created in all the bricks{0,1,2,3}.So, does it not consider
hash values and range at this point or is it something to do with mounting
FUSE?

-- 
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