summaryrefslogtreecommitdiff
path: root/fuzz/fuzz_config.h
diff options
context:
space:
mode:
authorAllen Webb <allenwebb@google.com>2018-08-17 11:31:39 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-08-22 16:02:19 -0700
commit625acc6b7c7455b0f7c6ad49f467737ce64b37eb (patch)
treef9786735eb02c8e448ddcd02718ca4b833b9278a /fuzz/fuzz_config.h
parent26708ffa05ee1fc88bd754ddb959499acea1c41d (diff)
downloadchrome-ec-625acc6b7c7455b0f7c6ad49f467737ce64b37eb.tar.gz
Move fuzzing tests into a fuzz subfolder.
BRANCH=none CQ-DEPEND=CL:*664115 BUG=chromium:876582 TEST=make -j buildall && make -j buildfuzztests Change-Id: Iade5e5138f495e6b3b99ec16f1a467861ade5537 Signed-off-by: Allen Webb <allenwebb@google.com> Reviewed-on: https://chromium-review.googlesource.com/1180179 Reviewed-by: Mattias Nissler <mnissler@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Diffstat (limited to 'fuzz/fuzz_config.h')
-rw-r--r--fuzz/fuzz_config.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/fuzz/fuzz_config.h b/fuzz/fuzz_config.h
new file mode 100644
index 0000000000..6244340c7e
--- /dev/null
+++ b/fuzz/fuzz_config.h
@@ -0,0 +1,29 @@
+/* Copyright 2018 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/* Fuzzer target config flags */
+
+#ifndef __FUZZ_FUZZ_CONFIG_H
+#define __FUZZ_FUZZ_CONFIG_H
+#ifdef TEST_FUZZ
+
+/* Disable hibernate: We never want to exit while fuzzing. */
+#undef CONFIG_HIBERNATE
+
+#ifdef TEST_HOST_COMMAND_FUZZ
+#undef CONFIG_HOSTCMD_DEBUG_MODE
+
+/* Defining this makes fuzzing slower, but exercises additional code paths. */
+#define FUZZ_HOSTCMD_VERBOSE
+
+#ifdef FUZZ_HOSTCMD_VERBOSE
+#define CONFIG_HOSTCMD_DEBUG_MODE HCDEBUG_PARAMS
+#else
+#define CONFIG_HOSTCMD_DEBUG_MODE HCDEBUG_OFF
+#endif /* ! FUZZ_HOSTCMD_VERBOSE */
+#endif /* TEST_HOST_COMMAND_FUZZ */
+
+#endif /* TEST_FUZZ */
+#endif /* __TEST_TEST_CONFIG_H */