Skip to content

Commit dfcf22a

Browse files
committed
[test] ci/gha: run tests in own systemd slice
Signed-off-by: Kir Kolyshkin <[email protected]>
1 parent ad99e59 commit dfcf22a

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
@@ -153,6 +153,10 @@ jobs:
153153
run: |
154154
sed "s;^profile runc /usr/sbin/;profile runc-test $PWD/;" < /etc/apparmor.d/runc | sudo apparmor_parser
155155
156+
- name: Setup machine-runc.slice
157+
if: matrix.os == 'ubuntu-24.04'
158+
run: sudo ./script/setup_host_ubuntu.sh
159+
156160
- name: unit test
157161
if: matrix.rootless != 'rootless'
158162
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)