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

Unified Diff: tools/ipc_fuzzer/mutate/ipc_fuzzer_mut.py

Issue 1000373004: Combine traits for IPC mutation and generation fuzzing plus other refactoring. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Define frequency as a constant and reorder arguments in ipc_fuzzer_gen.py Created 5 years, 9 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/ipc_fuzzer/mutate/ipc_fuzzer_gen.py ('k') | tools/ipc_fuzzer/mutate/mutate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/ipc_fuzzer/mutate/ipc_fuzzer_mut.py
diff --git a/tools/ipc_fuzzer/mutate/ipc_fuzzer_mut.py b/tools/ipc_fuzzer/mutate/ipc_fuzzer_mut.py
index b1768136be05306e92212888055a0e4d880bdbbe..595caf1f9f2dd53e9472dd19492856f04235847a 100755
--- a/tools/ipc_fuzzer/mutate/ipc_fuzzer_mut.py
+++ b/tools/ipc_fuzzer/mutate/ipc_fuzzer_mut.py
@@ -17,9 +17,8 @@ import subprocess
import sys
import utils
+FUZZER_NAME_OPTION = '--fuzzer-name=mutate'
IPC_MESSAGE_UTIL_APPLICATION = 'ipc_message_util'
-IPC_MUTATE_APPLICATION = 'ipc_fuzzer_mutate'
-IPC_REPLAY_APPLICATION = 'ipc_fuzzer_replay'
IPCDUMP_MERGE_LIMIT = 50
class MutationalFuzzer:
@@ -32,14 +31,12 @@ class MutationalFuzzer:
self.ipc_message_util_binary = utils.application_name_for_platform(
IPC_MESSAGE_UTIL_APPLICATION)
- self.ipc_mutate_binary = utils.application_name_for_platform(
- IPC_MUTATE_APPLICATION)
- self.ipc_replay_binary = utils.application_name_for_platform(
- IPC_REPLAY_APPLICATION)
+ self.ipc_fuzzer_binary = utils.get_fuzzer_application_name()
+ self.ipc_replay_binary = utils.get_replay_application_name()
self.ipc_message_util_binary_path = os.path.join(
chrome_application_directory, self.ipc_message_util_binary)
- self.ipc_mutate_binary_path = os.path.join(
- chrome_application_directory, self.ipc_mutate_binary)
+ self.ipc_fuzzer_binary_path = os.path.join(
+ chrome_application_directory, self.ipc_fuzzer_binary)
self.ipc_replay_binary_path = os.path.join(
chrome_application_directory, self.ipc_replay_binary)
@@ -66,12 +63,13 @@ class MutationalFuzzer:
# Mutate tmp_ipcdump -> mutated_ipcdump.
cmd = [
- self.ipc_mutate_binary_path,
+ self.ipc_fuzzer_binary_path,
+ FUZZER_NAME_OPTION,
tmp_ipcdump_testcase,
mutated_ipcdump_testcase,
]
if subprocess.call(cmd):
- sys.exit('%s failed.' % self.ipc_mutate_binary)
+ sys.exit('%s failed.' % self.ipc_fuzzer_binary)
utils.create_flags_file(
mutated_ipcdump_testcase, self.ipc_replay_binary_path)
« no previous file with comments | « tools/ipc_fuzzer/mutate/ipc_fuzzer_gen.py ('k') | tools/ipc_fuzzer/mutate/mutate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698