aboutsummaryrefslogtreecommitdiffstats
path: root/executor/test.h
Commit message (Collapse)AuthorAgeFilesLines
* 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.