aboutsummaryrefslogtreecommitdiffstats
path: root/executor/common_test.h
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2024-07-22 09:59:09 +0200
committerAleksandr Nogikh <nogikh@google.com>2024-07-22 09:38:18 +0000
commitf063dfd966f00f90fbae94d179f26cf36fea3f5b (patch)
tree2e58f27f65a6f9d2dece091ddcef3a23d8cefbb0 /executor/common_test.h
parent7538bc297d62e223e4216db0e039be296aff4553 (diff)
executor: fix writing of remote coverage
We never reset remote coverage, so if there is one block, we will write it after every call and multiple times at the end. It can lead to "too many calls in output" and just writes quadratic amount of coverage/signal. Reset remote coverage after writing.
Diffstat (limited to 'executor/common_test.h')
-rw-r--r--executor/common_test.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/executor/common_test.h b/executor/common_test.h
index dc39fa326..f5f54d9ee 100644
--- a/executor/common_test.h
+++ b/executor/common_test.h
@@ -180,6 +180,17 @@ static long syz_inject_cover(volatile long a, volatile long b)
#endif
#endif
+#if SYZ_EXECUTOR || __NR_syz_inject_remote_cover
+static long syz_inject_remote_cover(volatile long a, volatile long b)
+#if SYZ_EXECUTOR
+ ; // defined in executor_test.h
+#else
+{
+ return 0;
+}
+#endif
+#endif
+
#if SYZ_EXECUTOR || SYZ_SYSCTL
static void setup_sysctl()
{