summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authormbarbella <mbarbella@chromium.org>2015-04-20 09:56:45 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-20 16:57:01 +0000
commitaaf8a9c87a673a1bf58e656b2cbf6ed821d17224 (patch)
treeb8cac77ff80edbaeacd27bb8d961b98668809941 /tools
parentea8558c7f8751333a378549d0bd72b3aa98e7abe (diff)
downloadchromium_src-aaf8a9c87a673a1bf58e656b2cbf6ed821d17224.zip
chromium_src-aaf8a9c87a673a1bf58e656b2cbf6ed821d17224.tar.gz
chromium_src-aaf8a9c87a673a1bf58e656b2cbf6ed821d17224.tar.bz2
IPC fuzzer: Create a helper to include all null message macros.
R=inferno@chromium.org NOTRY=true NOPRESUBMIT=true Review URL: https://codereview.chromium.org/1084003004 Cr-Commit-Position: refs/heads/master@{#325862}
Diffstat (limited to 'tools')
-rw-r--r--tools/ipc_fuzzer/fuzzer/fuzzer.cc8
-rw-r--r--tools/ipc_fuzzer/message_lib/all_message_null_macros.h9
-rw-r--r--tools/ipc_fuzzer/message_lib/message_names.cc2
-rw-r--r--tools/ipc_fuzzer/message_tools/message_list.cc3
4 files changed, 15 insertions, 7 deletions
diff --git a/tools/ipc_fuzzer/fuzzer/fuzzer.cc b/tools/ipc_fuzzer/fuzzer/fuzzer.cc
index 0d39e2b..d6e324a 100644
--- a/tools/ipc_fuzzer/fuzzer/fuzzer.cc
+++ b/tools/ipc_fuzzer/fuzzer/fuzzer.cc
@@ -25,7 +25,7 @@
// First include of all message files to provide basic types.
#include "tools/ipc_fuzzer/message_lib/all_messages.h"
-#include "ipc/ipc_message_null_macros.h"
+#include "tools/ipc_fuzzer/message_lib/all_message_null_macros.h"
#if defined(COMPILER_GCC)
#define PRETTY_FUNCTION __PRETTY_FUNCTION__
@@ -1953,7 +1953,7 @@ struct FuzzTraits<webrtc::MouseCursor> {
// Bring them into existence.
#include "tools/ipc_fuzzer/message_lib/all_messages.h"
-#include "ipc/ipc_message_null_macros.h"
+#include "tools/ipc_fuzzer/message_lib/all_message_null_macros.h"
// Redefine macros to generate generating funtions
#undef IPC_MESSAGE_DECL
@@ -2068,7 +2068,7 @@ struct FuzzTraits<webrtc::MouseCursor> {
#define IPC_MEMBERS_OUT_5() NULL, NULL, NULL, NULL, NULL
#include "tools/ipc_fuzzer/message_lib/all_messages.h"
-#include "ipc/ipc_message_null_macros.h"
+#include "tools/ipc_fuzzer/message_lib/all_message_null_macros.h"
void PopulateFuzzerFunctionVector(
FuzzerFunctionVector* function_vector) {
@@ -2079,7 +2079,7 @@ void PopulateFuzzerFunctionVector(
}
// Redefine macros to register fuzzing functions into map.
-#include "ipc/ipc_message_null_macros.h"
+#include "tools/ipc_fuzzer/message_lib/all_message_null_macros.h"
#undef IPC_MESSAGE_DECL
#define IPC_MESSAGE_DECL(kind, type, name, in, out, ilist, olist) \
(*map)[static_cast<uint32>(name::ID)] = fuzzer_for_##name;
diff --git a/tools/ipc_fuzzer/message_lib/all_message_null_macros.h b/tools/ipc_fuzzer/message_lib/all_message_null_macros.h
new file mode 100644
index 0000000..2f56371
--- /dev/null
+++ b/tools/ipc_fuzzer/message_lib/all_message_null_macros.h
@@ -0,0 +1,9 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// No include guard, may be included multiple times.
+
+// Include all null macros.
+#include "chrome/common/safe_browsing/ipc_protobuf_message_null_macros.h"
+#include "ipc/ipc_message_null_macros.h"
diff --git a/tools/ipc_fuzzer/message_lib/message_names.cc b/tools/ipc_fuzzer/message_lib/message_names.cc
index b80b388..f4f58499 100644
--- a/tools/ipc_fuzzer/message_lib/message_names.cc
+++ b/tools/ipc_fuzzer/message_lib/message_names.cc
@@ -5,7 +5,7 @@
#include "tools/ipc_fuzzer/message_lib/message_names.h"
#include "tools/ipc_fuzzer/message_lib/all_messages.h"
-#include "ipc/ipc_message_null_macros.h"
+#include "tools/ipc_fuzzer/message_lib/all_message_null_macros.h"
#undef IPC_MESSAGE_DECL
#define IPC_MESSAGE_DECL(kind, type, name, in, out, ilist, olist) \
names.Add(static_cast<uint32>(name::ID), #name);
diff --git a/tools/ipc_fuzzer/message_tools/message_list.cc b/tools/ipc_fuzzer/message_tools/message_list.cc
index 66e575d..d23ac29 100644
--- a/tools/ipc_fuzzer/message_tools/message_list.cc
+++ b/tools/ipc_fuzzer/message_tools/message_list.cc
@@ -25,8 +25,7 @@ struct msginfo {
};
// Redefine macros to generate table
-#include "chrome/common/safe_browsing/ipc_protobuf_message_null_macros.h"
-#include "ipc/ipc_message_null_macros.h"
+#include "tools/ipc_fuzzer/message_lib/all_message_null_macros.h"
#undef IPC_MESSAGE_DECL
#define IPC_MESSAGE_DECL(kind, type, name, in, out, ilist, olist) \
{ #name, __FILE__, IPC_MESSAGE_ID(), in, out },