From: Lou Berger Date: Tue, 22 May 2018 11:44:51 +0000 (-0400) Subject: lib: allow all rw access to /tmp/topotests (for package support and debug) X-Git-Tag: frr-7.1-dev~151^2~72 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=b0f0d980b5bbee764b5c7fe89ce9642ef4239c30;p=mirror%2Ffrr.git lib: allow all rw access to /tmp/topotests (for package support and debug) Signed-off-by: Lou Berger --- diff --git a/tests/topotests/lib/topogen.py b/tests/topotests/lib/topogen.py index 5c8d1ddf36..b8d7307147 100644 --- a/tests/topotests/lib/topogen.py +++ b/tests/topotests/lib/topogen.py @@ -573,8 +573,7 @@ class TopoRouter(TopoGear): #setup the per node directory dir = '{}/{}'.format(self.logdir, self.name) os.system('mkdir -p ' + dir) - os.system('chmod 775 ' + dir) - os.system('chgrp {} {}'.format(self.routertype, dir)) + os.system('chmod -R go+rw /tmp/topotests') # Open router log file logfile = '{0}/{1}.log'.format(dir, name) diff --git a/tests/topotests/lib/topotest.py b/tests/topotests/lib/topotest.py index fbdb9bbbc1..d7429fc96e 100644 --- a/tests/topotests/lib/topotest.py +++ b/tests/topotests/lib/topotest.py @@ -74,7 +74,7 @@ def get_test_logdir(node=None, init=False): dir = ret + "/" + node if init: os.system('mkdir -p ' + dir) - os.system('chmod 775 ' + dir) + os.system('chmod -R go+rw /tmp/topotests') return ret def json_diff(d1, d2): @@ -558,6 +558,8 @@ class Router(Node): set_sysctl(self, 'net.ipv4.ip_forward', 0) set_sysctl(self, 'net.ipv6.conf.all.forwarding', 0) super(Router, self).terminate() + os.system('chmod -R go+rw /tmp/topotests') + def stopRouter(self, wait=True): # Stop Running Quagga or FRR Daemons rundaemons = self.cmd('ls -1 /var/run/%s/*.pid' % self.routertype) @@ -679,6 +681,7 @@ class Router(Node): # Starts actual daemons without init (ie restart) # cd to per node directory self.cmd('cd {}/{}'.format(self.logdir, self.name)) + self.cmd('umask 000') #Re-enable to allow for report per run self.reportCores = True # Start Zebra first