]> xenbits.xensource.com Git - libvirt.git/commit
vircgroupmock: add support to test cgroup v2
authorPavel Hrdina <phrdina@redhat.com>
Tue, 18 Sep 2018 10:33:21 +0000 (12:33 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Fri, 5 Oct 2018 13:53:29 +0000 (15:53 +0200)
commit61ff6021d842a3baf2f6cbc3f37dd272f6c86563
treee5d4acaec847bef7c30deb59989672b214e49110
parent9bd1979e37ca703f8e29c2dfca83a9cd04af2982
vircgroupmock: add support to test cgroup v2

We need to create the cgroup v2 sysfs the same way as we do for
cgroup v1.

This introduces new VIR_CGROUP_MOCK_MODE env variable which will
configure which cgroup mode each test requires.  There are three
different modes:

    - legacy: only cgroup v1 is available and it's the default mode
    - hybrid: both cgroup v1 and cgroup v2 are available and have some
        controllers
    - unified: only cgroup v2 is available

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
tests/vircgroupmock.c