aboutsummaryrefslogtreecommitdiffstats
path: root/executor/test.h
Commit message (Collapse)AuthorAgeFilesLines
* executor: add test_syzos() for arm64Alexander Potapenko2024-12-051-2/+5
| | | | | Make sure regressions in guest code validation are reported during testing rather than fuzzing.
* executor: arm: disable test_globAlexander Potapenko2024-12-051-0/+6
| | | | | | | | Glob() doesn't work on 32-bit ARM when run on a 64-bit system under QEMU: https://gitlab.com/qemu-project/qemu/-/issues/263 Not sure whether this is specific to tests running under qemu-user, or the ARM32 executor in the wild as well.
* executor: remove a tempnam() call from test.hAleksandr Nogikh2024-12-021-2/+0
| | | | It's no longer needed.
* executor: add Glob testDmitry Vyukov2024-11-261-0/+90
|
* pkg/fuzzer: remove signal rotationDmitry Vyukov2024-07-021-7/+0
| | | | | | | Signal rotation is intended to make the fuzzer re-discover flaky coverage in non flaky way. However, taking into accout that we get effectively the same effect after each manager restart, and that the fuzzer is overloaded with triage/smash jobs, it does not look to be worth it.
* executor: add runner modeDmitry Vyukov2024-06-241-1/+1
| | | | | | | Move all syz-fuzzer logic into syz-executor and remove syz-fuzzer. Also restore syz-runtest functionality in the manager. Update #4917 (sets most signal handlers to SIG_IGN)
* executor: refactor coverage filterDmitry Vyukov2024-06-241-26/+71
|
* executor: allow to run a single testDmitry Vyukov2024-06-051-1/+3
|
* executor: remove noshmem modeDmitry Vyukov2024-06-041-4/+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: fix coverfilter header sizeDmitry Vyukov2024-05-281-10/+9
| | | | | | Manager was switched to 64-bit PCs, but executor still expected 4-byte PC start in the header. Fix it and switch size to uint64 for simplicity as well.
* executor: minor coverage filter cleanupDmitry Vyukov2020-12-091-1/+6
| | | | | Slightly reduce number of ifdef's, define coverage_filter only in shmem mode and remove unnecessary cast.
* syz-manager/manager.go, executor/executor.cc: support coverage filterKaipeng Zeng2020-12-061-0/+34
|
* pkg/ifuzz/powerpc: add powerpc supportAlexey Kardashevskiy2020-11-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This adds KVM's syz_kvm_setup_cpu pseudo syscall. This adds placeholder for options (none implemented yet). This adds instruction generator for ifuzz; this also adds a few pseudo instructions to simulate super/hyper/ultracalls (a PPC64/pseries platform thing). The insns.go is generated from PowerISA_public.v3.0B.pdf [1] by a horrendous python3 script on top of pdftotext. The ISA covers POWER9 which is the latest available POWER CPU at the moment. The next ISA for POWER10 is quite different and we will deal with it later. The // comment after every instruction is a fixed opcode list for verification purposes. This does not define DecodeExt as there is no obvious replacement of the Intel XED library for POWERPC (gapstone-capstone, later, may be). [1] https://openpowerfoundation.org/?resource_lib=power-isa-version-3-0 Signed-off-by: Alexey Kardashevskiy <aik@linux.ibm.com>
* executor: warn about C89-style var declarationsDmitry Vyukov2020-08-141-5/+3
| | | | | | | | | | | | | | | | | We generally use the newer C99 var declarations combined with initialization because: - declarations are more local, reduced scope - fewer lines of code - less potential for using uninit vars and other bugs However, we have some relic code from times when we did not understand if we need to stick with C89 or not. Also some external contributions that don't follow style around. Add a static check for C89-style declarations and fix existing precedents. Akaros toolchain uses -std=gnu89 (or something) and does not allow variable declarations inside of for init statement. And we can't switch it to -std=c99 because Akaros headers are C89 themselves. So in common.h we need to declare loop counters outside of for.
* executor: fix bitfields for big-endian archAlexander Egorenkov2020-07-101-2/+11
| | | | | | | | Add bitfield tests for big-endian arch Issue: #1885 Signed-off-by: Alexander Egorenkov <Alexander.Egorenkov@ibm.com>
* ipc: fix endianness issuesAlexander Egorenkov2020-06-231-2/+2
| | | | | | | | Use native byte-order for IPC and program serialization. This way we will be able to support both little- and big-endian architectures. Signed-off-by: Alexander Egorenkov <Alexander.Egorenkov@ibm.com>
* executor: fix endianness problem in internet checksumAlexander Egorenkov2020-06-191-18/+18
| | | | | | | | | | | | | | | | csum_inet_update does not handle odd number of bytes on big-endian architectures correctly. When calculating the checksum of odd number of bytes, the last byte must be interpreted as LSB on little-endian architectures and as MSB on big-endian ones in a 16-bit half-word. Futhermore, the checksum tests assume that the underlying architecture is always little-endian. When a little-endian machine stores a calculated checksum into memory, then the checksum's bytes are automatically swapped. But this is NOT true on a big-endian architecture. Signed-off-by: Alexander Egorenkov <Alexander.Egorenkov@ibm.com>
* executor: fix clang-tidy warningsDmitry Vyukov2020-03-111-1/+1
|
* executor: fix handling of big-endian bitfieldsDmitry Vyukov2018-12-081-2/+2
| | | | | Currently we apply big-endian-ness and bitfield-ness in the wrong order in copyin. This leads to totally bogus result. Fix this.
* executor: fix strict aliasing violationsDmitry Vyukov2018-07-241-7/+16
| | | | | | | | | test_copyin does bad things. Fix that. executor/test.h: In function ‘int test_copyin()’: executor/common.h:299:16: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] *(type*)(addr) = (type)(val); \ ^
* executor: overhaulDmitry Vyukov2018-07-241-0/+212
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.