Commit e93bf898 by Serge Hallyn Committed by Stéphane Graber

unpriv tests: also move caller into unbound cgroups

Otherwise the name=systemd cgroup isn't changed to one which the lxc-unpriv user can write to, causing the test to fail. This allows lxc-test-unpriv and lxc-test-usernic to pass when run in an unprivileged container with cgmanager. Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com> Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent 689a90a6
......@@ -92,7 +92,7 @@ chown -R $TUSER /run/user/$(id -u $TUSER)
cd $HDIR
if [ -e /sys/fs/cgroup/cgmanager/sock ]; then
for d in $(grep -v ^# /proc/cgroups | awk '{print $1}'); do
for d in $(cut -d : -f 2 /proc/self/cgroup); do
dbus-send --print-reply --address=unix:path=/sys/fs/cgroup/cgmanager/sock \
--type=method_call /org/linuxcontainers/cgmanager org.linuxcontainers.cgmanager0_0.Create \
string:$d string:$TUSER >/dev/null
......
......@@ -85,7 +85,7 @@ lxc.id_map = g 0 910000 10000
EOF
if [ -e /sys/fs/cgroup/cgmanager/sock ]; then
for d in $(grep -v ^# /proc/cgroups | awk '{print $1}'); do
for d in $(cut -d : -f 2 /proc/self/cgroup); do
dbus-send --print-reply --address=unix:path=/sys/fs/cgroup/cgmanager/sock \
--type=method_call /org/linuxcontainers/cgmanager org.linuxcontainers.cgmanager0_0.Create \
string:$d string:usernic-user >/dev/null
......
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