From 37b45913703044f2148c8b2f35ceaaba5997fcff Mon Sep 17 00:00:00 2001 From: ubansal Date: Thu, 25 Jul 2019 15:19:34 +0530 Subject: [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 --- tests/functional/disperse/test_ec_io_hang_clientside_heal.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'tests/functional/disperse/test_ec_io_hang_clientside_heal.py') 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 ceda859d2..974170930 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) -- cgit