Skip to content

Commit

Permalink
Add centipede to DEFAULT_ENGINES (#4040)
Browse files Browse the repository at this point in the history
Fixes #11964.
@kasper93 kindly pointed out a misconfiguration of `Centipede,` which
blocked `Centipede` from being used on all projects by default.
This PR fixes it.
  • Loading branch information
DonggeLiu authored Jun 21, 2024
1 parent 446d314 commit 153c555
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/clusterfuzz/_internal/cron/project_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def job_name(self, project_name, config_suffix):

DEFAULT_ARCHITECTURES = ['x86_64']
DEFAULT_SANITIZERS = ['address', 'undefined']
DEFAULT_ENGINES = ['libfuzzer', 'afl', 'honggfuzz']
DEFAULT_ENGINES = ['libfuzzer', 'afl', 'honggfuzz', 'centipede']


def _to_experimental_job(job_info):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,29 @@ def test_execute(self):
'AUTOMATIC_LABELS = Proj-lib7,Engine-libfuzzer,custom\n'
'FILE_GITHUB_ISSUE = False\n')

job = data_types.Job.query(
data_types.Job.name == 'centipede_asan_lib1').get()
self.assertIsNotNone(job)
self.assertEqual(job.project, 'lib1')
self.assertEqual(job.platform, 'LIB1_LINUX')
self.assertCountEqual(job.templates, ['engine_asan', 'centipede'])
self.assertEqual(
job.environment_string, 'RELEASE_BUILD_BUCKET_PATH = '
'gs://clusterfuzz-builds-centipede/lib1/lib1-none-([0-9]+).zip\n'
'PROJECT_NAME = lib1\n'
'SUMMARY_PREFIX = lib1\n'
'MANAGED = True\n'
'EXTRA_BUILD_BUCKET_PATH = '
'gs://clusterfuzz-builds-centipede/lib1/lib1-address-([0-9]+).zip\n'
'REVISION_VARS_URL = https://commondatastorage.googleapis.com/'
'clusterfuzz-builds-centipede/lib1/lib1-address-%s.srcmap.json\n'
'FUZZ_LOGS_BUCKET = lib1-logs.clusterfuzz-external.appspot.com\n'
'CORPUS_BUCKET = lib1-corpus.clusterfuzz-external.appspot.com\n'
'QUARANTINE_BUCKET = lib1-quarantine.clusterfuzz-external.appspot.com\n'
'BACKUP_BUCKET = lib1-backup.clusterfuzz-external.appspot.com\n'
'AUTOMATIC_LABELS = Proj-lib1,Engine-centipede\n'
'FILE_GITHUB_ISSUE = False\n')

job = data_types.Job.query(
data_types.Job.name == 'centipede_asan_lib9').get()
self.assertIsNotNone(job)
Expand Down Expand Up @@ -584,6 +607,7 @@ def test_execute(self):
centipede = data_types.Fuzzer.query(
data_types.Fuzzer.name == 'centipede').get()
self.assertCountEqual(centipede.jobs, [
'centipede_asan_lib1',
'centipede_asan_lib9',
])

Expand Down Expand Up @@ -1317,6 +1341,7 @@ def test_execute(self):
('LIB7_LINUX', 'libFuzzer', 'libfuzzer_asan_lib7'),
('LIB8_LINUX', 'libFuzzer', 'libfuzzer_nosanitizer_i386_lib8'),
('LIB8_LINUX', 'libFuzzer', 'libfuzzer_nosanitizer_lib8'),
('LIB1_LINUX', 'centipede', 'centipede_asan_lib1'),
('LIB9_LINUX', 'centipede', 'centipede_asan_lib9'),
])

Expand Down Expand Up @@ -1571,6 +1596,27 @@ def test_execute(self):
'entity_name': 'libfuzzer_nosanitizer_i386_lib8',
'auto_cc': 1
},
{
'entity_kind': 1,
'is_prefix': False,
'auto_cc': 1,
'entity_name': 'centipede_asan_lib1',
'email': '[email protected]'
},
{
'entity_kind': 1,
'is_prefix': False,
'auto_cc': 1,
'entity_name': 'centipede_asan_lib1',
'email': '[email protected]'
},
{
'entity_kind': 1,
'is_prefix': False,
'auto_cc': 1,
'entity_name': 'centipede_asan_lib1',
'email': '[email protected]'
},
{
'entity_kind': 1,
'is_prefix': False,
Expand Down

0 comments on commit 153c555

Please sign in to comment.