Skip to content

Commit 4c43461

Browse files
committed
tests/int: add check for hugetlb stats
As promised in opencontainers/cgroups#24 (review) Signed-off-by: Kir Kolyshkin <[email protected]>
1 parent 77ead42 commit 4c43461

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/integration/events.bats

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,20 @@ function test_events() {
8787
done
8888
}
8989

90+
# See https://github.com/opencontainers/cgroups/pull/24
91+
@test "events --stats with hugetlb" {
92+
requires cgroups_v2 cgroups_hugetlb
93+
init_cgroup_paths
94+
95+
runc run -d --console-socket "$CONSOLE_SOCKET" test_busybox
96+
[ "$status" -eq 0 ]
97+
98+
runc events --stats test_busybox
99+
[ "$status" -eq 0 ]
100+
# Ensure hugetlb node is present.
101+
jq -e '.data.hugetlb // empty' <<<"${lines[0]}"
102+
}
103+
90104
@test "events --interval default" {
91105
test_events
92106
}

0 commit comments

Comments
 (0)