mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-20 02:21:26 +00:00
vircgrouptest: add detect mounts test for hybrid cgroups
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
8f43c7a698
commit
1981c79c4b
12
tests/vircgroupdata/hybrid.cgroups
Normal file
12
tests/vircgroupdata/hybrid.cgroups
Normal file
@ -0,0 +1,12 @@
|
||||
#subsys_name hierarchy num_cgroups enabled
|
||||
cpuset 2 1 1
|
||||
cpu 0 1 1
|
||||
cpuacct 0 1 1
|
||||
blkio 0 1 1
|
||||
memory 0 1 1
|
||||
devices 3 1 1
|
||||
freezer 5 1 1
|
||||
net_cls 4 1 1
|
||||
perf_event 6 1 1
|
||||
hugetlb 7 1 1
|
||||
pids 8 1 1
|
23
tests/vircgroupdata/hybrid.mounts
Normal file
23
tests/vircgroupdata/hybrid.mounts
Normal file
@ -0,0 +1,23 @@
|
||||
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
|
||||
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
|
||||
devtmpfs /dev devtmpfs rw,nosuid,size=10240k,nr_inodes=502705,mode=755 0 0
|
||||
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
|
||||
tmpfs /dev/shm tmpfs rw,nosuid,nodev,noexec 0 0
|
||||
tmpfs /run tmpfs rw,nosuid,nodev,noexec,mode=755 0 0
|
||||
mqueue /dev/mqueue mqueue rw,nosuid,nodev,noexec,relatime 0 0
|
||||
securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0
|
||||
debugfs /sys/kernel/debug debugfs rw,nosuid,nodev,noexec,relatime 0 0
|
||||
configfs /sys/kernel/config configfs rw,nosuid,nodev,noexec,relatime 0 0
|
||||
fusectl /sys/fs/fuse/connections fusectl rw,nosuid,nodev,noexec,relatime 0 0
|
||||
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
|
||||
pstore /sys/fs/pstore pstore rw,nosuid,nodev,noexec,relatime 0 0
|
||||
cgroup_root /not/really/sys/fs/cgroup tmpfs rw,nosuid,nodev,noexec,relatime,size=10240k,mode=755 0 0
|
||||
openrc /not/really/sys/fs/cgroup/openrc cgroup rw,nosuid,nodev,noexec,relatime,release_agent=/lib64/rc/sh/cgroup-release-agent.sh,name=openrc 0 0
|
||||
none /not/really/sys/fs/cgroup/unified cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate 0 0
|
||||
cpuset /not/really/sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
|
||||
devices /not/really/sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0
|
||||
net_cls /not/really/sys/fs/cgroup/net_cls cgroup rw,nosuid,nodev,noexec,relatime,net_cls 0 0
|
||||
freezer /not/really/sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
|
||||
perf_event /not/really/sys/fs/cgroup/perf_event cgroup rw,nosuid,nodev,noexec,relatime,perf_event 0 0
|
||||
hugetlb /not/really/sys/fs/cgroup/hugetlb cgroup rw,nosuid,nodev,noexec,relatime,hugetlb 0 0
|
||||
pids /not/really/sys/fs/cgroup/pids cgroup rw,nosuid,nodev,noexec,relatime,pids 0 0
|
11
tests/vircgroupdata/hybrid.parsed
Normal file
11
tests/vircgroupdata/hybrid.parsed
Normal file
@ -0,0 +1,11 @@
|
||||
cpu <null>
|
||||
cpuacct <null>
|
||||
cpuset /not/really/sys/fs/cgroup/cpuset
|
||||
memory <null>
|
||||
devices /not/really/sys/fs/cgroup/devices
|
||||
freezer /not/really/sys/fs/cgroup/freezer
|
||||
blkio <null>
|
||||
net_cls /not/really/sys/fs/cgroup/net_cls
|
||||
perf_event /not/really/sys/fs/cgroup/perf_event
|
||||
name=systemd <null>
|
||||
unified /not/really/sys/fs/cgroup/unified
|
9
tests/vircgroupdata/hybrid.self.cgroup
Normal file
9
tests/vircgroupdata/hybrid.self.cgroup
Normal file
@ -0,0 +1,9 @@
|
||||
8:pids:/
|
||||
7:hugetlb:/
|
||||
6:perf_event:/
|
||||
5:freezer:/
|
||||
4:net_cls:/
|
||||
3:devices:/
|
||||
2:cpuset:/
|
||||
1:name=openrc:/
|
||||
0::/
|
@ -902,6 +902,9 @@ mymain(void)
|
||||
fakerootdir = initFakeFS("unified", NULL);
|
||||
DETECT_MOUNTS("unified");
|
||||
cleanupFakeFS(fakerootdir);
|
||||
fakerootdir = initFakeFS("hybrid", NULL);
|
||||
DETECT_MOUNTS("hybrid");
|
||||
cleanupFakeFS(fakerootdir);
|
||||
|
||||
fakerootdir = initFakeFS(NULL, "systemd");
|
||||
if (virTestRun("New cgroup for self", testCgroupNewForSelf, NULL) < 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user