mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
vircgrouptest: add detect mounts test for cgroup v2
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
9f8d170dab
commit
8f43c7a698
13
tests/vircgroupdata/unified.cgroups
Normal file
13
tests/vircgroupdata/unified.cgroups
Normal file
@ -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
|
20
tests/vircgroupdata/unified.mounts
Normal file
20
tests/vircgroupdata/unified.mounts
Normal file
@ -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
|
11
tests/vircgroupdata/unified.parsed
Normal file
11
tests/vircgroupdata/unified.parsed
Normal file
@ -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
|
1
tests/vircgroupdata/unified.self.cgroup
Normal file
1
tests/vircgroupdata/unified.self.cgroup
Normal file
@ -0,0 +1 @@
|
||||
0::/
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user