aboutsummaryrefslogtreecommitdiffstats
path: root/executor/executor_test.h
Commit message (Collapse)AuthorAgeFilesLines
* pkg/rpcserver: move kernel test/data range checks from executorDmitry Vyukov2024-07-011-36/+27
| | | | | | | | | | | | | | | | | We see some errors of the form: SYZFAIL: coverage filter is full pc=0x80007000c0008 regions=[0xffffffffbfffffff 0x243fffffff 0x143fffffff 0xc3fffffff] alloc=156 Executor shouldn't send non kernel addresses in signal, but somehow it does. It can happen if the VM memory is corrupted, or if the test program does something very nasty (e.g. discovers the output region and writes to it). It's not possible to reliably filter signal in the tested VM. Move all of the filtering logic to the host. Fixes #4942
* executor: always return some coverage for test OSDmitry Vyukov2024-06-281-5/+10
| | | | This allows to enable test executor with coverage.
* executor: don't trace PCs as comparisonsDmitry Vyukov2024-06-281-1/+2
| | | | | | Currnetly we always write PCs into the buffer even if tracing comparisons. Such bogus data will fail comparison consistentcy checks (type/pc) and executor will crash. Don't trace PCs as comparisons.
* pkg/runtest: test feature detectionDmitry Vyukov2024-06-271-0/+19
| | | | | Fail some features in various ways for test OS, and check that features are detected properly.
* executor: set PR_SET_PDEATHSIG for TestOSAleksandr Nogikh2024-06-261-0/+11
| | | | | | | Otherwise we may leave orphaned executor process children, which prevent the cleanup of the executor directory. Closes #4920.
* executor: factor out is_kernel_pc helperDmitry Vyukov2024-06-111-8/+19
| | | | Factor out is_kernel_pc helper and add kernel pc range for test OS for testing.
* executor: add end-to-end coverage/signal/comparisons testDmitry Vyukov2024-06-111-2/+23
|
* executor: remove noshmem modeDmitry Vyukov2024-06-041-2/+0
| | | | | | | | | All OSes we have now support shmem. Support for Fuchia/Starnix/Windows wasn't implemented, but generally they support shared memory. Remove all of the complexity and code associated with noshmem mode. If/when we revive these OSes, it's easier to properly implement shmem mode for them.
* executor: collect coverage for the test OSAleksandr Nogikh2024-03-121-2/+77
| | | | | Collect PC coverage like it's done by KCOV. This will help write better tests for the fuzzer.
* executor: better errors for failed mmapsDmitry Vyukov2022-10-211-2/+3
| | | | | | A fixed-address mmap can fail completely or return a different address. Log what it was. Based on: https://groups.google.com/g/syzkaller/c/lto00RwlDIQ
* executor: change syscall argument type to intptr_tmunjinoo2019-05-071-1/+1
| | | | | The type size of long depends on compiler. Therefore, changing to intptr_t makes it depends on architecture.
* executor: overhaulDmitry Vyukov2018-07-241-0/+19
Make as much code as possible shared between all OSes. In particular main is now common across all OSes. Make more code shared between executor and csource (in particular, loop function and threaded execution logic). Also make loop and threaded logic shared across all OSes. Make more posix/unix code shared across OSes (e.g. signal handling, pthread creation, etc). Plus other changes along similar lines. Also support test OS in executor (based on portable posix) and add 4 arches that cover all execution modes (fork server/no fork server, shmem/no shmem). This change paves way for testing of executor code and allows to preserve consistency across OSes and executor/csource.