summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorubansal <ubansal@redhat.com>2019-07-25 15:19:34 +0530
committerBala Konda Reddy M <bmekala@redhat.com>2019-07-29 11:41:11 +0000
commit37b45913703044f2148c8b2f35ceaaba5997fcff (patch)
tree9e0d471af5157fb4baa01de3dece51dcaafb3607 /tests
parent34bd8eb4f724a55e0bb5693151fe1b97988e7978 (diff)
[EC]Fix a script issue to change permission of the directory
Added a line to change permission of the directory so that client side healing happens for the directory also Change-Id: If4a24f2dbd6c9c85d4cb2944d1ad4795dbc39adb Signed-off-by: ubansal <ubansal@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/functional/disperse/test_ec_io_hang_clientside_heal.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/functional/disperse/test_ec_io_hang_clientside_heal.py b/tests/functional/disperse/test_ec_io_hang_clientside_heal.py
index ceda859..9741709 100644
--- a/tests/functional/disperse/test_ec_io_hang_clientside_heal.py
+++ b/tests/functional/disperse/test_ec_io_hang_clientside_heal.py
@@ -36,6 +36,7 @@ from glustolibs.gluster.heal_ops import (
from glustolibs.gluster.heal_libs import (
monitor_heal_completion)
from glustolibs.gluster.heal_ops import get_heal_info
+from glustolibs.gluster.glusterfile import set_file_permissions
def ec_check_heal_comp(self):
@@ -112,14 +113,18 @@ class EcClientHealHangTest(GlusterBaseClass):
ret = are_bricks_online(self.mnode, self.volname, bricks_list)
self.assertTrue(ret, "All bricks are not online")
- # Start client side heal by reading/writing files.
+ # Start client side heal by reading/writing files and directories
appendcmd = ("cd %s; mkdir test; cd test; for i in `seq 1 100` ;"
"do dd if=/dev/urandom of=file$i bs=1M "
"count=1 oflag=append conv=notrunc;done" % mountpoint)
readcmd = ("cd %s; mkdir test; cd test; for i in `seq 1 100` ;"
- "do dd if=file$i of=/dev/zero bs=1M "
+ "do dd if=file$i of=/dev/null bs=1M "
"count=5;done" % mountpoint)
+ ret = set_file_permissions(self.mounts[0].client_system,
+ "%s/test" % mountpoint, 777)
+ self.assertTrue(ret, "Failed to set permission for directory")
+ g.log.info("Successfully set permissions for directory")
ret, _, err = g.run(self.mounts[0].client_system, appendcmd)
self.assertEqual(ret, 0, err)