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/binfmt | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'sys/linux/test/binfmt') diff --git a/sys/linux/test/binfmt b/sys/linux/test/binfmt index 9ab905824..8998c6226 100644 --- a/sys/linux/test/binfmt +++ b/sys/linux/test/binfmt @@ -1,16 +1,16 @@ # Tests for binfmt_misc. # Executor setups binfmt_misc with ./file0 interpreter for files with byte 0x01 at offset 0. -execveat(0xffffffffffffff9c, &(0x7f0000000000)='./file1\x00', &(0x7f0000000100)=[0x0], &(0x7f0000000200)=[0x0], 0x0) # ENOENT -r0 = openat(0xffffffffffffff9c, &(0x7f0000000000)='./file1\x00', 0x42, 0x1ff) +execveat(0xffffffffffffff9c, &AUTO='./file1\x00', &AUTO=[0x0], &AUTO=[0x0], 0x0) # ENOENT +r0 = openat(0xffffffffffffff9c, &AUTO='./file1\x00', 0x42, 0x1ff) close(r0) -execveat(0xffffffffffffff9c, &(0x7f0000000000)='./file1\x00', &(0x7f0000000100)=[0x0], &(0x7f0000000200)=[0x0], 0x0) # ENOEXEC -r1 = openat(0xffffffffffffff9c, &(0x7f0000000000)='./file1\x00', 0x2, 0x0) -write(r1, &(0x7f0000000300)="01010101", 0x4) +execveat(0xffffffffffffff9c, &AUTO='./file1\x00', &AUTO=[0x0], &AUTO=[0x0], 0x0) # ENOEXEC +r1 = openat(0xffffffffffffff9c, &AUTO='./file1\x00', 0x2, 0x0) +write(r1, &AUTO="01010101", 0x4) close(r1) -execveat(0xffffffffffffff9c, &(0x7f0000000000)='./file1\x00', &(0x7f0000000100)=[0x0], &(0x7f0000000200)=[0x0], 0x0) # ENOENT -r2 = openat(0xffffffffffffff9c, &(0x7f0000000000)='./file0\x00', 0x42, 0x0) +execveat(0xffffffffffffff9c, &AUTO='./file1\x00', &AUTO=[0x0], &AUTO=[0x0], 0x0) # ENOENT +r2 = openat(0xffffffffffffff9c, &AUTO='./file0\x00', 0x42, 0x0) close(r2) -execveat(0xffffffffffffff9c, &(0x7f0000000000)='./file1\x00', &(0x7f0000000100)=[0x0], &(0x7f0000000200)=[0x0], 0x0) # EACCES -fchmodat(0xffffffffffffff9c, &(0x7f0000000000)='./file0\x00', 0x1ff) -execveat(0xffffffffffffff9c, &(0x7f0000000000)='./file1\x00', &(0x7f0000000100)=[0x0], &(0x7f0000000200)=[0x0], 0x0) # ENOEXEC +execveat(0xffffffffffffff9c, &AUTO='./file1\x00', &AUTO=[0x0], &AUTO=[0x0], 0x0) # EACCES +fchmodat(0xffffffffffffff9c, &AUTO='./file0\x00', 0x1ff) +execveat(0xffffffffffffff9c, &AUTO='./file1\x00', &AUTO=[0x0], &AUTO=[0x0], 0x0) # ENOEXEC -- cgit mrf-deployment