aboutsummaryrefslogtreecommitdiffstats
path: root/prog/encodingexec_test.go
Commit message (Collapse)AuthorAgeFilesLines
* prog: support opt for proc typesDmitry Vyukov2018-01-061-0/+17
|
* pkg/csource: fix handling of proc typesDmitry Vyukov2017-12-221-85/+170
| | | | | | | | | | Generated program always uses pid=0 even when there are multiple processes. Make each process use own pid. Unfortunately required to do quite significant changes to prog, because the current format only supported fixed pid. Fixes #490
* prog: use dense indexes for copyout instructionsDmitry Vyukov2017-12-171-22/+22
| | | | Fixes #174
* prog: add DeserializeExecDmitry Vyukov2017-12-171-127/+153
| | | | | | | | | Factor out program parsing from pkg/csource. csource code that parses program and at the same time formats output is very messy and complex. New aproach also allows to understand e.g. when a call has copyout instructions which is useful for better C source output.
* sys: move test syscalls to a separate targetDmitry Vyukov2017-12-171-1/+1
| | | | | | We have them in linux solely for historical reasons. Fixes #462
* pkg/ipc: don't send program padding to executorDmitry Vyukov2017-10-121-2/+2
| | | | | | Currently we always send 2MB of data to executor in ipc_simple.go. Send only what's consumed by the program, and don't send the trailing zeros. Serialized programs usually take only few KBs.
* prog: remove default target and all global stateDmitry Vyukov2017-09-151-10/+8
| | | | | | Now each prog function accepts the desired target explicitly. No global, implicit state involved. This is much cleaner and allows cross-OS/arch testing, etc.
* prog, sys: move types to progDmitry Vyukov2017-09-051-5/+8
| | | | | | | | | | | Large overhaul moves syscalls and arg types from sys to prog. Sys package now depends on prog and contains only generated descriptions of syscalls. Introduce prog.Target type that encapsulates all targer properties, like syscall list, ptr/page size, etc. Also moves OS-dependent pieces like mmap call generation from prog to sys. Update #191
* prog: dot-import sysDmitry Vyukov2017-09-051-2/+2
| | | | In preparation for moving sys types to prog to reduce later diffs.
* sys: rename Call to SyscallDmitry Vyukov2017-09-051-1/+1
| | | | | In preparation for moving sys types to prog to avoid confusion between sys.Call and prog.Call.
* sys, pkg/compiler: move padding computation to compilerDmitry Vyukov2017-09-041-1/+1
| | | | This makes types constant during execution, everything is precomputed.
* prog: move ptrSize const to testDmitry Vyukov2017-09-041-0/+2
| | | | It is used only by a single test. Remove it from non-test code.
* pkg/compiler: check and generate typesDmitry Vyukov2017-09-021-7/+7
| | | | | | Move most of the logic from sysgen to pkg/compiler. Update #217
* prog: fix encoding for exec of result argsAndrey Konovalov2017-08-011-0/+7
| | | | | | ResultArg might have const value. Also add a test.
* all: spot optimizationsDmitry Vyukov2017-01-201-2/+12
| | | | | | | | | | | | | A bunch of spot optmizations after cpu/memory profiling: 1. Optimize hot-path coverage comparison in fuzzer. 2. Don't allocate and copy serialized program, serialize directly into shmem. 3. Reduce allocations during parsing of output shmem (encoding/binary sucks). 4. Don't allocate and copy coverage arrays, refer directly to the shmem region (we are not going to mutate them). 5. Don't validate programs outside of tests, validation allocates tons of memory. 6. Replace the choose primitive with simpler switches. Choose allocates fullload of memory (for int, func, and everything the func refers). 7. Other minor optimizations.
* prog, sys: fix padding varlen structsAndrey Konovalov2017-01-191-0/+9
|
* prog: add tests for alignment and offsetsAndrey Konovalov2017-01-181-2/+74
|
* prog: add bitfields to templatesAndrey Konovalov2017-01-171-36/+51
| | | | | | Now it's possible to use `int32:18` to denote a bitfield of size 18 as a struct field. This fixes #72.
* sys: add proc type to denote per proccess integersAndrey Konovalov2016-11-251-2/+2
|
* Add tests for big-endian intsAndrey Konovalov2016-10-131-0/+22
|
* Add exec serialize tests for array[int8]Andrey Konovalov2016-10-041-0/+19
|
* sys: add padding to structs againDmitry Vyukov2016-09-291-2/+24
| | | | | | | | Struct padding was accidentially lost after: 852e3d2eae98a913b7ec91822ba4dc61059a6955 Restore it. Now with tests. Fixes #78
* prog: add a test for union layoutDmitry Vyukov2016-09-291-0/+10
| | | | | This is a retrospect tests for the union bug fixed in: 91eb1b922fd95bfaa5d8b0aad16902a73f3fe3d1
* sys, prog: add tests for description parsing and serializationDmitry Vyukov2016-09-281-3/+57
| | | | | | | | | | Add sys/test.txt file with description of syscalls for tests. These descriptions can be used to ensure that we can parse everything we clain we can parse. Use these descriptions to write several tests for exec serialization (one test shows that alignment handling is currently incorrect). These test descriptions can also be used to write e.g. mutation tests. Update #78
* prog: add a simple test for exec encodingDmitry Vyukov2016-09-241-0/+48