]> git.ipfire.org Git - thirdparty/systemd.git/commit
test-cgroup-util: Check return values
authorMichal Koutný <mkoutny@suse.com>
Wed, 15 Jan 2025 15:36:28 +0000 (16:36 +0100)
committerMichal Koutný <mkoutny@suse.com>
Wed, 12 Mar 2025 09:31:23 +0000 (10:31 +0100)
commitca82f0cbe2db096bc7ff81280b5683ea1beae534
treed0f88971cd6d7295affeac84b9c572b046df912e
parent1f5d8a6132f12574f524cef72dbda0f7408c4217
test-cgroup-util: Check return values

The test is supposed to check a battery of cgroup helpers on each
process found but it doesn't literally check anything besides presence
of procfs. (One can visually check printed output only. Introduction in
aff38e74bd ("nspawn: suffix the nspawn cgroups with ".nspawn"").)

Make some assumptions about visible processes and turn the test into
testing that systemd helpers can deal with whatever process they find on
the SUT.

Reported by Coverity and
Fixes CID#1587767
src/test/test-cgroup-util.c