[PATCH 0/4] Introducing syscall fault injection for x86
Nahim El Atmani
nahim+dev at naam.me
Wed Jul 27 18:41:13 UTC 2016
This patch series introduce the syscall fault injection in strace. Fault
injection is a technique that allow one to - among other things - improve the
code coverage of a test by introducing faults. Without fault injection the
error handlers are often trusted as it, without proof of work because a complex
setup is often required to get into those failing conditions. The modest API
in this patch series introduce a simple way to make syscall fail based on user
input. The following example describe how to discard the second write ls try
to issue returning an EAGAIN:
./strace -e fault=write:2:EAGAIN ls
Finally, some work is still needed to get this work on every other
architectures strace support. Also, the fuzzy part have to be implemented, more
information on the third patch of this series.
Nahim El Atmani (4):
util.c: Add helper for string to int conversions
syscall.c: Add helpers for vector reallocation, syscall and errno
finder
Introduce syscall fault injection feature
tests: check syscall fault injection behavior and error handling
Makefile.am | 5 ++
configure.ac | 22 ++++-
defs.h | 26 ++++++
linux/i386/fault.h | 42 +++++++++
linux/x86_64/fault.h | 42 +++++++++
syscall.c | 220 +++++++++++++++++++++++++++++++++++++++++++++--
tests/Makefile.am | 13 +++
tests/fault.c | 112 ++++++++++++++++++++++++
tests/fault.test | 37 ++++++++
tests/fault_parsing.test | 65 ++++++++++++++
tests/is_x86.c | 42 +++++++++
util.c | 15 ++++
12 files changed, 632 insertions(+), 9 deletions(-)
create mode 100644 linux/i386/fault.h
create mode 100644 linux/x86_64/fault.h
create mode 100644 tests/fault.c
create mode 100755 tests/fault.test
create mode 100755 tests/fault_parsing.test
create mode 100644 tests/is_x86.c
--
Nahim El Atmani
More information about the Strace-devel
mailing list