aboutsummaryrefslogtreecommitdiffstats
path: root/executor/common.h
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2021-09-03 16:20:07 +0000
committerAleksandr Nogikh <wp32pw@gmail.com>2021-09-22 15:40:02 +0200
commit1c202847db0380015a8920bfd21375c2d9f28ddb (patch)
tree6693da3a936398a9ac6678842ac181c5f0e3e429 /executor/common.h
parenta7ce77be27d8e3728b97122a005bc5b23298cfc3 (diff)
all: refactor fault injection into call props
Now that call properties mechanism is implemented, we can refactor fault injection. Unfortunately, it is impossible to remove all traces of the previous apprach. In reprolist and while performing syz-ci jobs, syzkaller still needs to parse the old format. Remove the old prog options-based approach whenever possible and replace it with the use of call properties.
Diffstat (limited to 'executor/common.h')
-rw-r--r--executor/common.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/executor/common.h b/executor/common.h
index 17c680b21..3c817a7e8 100644
--- a/executor/common.h
+++ b/executor/common.h
@@ -271,13 +271,19 @@ static void __attribute__((noinline)) remove_dir(const char* dir)
#endif
#if !GOOS_linux && !GOOS_netbsd
-#if SYZ_EXECUTOR
+#if SYZ_EXECUTOR || SYZ_FAULT
static int inject_fault(int nth)
{
return 0;
}
#endif
+#if SYZ_FAULT
+static void setup_fault()
+{
+}
+#endif
+
#if SYZ_EXECUTOR
static int fault_injected(int fail_fd)
{