github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/linux/test/cgroup (about) 1 # Basic test for cgroups and executor cgroup setup. 2 # This inherently does not work with sandbox="" because sandbox does part of setup. 3 # TODO(dvyukov): sandbox=setuid has some permissions setup problems. 4 # requires: -sandbox= -sandbox=setuid -C,norepeat 5 6 r0 = getpid() 7 r1 = openat(0xffffffffffffff9c, &AUTO='./cgroup/cgroup.procs\x00', 0x2, 0x0) 8 read(r1, &AUTO="00", AUTO) 9 write$cgroup_pid(r1, &AUTO=r0, AUTO) 10 close(r1) 11 openat(0xffffffffffffff9c, &AUTO='./cgroup/pids.max\x00', 0x2, 0x0) 12 openat(0xffffffffffffff9c, &AUTO='./cgroup.cpu/cgroup.procs\x00', 0x2, 0x0) 13 openat(0xffffffffffffff9c, &AUTO='./cgroup.cpu/cpuset.cpus\x00', 0x2, 0x0) 14 openat(0xffffffffffffff9c, &AUTO='./cgroup.net/cgroup.procs\x00', 0x2, 0x0) 15 openat(0xffffffffffffff9c, &AUTO='./cgroup.net/devices.allow\x00', 0x1, 0x0)