Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Side by Side Diff: tools/ipc_fuzzer/fuzzer/fuzzer.cc

Issue 1499813003: Reland "Added an extra sync token field for extra command buffer..." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed sync token fuzzer parameters Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ppapi/proxy/ppapi_command_buffer_proxy.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <iostream> 5 #include <iostream>
6 #include <set> 6 #include <set>
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 return true; 1197 return true;
1198 } 1198 }
1199 }; 1199 };
1200 1200
1201 template <> 1201 template <>
1202 struct FuzzTraits<gpu::SyncToken> { 1202 struct FuzzTraits<gpu::SyncToken> {
1203 static bool Fuzz(gpu::SyncToken* p, Fuzzer* fuzzer) { 1203 static bool Fuzz(gpu::SyncToken* p, Fuzzer* fuzzer) {
1204 bool verified_flush = false; 1204 bool verified_flush = false;
1205 gpu::CommandBufferNamespace namespace_id = 1205 gpu::CommandBufferNamespace namespace_id =
1206 gpu::CommandBufferNamespace::INVALID; 1206 gpu::CommandBufferNamespace::INVALID;
1207 int32_t extra_data_field = 0;
1207 uint64_t command_buffer_id = 0; 1208 uint64_t command_buffer_id = 0;
1208 uint64_t release_count = 0; 1209 uint64_t release_count = 0;
1209 1210
1210 if (!FuzzParam(&verified_flush, fuzzer)) 1211 if (!FuzzParam(&verified_flush, fuzzer))
1211 return false; 1212 return false;
1212 if (!FuzzParam(&namespace_id, fuzzer)) 1213 if (!FuzzParam(&namespace_id, fuzzer))
1213 return false; 1214 return false;
1215 if (!FuzzParam(&extra_data_field, fuzzer))
1216 return false;
1214 if (!FuzzParam(&command_buffer_id, fuzzer)) 1217 if (!FuzzParam(&command_buffer_id, fuzzer))
1215 return false; 1218 return false;
1216 if (!FuzzParam(&release_count, fuzzer)) 1219 if (!FuzzParam(&release_count, fuzzer))
1217 return false; 1220 return false;
1218 1221
1219 p->Clear(); 1222 p->Clear();
1220 p->Set(namespace_id, command_buffer_id, release_count); 1223 p->Set(namespace_id, extra_data_field, command_buffer_id, release_count);
1221 if (verified_flush) 1224 if (verified_flush)
1222 p->SetVerifyFlush(); 1225 p->SetVerifyFlush();
1223 return true; 1226 return true;
1224 } 1227 }
1225 }; 1228 };
1226 1229
1227 template <> 1230 template <>
1228 struct FuzzTraits<gpu::MailboxHolder> { 1231 struct FuzzTraits<gpu::MailboxHolder> {
1229 static bool Fuzz(gpu::MailboxHolder* p, Fuzzer* fuzzer) { 1232 static bool Fuzz(gpu::MailboxHolder* p, Fuzzer* fuzzer) {
1230 if (!FuzzParam(&p->mailbox, fuzzer)) 1233 if (!FuzzParam(&p->mailbox, fuzzer))
(...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after
2123 #include "tools/ipc_fuzzer/message_lib/all_message_null_macros.h" 2126 #include "tools/ipc_fuzzer/message_lib/all_message_null_macros.h"
2124 #undef IPC_MESSAGE_DECL 2127 #undef IPC_MESSAGE_DECL
2125 #define IPC_MESSAGE_DECL(kind, type, name, in, out, ilist, olist) \ 2128 #define IPC_MESSAGE_DECL(kind, type, name, in, out, ilist, olist) \
2126 (*map)[static_cast<uint32>(name::ID)] = fuzzer_for_##name; 2129 (*map)[static_cast<uint32>(name::ID)] = fuzzer_for_##name;
2127 2130
2128 void PopulateFuzzerFunctionMap(FuzzerFunctionMap* map) { 2131 void PopulateFuzzerFunctionMap(FuzzerFunctionMap* map) {
2129 #include "tools/ipc_fuzzer/message_lib/all_messages.h" 2132 #include "tools/ipc_fuzzer/message_lib/all_messages.h"
2130 } 2133 }
2131 2134
2132 } // namespace ipc_fuzzer 2135 } // namespace ipc_fuzzer
OLDNEW
« no previous file with comments | « ppapi/proxy/ppapi_command_buffer_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698