diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2018-12-10 15:49:04 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-12-10 16:37:02 +0100 |
| commit | 28bd3e371b1f31cb243f0df56b9c7720971a89db (patch) | |
| tree | ac2ff223b4b855f0bcb554bc65dcff07a2f4e49c /sys/linux/test/cgroup | |
| parent | c7ba317e9bfa7672d851df1217c2c3ea045c55f1 (diff) | |
prog: support AUTO args in programs
AUTO arguments can be used for:
- consts
- lens
- pointers
For const's and len's AUTO is replaced with the natural value,
addresses for AUTO pointers are allocated linearly.
This greatly simplifies writing test programs by hand
as most of the time we want these natural values.
Update tests to use AUTO.
Diffstat (limited to 'sys/linux/test/cgroup')
| -rw-r--r-- | sys/linux/test/cgroup | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/linux/test/cgroup b/sys/linux/test/cgroup index db6fb7317..f06d87ac8 100644 --- a/sys/linux/test/cgroup +++ b/sys/linux/test/cgroup @@ -4,12 +4,12 @@ # requires: -sandbox= -sandbox=setuid -C,norepeat r0 = getpid() -r1 = openat(0xffffffffffffff9c, &(0x7f0000000000)='./cgroup/cgroup.procs\x00', 0x2, 0x0) -read(r1, &(0x7f0000000100)="00", 0x1) -write$cgroup_pid(r1, &(0x7f0000000100)=r0, 0x12) +r1 = openat(0xffffffffffffff9c, &AUTO='./cgroup/cgroup.procs\x00', 0x2, 0x0) +read(r1, &AUTO="00", AUTO) +write$cgroup_pid(r1, &AUTO=r0, AUTO) close(r1) -openat(0xffffffffffffff9c, &(0x7f0000000000)='./cgroup/pids.max\x00', 0x2, 0x0) -openat(0xffffffffffffff9c, &(0x7f0000000000)='./cgroup.cpu/cgroup.procs\x00', 0x2, 0x0) -openat(0xffffffffffffff9c, &(0x7f0000000000)='./cgroup.cpu/cpuset.cpus\x00', 0x2, 0x0) -openat(0xffffffffffffff9c, &(0x7f0000000000)='./cgroup.net/cgroup.procs\x00', 0x2, 0x0) -openat(0xffffffffffffff9c, &(0x7f0000000000)='./cgroup.net/devices.allow\x00', 0x1, 0x0) +openat(0xffffffffffffff9c, &AUTO='./cgroup/pids.max\x00', 0x2, 0x0) +openat(0xffffffffffffff9c, &AUTO='./cgroup.cpu/cgroup.procs\x00', 0x2, 0x0) +openat(0xffffffffffffff9c, &AUTO='./cgroup.cpu/cpuset.cpus\x00', 0x2, 0x0) +openat(0xffffffffffffff9c, &AUTO='./cgroup.net/cgroup.procs\x00', 0x2, 0x0) +openat(0xffffffffffffff9c, &AUTO='./cgroup.net/devices.allow\x00', 0x1, 0x0) |
