Skip to content

Commit 79a311f

Browse files
authored
Merge pull request #4802 from kolyshkin/ci-events
tests/int/events.bats: don't require root
2 parents 6bae6ca + 66a533e commit 79a311f

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

tests/integration/events.bats

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ function teardown() {
1313
# This needs to be placed at the top of the bats file to work around
1414
# a shellcheck bug. See <https://github.com/koalaman/shellcheck/issues/2873>.
1515
function test_events() {
16-
# XXX: currently cgroups require root containers.
17-
requires root
18-
init_cgroup_paths
16+
[ $EUID -ne 0 ] && requires rootless_cgroup
17+
set_cgroups_path
1918

2019
local status interval retry_every=1
2120
if [ $# -eq 2 ]; then
@@ -45,8 +44,7 @@ function test_events() {
4544
}
4645

4746
@test "events --stats" {
48-
# XXX: currently cgroups require root containers.
49-
requires root
47+
[ $EUID -ne 0 ] && requires rootless_cgroup
5048
init_cgroup_paths
5149

5250
# run busybox detached
@@ -61,6 +59,7 @@ function test_events() {
6159
}
6260

6361
@test "events --stats with psi data" {
62+
# XXX: CPU PSI avg data only available to root.
6463
requires root cgroups_v2 psi
6564
init_cgroup_paths
6665

@@ -101,7 +100,7 @@ function test_events() {
101100
}
102101

103102
@test "events oom" {
104-
# XXX: currently cgroups require root containers.
103+
# XXX: oom is not triggered for rootless containers.
105104
requires root cgroups_swap
106105
init_cgroup_paths
107106

0 commit comments

Comments
 (0)