1
0
mirror of https://github.com/ARM-software/devlib.git synced 2024-10-06 10:50:51 +01:00

cgroups: Fix run_into method

The current run_into method attempts to execute:

  <...>/shutils CGMOUNT=<...> cgroups_run_into <...>

Which should instead be:

  CGMOUNT=<...> <...>/shutils cgroups_run_into <...>

So just use cgroups_run_into_cmd to generate the command, then execute that.
This commit is contained in:
Brendan Jackman 2017-01-12 16:38:12 +00:00
parent dbd12994fb
commit d0e28f0a89

View File

@ -392,11 +392,8 @@ class CgroupsModule(Module):
:param cgroup: Name of cgroup to run command into
:returns: Output of command.
"""
return self.target._execute_util(
'CGMOUNT={} cgroups_run_into {} {}'\
.format(self.cgroup_root, cgroup, cmdline),
as_root=True)
cmd = self.run_into_cmd(cgroup, cmdline)
return self.target.execute(cmd)
def cgroups_tasks_move(self, srcg, dstg, exclude=''):
"""