From 28bd3e371b1f31cb243f0df56b9c7720971a89db Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 10 Dec 2018 15:49:04 +0100 Subject: 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. --- sys/linux/test/cgroup | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'sys/linux/test/cgroup') 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) -- cgit mrf-deployment