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

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

Issue 2109853002: [IPC fuzzer] Properly generate clusterfuzz flags files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/scripts/ipc_fuzzer_gen.py ('k') | tools/ipc_fuzzer/scripts/utils.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/ipc_fuzzer/scripts/ipc_fuzzer_mut.py
diff --git a/tools/ipc_fuzzer/scripts/ipc_fuzzer_mut.py b/tools/ipc_fuzzer/scripts/ipc_fuzzer_mut.py
index 28d5239f1aafe38ab71ceeba0475672815ae1ec8..d7e7109a06e8f4021d90d0508912073fe9dc1ebc 100755
--- a/tools/ipc_fuzzer/scripts/ipc_fuzzer_mut.py
+++ b/tools/ipc_fuzzer/scripts/ipc_fuzzer_mut.py
@@ -22,23 +22,19 @@ IPC_MESSAGE_UTIL_APPLICATION = 'ipc_message_util'
IPCDUMP_MERGE_LIMIT = 50
class MutationalFuzzer:
- def parse_arguments(self):
+ def __init__(self):
self.args = utils.parse_arguments()
- def set_application_paths(self):
chrome_application_path = utils.get_application_path()
chrome_application_directory = os.path.dirname(chrome_application_path)
self.ipc_message_util_binary = utils.application_name_for_platform(
IPC_MESSAGE_UTIL_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_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)
def set_corpus(self):
# Corpus should be set per job as a fuzzer-specific environment variable.
@@ -76,19 +72,17 @@ class MutationalFuzzer:
if subprocess.call(cmd):
sys.exit('%s failed.' % self.ipc_fuzzer_binary)
- utils.create_flags_file(
- mutated_ipcdump_testcase, self.ipc_replay_binary_path)
+ utils.create_flags_file(mutated_ipcdump_testcase)
os.remove(tmp_ipcdump_testcase)
def main(self):
- self.parse_arguments()
- self.set_application_paths()
self.set_corpus()
for _ in xrange(self.args.no_of_files):
self.create_mutated_ipcdump_testcase()
return 0
+
if __name__ == "__main__":
fuzzer = MutationalFuzzer()
sys.exit(fuzzer.main())
« no previous file with comments | « tools/ipc_fuzzer/scripts/ipc_fuzzer_gen.py ('k') | tools/ipc_fuzzer/scripts/utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698