Skip to content

Commit f96e179

Browse files
committed
[test] ci/gha: run tests in own systemd slice
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
1 parent 10a70ab commit f96e179

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ jobs:
119119
run: |
120120
sed "s;^profile runc /usr/sbin/;profile runc-test $PWD/;" < /etc/apparmor.d/runc | sudo apparmor_parser
121121
122+
- name: Setup machine-runc.slice
123+
if: matrix.os == 'ubuntu-24.04'
124+
run: sudo ./script/setup_host_ubuntu.sh
125+
122126
- name: unit test
123127
if: matrix.rootless != 'rootless'
124128
run: sudo -E PATH="$PATH" -- make TESTFLAGS="${{ matrix.race }}" localunittest

script/setup_host_ubuntu.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
set -eux -o pipefail
3+
4+
cat >/etc/systemd/system/machine-runc.slice <<EOF
5+
[Unit]
6+
Description=runc containers
7+
Before=slices.target
8+
9+
[Slice]
10+
Delegate=yes
11+
EOF
12+
13+
systemctl daemon-reload
14+
systemctl start machine-runc.slice
15+
systemctl status machine-runc.slice

vendor/github.com/opencontainers/cgroups/fs2/defaultpath.go

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)