]> xenbits.xensource.com Git - libvirt.git/commit
vircgrouptest: call virCgroupNewSelf instead virCgroupDetectMounts
authorPavel Hrdina <phrdina@redhat.com>
Fri, 14 Sep 2018 11:17:07 +0000 (13:17 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Tue, 25 Sep 2018 07:59:23 +0000 (09:59 +0200)
commit8b62008d2bc5442f7755e579ea754ffd5e3f9691
tree66294e1401414dfcf115fbb27f0eae15a8f6f840
parent4988f4b347d3c56af4bdb9852d1461f08f6cfced
vircgrouptest: call virCgroupNewSelf instead virCgroupDetectMounts

This will be required once cgroup v2 is introduced.  The cgroup
detection is not simple and we will have multiple backends so we
should not just jump into the middle of the detection code.

In order to use virCgroupNewSelf we need to create all the remaining
data files:

    - {name}.cgroups represents /proc/cgroups, it is a list of cgroup
      controllers compiled into kernel

    - {name}.self.cgroup represents /proc/self/cgroup, it describes
      cgroups to which the process belongs

For "no-cgroups" we need to modify the expected behavior because
virCgroupNewSelf() will fail if there are no controllers available.

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
25 files changed:
src/libvirt_private.syms
src/util/vircgroup.c
src/util/vircgrouppriv.h
tests/vircgroupdata/cgroups1.cgroups [new file with mode: 0644]
tests/vircgroupdata/cgroups1.self.cgroup [new file with mode: 0644]
tests/vircgroupdata/cgroups2.cgroups [new file with mode: 0644]
tests/vircgroupdata/cgroups2.self.cgroup [new file with mode: 0644]
tests/vircgroupdata/cgroups3.cgroups [new file with mode: 0644]
tests/vircgroupdata/cgroups3.self.cgroup [new file with mode: 0644]
tests/vircgroupdata/fedora-18.cgroups [new file with mode: 0644]
tests/vircgroupdata/fedora-18.self.cgroup [new file with mode: 0644]
tests/vircgroupdata/fedora-21.cgroups [new file with mode: 0644]
tests/vircgroupdata/fedora-21.self.cgroup [new file with mode: 0644]
tests/vircgroupdata/kubevirt.cgroups [new file with mode: 0644]
tests/vircgroupdata/kubevirt.self.cgroup [new file with mode: 0644]
tests/vircgroupdata/no-cgroups.cgroups [new file with mode: 0644]
tests/vircgroupdata/no-cgroups.parsed [deleted file]
tests/vircgroupdata/no-cgroups.self.cgroup [new file with mode: 0644]
tests/vircgroupdata/ovirt-node-6.6.cgroups [new file with mode: 0644]
tests/vircgroupdata/ovirt-node-6.6.self.cgroup [new file with mode: 0644]
tests/vircgroupdata/ovirt-node-7.1.cgroups [new file with mode: 0644]
tests/vircgroupdata/ovirt-node-7.1.self.cgroup [new file with mode: 0644]
tests/vircgroupdata/rhel-7.1.cgroups [new file with mode: 0644]
tests/vircgroupdata/rhel-7.1.self.cgroup [new file with mode: 0644]
tests/vircgrouptest.c