Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx> --- tests/vircgroupdata/unified.cgroups | 13 +++++++++++++ tests/vircgroupdata/unified.mounts | 20 ++++++++++++++++++++ tests/vircgroupdata/unified.parsed | 11 +++++++++++ tests/vircgroupdata/unified.self.cgroup | 1 + tests/vircgrouptest.c | 3 +++ 5 files changed, 48 insertions(+) create mode 100644 tests/vircgroupdata/unified.cgroups create mode 100644 tests/vircgroupdata/unified.mounts create mode 100644 tests/vircgroupdata/unified.parsed create mode 100644 tests/vircgroupdata/unified.self.cgroup diff --git a/tests/vircgroupdata/unified.cgroups b/tests/vircgroupdata/unified.cgroups new file mode 100644 index 0000000000..e0d8a3561c --- /dev/null +++ b/tests/vircgroupdata/unified.cgroups @@ -0,0 +1,13 @@ +#subsys_name hierarchy num_cgroups enabled +cpuset 0 1 1 +cpu 0 1 1 +cpuacct 0 1 1 +blkio 0 1 1 +memory 0 1 1 +devices 0 1 1 +freezer 0 1 1 +net_cls 0 1 1 +perf_event 0 1 1 +net_prio 0 1 1 +hugetlb 0 1 1 +pids 0 1 1 diff --git a/tests/vircgroupdata/unified.mounts b/tests/vircgroupdata/unified.mounts new file mode 100644 index 0000000000..b4ab94a2c3 --- /dev/null +++ b/tests/vircgroupdata/unified.mounts @@ -0,0 +1,20 @@ +sysfs /sys sysfs rw,seclabel,nosuid,nodev,noexec,relatime 0 0 +proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0 +devtmpfs /dev devtmpfs rw,seclabel,nosuid,size=1009844k,nr_inodes=252461,mode=755 0 0 +securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0 +tmpfs /dev/shm tmpfs rw,seclabel,nosuid,nodev 0 0 +devpts /dev/pts devpts rw,seclabel,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0 +tmpfs /run tmpfs rw,seclabel,nosuid,nodev,mode=755 0 0 +cgroup2 /not/really/sys/fs/cgroup cgroup2 rw,seclabel,nosuid,nodev,noexec,relatime,nsdelegate 0 0 +pstore /sys/fs/pstore pstore rw,seclabel,nosuid,nodev,noexec,relatime 0 0 +bpf /sys/fs/bpf bpf rw,nosuid,nodev,noexec,relatime,mode=700 0 0 +configfs /sys/kernel/config configfs rw,relatime 0 0 +/dev/vda2 / ext4 rw,seclabel,relatime 0 0 +selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0 +debugfs /sys/kernel/debug debugfs rw,seclabel,relatime 0 0 +hugetlbfs /dev/hugepages hugetlbfs rw,seclabel,relatime,pagesize=2M 0 0 +systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=40,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=14586 0 0 +mqueue /dev/mqueue mqueue rw,seclabel,relatime 0 0 +tmpfs /tmp tmpfs rw,seclabel,nosuid,nodev 0 0 +sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw,relatime 0 0 +tmpfs /run/user/0 tmpfs rw,seclabel,nosuid,nodev,relatime,size=204000k,mode=700 0 0 diff --git a/tests/vircgroupdata/unified.parsed b/tests/vircgroupdata/unified.parsed new file mode 100644 index 0000000000..3de0fc643d --- /dev/null +++ b/tests/vircgroupdata/unified.parsed @@ -0,0 +1,11 @@ +cpu <null> +cpuacct <null> +cpuset <null> +memory <null> +devices <null> +freezer <null> +blkio <null> +net_cls <null> +perf_event <null> +name=systemd <null> +unified /not/really/sys/fs/cgroup diff --git a/tests/vircgroupdata/unified.self.cgroup b/tests/vircgroupdata/unified.self.cgroup new file mode 100644 index 0000000000..1e027b2a3c --- /dev/null +++ b/tests/vircgroupdata/unified.self.cgroup @@ -0,0 +1 @@ +0::/ diff --git a/tests/vircgrouptest.c b/tests/vircgrouptest.c index 75187216d9..800522e311 100644 --- a/tests/vircgrouptest.c +++ b/tests/vircgrouptest.c @@ -899,6 +899,9 @@ mymain(void) DETECT_MOUNTS("all-in-one"); DETECT_MOUNTS_FAIL("no-cgroups"); DETECT_MOUNTS("kubevirt"); + fakerootdir = initFakeFS("unified", NULL); + DETECT_MOUNTS("unified"); + cleanupFakeFS(fakerootdir); fakerootdir = initFakeFS(NULL, "systemd"); if (virTestRun("New cgroup for self", testCgroupNewForSelf, NULL) < 0) -- 2.17.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list