aboutsummaryrefslogtreecommitdiffstats
path: root/prog/export_test.go
Commit message (Collapse)AuthorAgeFilesLines
* all: remove loop variables scopingTaras Madan2025-02-171-2/+0
|
* all: use min/max functionsDmitry Vyukov2025-01-171-5/+1
| | | | They are shorter, more readable, and don't require temp vars.
* pkg/testutil: move iterCount from prog packageDmitry Vyukov2022-12-221-13/+2
|
* pkg/testutil: add RandSource helperDmitry Vyukov2022-11-231-17/+2
| | | | | The code to send rand source is dublicated in several packages. Move it to testutil package.
* prog: allow to use fixed test seed w/o rebuilding testsDmitry Vyukov2022-06-031-0/+4
| | | | | | Currently reproducing crashed with a particular seed requires changing sources and rebuilding the test. Make it possible to provide seed via env var.
* pkg/testutil: add packageDmitry Vyukov2021-12-211-2/+4
| | | | | | | | Add package with RaceEnabled const that can be used in test to skip long tests in race mode. Switch existing tests to use the new package. Update #2886
* prog: reduce size of tests in race modeDmitry Vyukov2020-10-011-0/+11
| | | | | More race timeouts on CI. Exclude more tests. This reduces prog test time fron 81 to 15 sec with GOMAXPROCS=1.
* all: reformat codeDmitry Vyukov2020-05-081-1/+1
|
* all: replace TRAVIS env var with CIDmitry Vyukov2020-05-071-1/+1
| | | | | | | | In preparation to running some tests as github actions. Both Travis and Github define CI env var, while TRAVIS is, well, too Travis-specific. Update #1699
* prog: export deserialization test helper for sys/{linux,openbsd}Dmitry Vyukov2020-03-171-9/+1
| | | | | sys/{linux,openbsd} duplicate deserialization test logic as well. Export and reuse the existing helper function.
* prog: measure memory allocation in benchmarksDmitry Vyukov2019-08-131-0/+11
| | | | | | Enable ReportAllocs. Also factor out common code into a helper function (duplicated in 3 places now).
* prog: fix minimization bugsDmitry Vyukov2019-07-021-2/+2
| | | | | | | | | | Fix several nasty bugs in minimization that could lead to almost arbitrary results. These bugs affected both crash minimization and corpus population. Extend the randomized test to catch these bugs. Add additional asserts to code to catch similar bugs in future. Reported-by @xairy
* all: fix warnings pointed to by golangci-lintDmitry Vyukov2019-03-281-1/+1
| | | | Update #977
* prog, pkg/{csource,ifuzz,ipc,repro}: make tests deterministic on travisDmitry Vyukov2019-01-021-0/+4
| | | | | Don't use random seed on travis as it produces flaky coverage reports, and probably generally better for CI setting.
* prog: parallelize testsDmitry Vyukov2018-05-041-7/+16
| | | | | Parallelize more tests and reduce number of iterations in random tests under race detector.
* prog: test TransitivelyEnabledCalls on all targetsDmitry Vyukov2018-05-031-0/+10
| | | | Fixes #585
* prog: rework address allocationDmitry Vyukov2018-02-191-7/+8
| | | | | | | | | | | | 1. mmap all memory always, without explicit mmap calls in the program. This makes lots of things much easier and removes lots of code. Makes mmap not a special syscall and allows to fuzz without mmap enabled. 2. Change address assignment algorithm. Current algorithm allocates unmapped addresses too frequently and allows collisions between arguments of a single syscall. The new algorithm analyzes actual allocations in the program and places new arguments at unused locations.
* sys/linux: extend netfilter descriptionsDmitry Vyukov2018-01-271-0/+1
|
* pkg/compiler: allow unions with only 1 fieldDmitry Vyukov2018-01-271-0/+20
| | | | | | | | | | | | | Unions with only 1 field are not actually unions, and can always be replaced with the option type. However, they are still useful when there will be more options in future but currently only 1 is described. Alternatives are: - not using union (but then all existing programs will be broken when union is finally introduced) - adding a fake field (ugly and reduces fuzzer efficiency) Allow unions with only 1 field.
* sys: move test syscalls to a separate targetDmitry Vyukov2017-12-171-5/+14
| | | | | | We have them in linux solely for historical reasons. Fixes #462
* sys/linux: improve AF_ALG alg name generationDmitry Vyukov2017-11-241-17/+1
| | | | | | | | | There is effectively infinite number of possible crypto algorithm names due to templates. Plus there is tricky relation between algorithms and algorithm type names. This change adds custom mutator for sockaddr_alg struct to improve variance in generated algorithms.
* prog: remove default target and all global stateDmitry Vyukov2017-09-151-5/+11
| | | | | | 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-0/+47
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