Commit bfcea562 authored by Pavel Emelyanov's avatar Pavel Emelyanov

zdtm.py: Add write perms for all bins in test

This is to make groups test start in uns flavors
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent ecd789bf
......@@ -284,6 +284,12 @@ class zdtm_test:
def __wait_task_die(self):
wait_pid_die(int(self.__pid), self.__name)
def __add_wperms(self):
# Add write perms for .out and .pid files
for b in self._bins:
p = os.path.dirname(b)
os.chmod(p, os.stat(p).st_mode | 0222)
def start(self):
self.__flavor.init(self._bins, self._deps)
......@@ -295,10 +301,7 @@ class zdtm_test:
env['ZDTM_UID'] = "18943"
env['ZDTM_GID'] = "58467"
env['ZDTM_GROUPS'] = "27495 48244"
# Add write perms for .out and .pid files
p = os.path.dirname(self.__name)
os.chmod(p, os.stat(p).st_mode | 0222)
self.__add_wperms()
else:
print "Test is SUID"
......@@ -309,8 +312,7 @@ class zdtm_test:
if self.__flavor.uns:
env['ZDTM_USERNS'] = "1"
p = os.path.dirname(self.__name)
os.chmod(p, os.stat(p).st_mode | 0222)
self.__add_wperms()
self.__make_action('pid', env, self.__flavor.root)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment