diff options
Diffstat (limited to 'recipes-containers/lxc/files/0001-tests-remove-old-and-broken-cgroup-handling-code-fro.patch')
| -rw-r--r-- | recipes-containers/lxc/files/0001-tests-remove-old-and-broken-cgroup-handling-code-fro.patch | 103 |
1 files changed, 0 insertions, 103 deletions
diff --git a/recipes-containers/lxc/files/0001-tests-remove-old-and-broken-cgroup-handling-code-fro.patch b/recipes-containers/lxc/files/0001-tests-remove-old-and-broken-cgroup-handling-code-fro.patch deleted file mode 100644 index bf8df795..00000000 --- a/recipes-containers/lxc/files/0001-tests-remove-old-and-broken-cgroup-handling-code-fro.patch +++ /dev/null | |||
| @@ -1,103 +0,0 @@ | |||
| 1 | From 8f9733d756361ff8f8d8d589f286c0e064b1195d Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com> | ||
| 3 | Date: Thu, 15 Feb 2024 18:13:05 +0100 | ||
| 4 | Subject: [PATCH] tests: remove old and broken cgroup handling code from tests | ||
| 5 | |||
| 6 | We have removed the same piece of code in | ||
| 7 | ec85e5ca495 ("lxc-test-usernic: drop cgroup handling") | ||
| 8 | let's do the same for two other tests. | ||
| 9 | |||
| 10 | This fixes autopkgtests. | ||
| 11 | |||
| 12 | Upstream-Status: Backport from | ||
| 13 | [https://github.com/lxc/lxc/commit/8f9733d756361ff8f8d8d589f286c0e064b1195d] | ||
| 14 | |||
| 15 | Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com> | ||
| 16 | Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com> | ||
| 17 | --- | ||
| 18 | src/tests/lxc-test-apparmor-mount | 29 ----------------------------- | ||
| 19 | src/tests/lxc-test-unpriv | 28 ---------------------------- | ||
| 20 | 2 files changed, 57 deletions(-) | ||
| 21 | |||
| 22 | diff --git a/src/tests/lxc-test-apparmor-mount b/src/tests/lxc-test-apparmor-mount | ||
| 23 | index 7c9d9ad50..ddf783d4b 100755 | ||
| 24 | --- a/src/tests/lxc-test-apparmor-mount | ||
| 25 | +++ b/src/tests/lxc-test-apparmor-mount | ||
| 26 | @@ -119,35 +119,6 @@ chown -R $TUSER: /run/user/$(id -u $TUSER) | ||
| 27 | |||
| 28 | cd $HDIR | ||
| 29 | |||
| 30 | -if command -v cgm >/dev/null 2>&1; then | ||
| 31 | - cgm create all $TUSER | ||
| 32 | - cgm chown all $TUSER $(id -u $TUSER) $(id -g $TUSER) | ||
| 33 | - cgm movepid all $TUSER $$ | ||
| 34 | -elif [ -e /sys/fs/cgroup/cgmanager/sock ]; then | ||
| 35 | - for d in $(cut -d : -f 2 /proc/self/cgroup); do | ||
| 36 | - dbus-send --print-reply --address=unix:path=/sys/fs/cgroup/cgmanager/sock \ | ||
| 37 | - --type=method_call /org/linuxcontainers/cgmanager org.linuxcontainers.cgmanager0_0.Create \ | ||
| 38 | - string:$d string:$TUSER >/dev/null | ||
| 39 | - | ||
| 40 | - dbus-send --print-reply --address=unix:path=/sys/fs/cgroup/cgmanager/sock \ | ||
| 41 | - --type=method_call /org/linuxcontainers/cgmanager org.linuxcontainers.cgmanager0_0.Chown \ | ||
| 42 | - string:$d string:$TUSER int32:$(id -u $TUSER) int32:$(id -g $TUSER) >/dev/null | ||
| 43 | - | ||
| 44 | - dbus-send --print-reply --address=unix:path=/sys/fs/cgroup/cgmanager/sock \ | ||
| 45 | - --type=method_call /org/linuxcontainers/cgmanager org.linuxcontainers.cgmanager0_0.MovePid \ | ||
| 46 | - string:$d string:$TUSER int32:$$ >/dev/null | ||
| 47 | - done | ||
| 48 | -else | ||
| 49 | - for d in /sys/fs/cgroup/*; do | ||
| 50 | - [ "$d" = "/sys/fs/cgroup/unified" ] && continue | ||
| 51 | - [ -f $d/cgroup.clone_children ] && echo 1 > $d/cgroup.clone_children | ||
| 52 | - [ ! -d $d/lxctest ] && mkdir $d/lxctest | ||
| 53 | - chown -R $TUSER: $d/lxctest | ||
| 54 | - echo $$ > $d/lxctest/tasks | ||
| 55 | - done | ||
| 56 | -fi | ||
| 57 | - | ||
| 58 | - | ||
| 59 | run_cmd lxc-create -t busybox -n $cname | ||
| 60 | |||
| 61 | echo "test default confined container" | ||
| 62 | diff --git a/src/tests/lxc-test-unpriv b/src/tests/lxc-test-unpriv | ||
| 63 | index 8fb9106d6..426add9da 100755 | ||
| 64 | --- a/src/tests/lxc-test-unpriv | ||
| 65 | +++ b/src/tests/lxc-test-unpriv | ||
| 66 | @@ -130,34 +130,6 @@ chown -R $TUSER: /run/user/$(id -u $TUSER) | ||
| 67 | |||
| 68 | cd $HDIR | ||
| 69 | |||
| 70 | -if command -v cgm >/dev/null 2>&1; then | ||
| 71 | - cgm create all $TUSER | ||
| 72 | - cgm chown all $TUSER $(id -u $TUSER) $(id -g $TUSER) | ||
| 73 | - cgm movepid all $TUSER $$ | ||
| 74 | -elif [ -e /sys/fs/cgroup/cgmanager/sock ]; then | ||
| 75 | - for d in $(cut -d : -f 2 /proc/self/cgroup); do | ||
| 76 | - dbus-send --print-reply --address=unix:path=/sys/fs/cgroup/cgmanager/sock \ | ||
| 77 | - --type=method_call /org/linuxcontainers/cgmanager org.linuxcontainers.cgmanager0_0.Create \ | ||
| 78 | - string:$d string:$TUSER >/dev/null | ||
| 79 | - | ||
| 80 | - dbus-send --print-reply --address=unix:path=/sys/fs/cgroup/cgmanager/sock \ | ||
| 81 | - --type=method_call /org/linuxcontainers/cgmanager org.linuxcontainers.cgmanager0_0.Chown \ | ||
| 82 | - string:$d string:$TUSER int32:$(id -u $TUSER) int32:$(id -g $TUSER) >/dev/null | ||
| 83 | - | ||
| 84 | - dbus-send --print-reply --address=unix:path=/sys/fs/cgroup/cgmanager/sock \ | ||
| 85 | - --type=method_call /org/linuxcontainers/cgmanager org.linuxcontainers.cgmanager0_0.MovePid \ | ||
| 86 | - string:$d string:$TUSER int32:$$ >/dev/null | ||
| 87 | - done | ||
| 88 | -else | ||
| 89 | - for d in /sys/fs/cgroup/*; do | ||
| 90 | - [ "$d" = "/sys/fs/cgroup/unified" ] && continue | ||
| 91 | - [ -f $d/cgroup.clone_children ] && echo 1 > $d/cgroup.clone_children | ||
| 92 | - [ ! -d $d/lxctest ] && mkdir $d/lxctest | ||
| 93 | - chown -R $TUSER: $d/lxctest | ||
| 94 | - echo $$ > $d/lxctest/tasks | ||
| 95 | - done | ||
| 96 | -fi | ||
| 97 | - | ||
| 98 | run_cmd lxc-create -t busybox -n c1 -l trace -o "${UNPRIV_LOG}" | ||
| 99 | |||
| 100 | # Make sure we can start it - twice | ||
| 101 | -- | ||
| 102 | 2.35.5 | ||
| 103 | |||
