Skip to content

Conversation

@mi-ac
Copy link
Collaborator

@mi-ac mi-ac commented Feb 11, 2026

We already renamed "fuzz-" test cases from crash tests, so that clusterfuzz doesn't confuse them with output cases.

This change expands this functionality to all synced folders, also external repos.

BUG=http://b/379684065


def rename_testcase_files(directory):
# Rename all fuzzed testcase files as regular files.
for root, _, files in os.walk(directory):
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This moved from above 1:1.

'LayoutTests')

test_folders = [
'CrashTests',
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The crash tests are included here, so this preserves the functionality we had before, where we called the renaming loop within the unpack_crash_testcases function.

@mi-ac mi-ac requested review from javanlacerda and letitz February 11, 2026 13:54
@javanlacerda
Copy link
Collaborator

Could you run yapf -p -i src/clusterfuzz/_internal/cron/chrome_tests_syncer.py for fixing the lint.

raise RuntimeError(f'Failed to rename testcase {file_path}') from e


def clean_up_filenames(tests_directory, test_folders):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this function being called?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch :) - it's called now

@mi-ac mi-ac force-pushed the sync4 branch 2 times, most recently from 4bf921d to 0f96ecc Compare February 11, 2026 14:05
Copy link
Collaborator

@javanlacerda javanlacerda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any unit tests that could be created for checking this change?

@mi-ac
Copy link
Collaborator Author

mi-ac commented Feb 11, 2026

Is there any unit tests that could be created for checking this change?

Not that I know of. If there were existing testing, I'd be happy to add something. But I'm not enthusiastic to be the first to set this up.

However, breaking the test-syncer is somewhat low risk. If something doesn't work, we can revert. Then we don't have an archive for a day.

The biggest risk is I guess to not rename the files at all (just like missing calling the function, which you caught in review). If more fuzz- prefixed tests are in the archive, we'd get even more garbage runs. But also that would not be a big deal for one day.

@mi-ac
Copy link
Collaborator Author

mi-ac commented Feb 11, 2026

Finally the linter is happy...

@javanlacerda javanlacerda merged commit 5e605ee into google:master Feb 11, 2026
11 checks passed
@letitz
Copy link
Collaborator

letitz commented Feb 12, 2026

Hey, this is clever! Thanks for doing this @mi-ac !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants