Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions infra/bisector.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def __init__(self, message, repo_url):


def main():
"""Finds the commit SHA where an error was initally introduced."""
"""Finds the commit SHA where an error was initially introduced."""
logging.getLogger().setLevel(logging.INFO)
utils.chdir_to_root()
parser = argparse.ArgumentParser(
Expand Down Expand Up @@ -286,7 +286,7 @@ def _bisect(bisect_type, old_commit, new_commit, testcase_path, fuzz_target,
# pylint: disable=too-many-arguments
def bisect(bisect_type, old_commit, new_commit, testcase_path, fuzz_target,
build_data):
"""From a commit range, this function caluclates which introduced a
"""From a commit range, this function calculates which introduced a
specific error from a fuzz testcase_path.

Args:
Expand Down
4 changes: 2 additions & 2 deletions infra/build/build_status/fuzz_introspector_page_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@

def refine_percentage_string(percentage_string):
"""Shortens a srting to 4 characters and prepends zeros if necessary.
We need to prepend the zero to make sorting in the final table accurrate.
We need to prepend the zero to make sorting in the final table accurate.
"""
percentage_string = percentage_string.replace("%", "")
if len(percentage_string.split(".")[0]) == 1:
Expand All @@ -213,7 +213,7 @@ def refine_percentage_string(percentage_string):
if len(percentage_string) > 5:
percentage_string = percentage_string[:5]

# Check if the percentage is withing range of [0.0 : 100.0]
# Check if the percentage is within range of [0.0 : 100.0]
# Some old reports from 2022 have deprecated data, which we do not want to
# display.
float_val = float(percentage_string)
Expand Down
2 changes: 1 addition & 1 deletion infra/build/functions/build_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def workdir_from_dockerfile(dockerfile):
for line in dockerfile_lines:
match = re.match(WORKDIR_REGEX, line)
if match:
# We need to escape '$' since they're used for subsitutions in Container
# We need to escape '$' since they're used for substitutions in Container
# Builer builds.
return match.group(1).replace('$', '$$')

Expand Down
2 changes: 1 addition & 1 deletion infra/chronos/integrity_validator_run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def diff_patch_analysis(stage: str) -> int:


Returns: int: 0 if no patch found, 1 if patch found and -1 on
unkonwn (such as due to unsupported version control).
unknown (such as due to unsupported version control).
"""

print(
Expand Down
2 changes: 1 addition & 1 deletion infra/chronos/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def check_tests(project: common_utils.Project,
elif ret_code == 1:
patch_msg = 'run_tests.sh result failed: patches source control'
else:
patch_msg = 'run_tests.sh result uknown: unable to tell if run_tests.sh patches source control'
patch_msg = 'run_tests.sh result unknown: unable to tell if run_tests.sh patches source control'
logger.info('%s', patch_msg)
patch_details = {
'check-name': 'run_tests_patches_diff',
Expand Down
4 changes: 2 additions & 2 deletions infra/cifuzz/build_fuzzers_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def test_external_github_project(self):
"""Tests building fuzzers from an external project on Github."""
project_repo_name = 'external-project'
git_url = 'https://github.com/jonathanmetzman/cifuzz-external-example.git'
# This test is dependant on the state of
# This test is dependent on the state of
# github.com/jonathanmetzman/cifuzz-external-example.
config = test_helpers.create_build_config(
project_repo_name=project_repo_name,
Expand All @@ -217,7 +217,7 @@ def test_external_generic_project(self):
"""Tests building fuzzers from an external project not on Github."""
project_repo_name = 'cifuzz-external-example'
git_url = 'https://github.com/jonathanmetzman/cifuzz-external-example.git'
# This test is dependant on the state of
# This test is dependent on the state of
# github.com/jonathanmetzman/cifuzz-external-example.
manager = repo_manager.clone_repo_and_get_manager(
'https://github.com/jonathanmetzman/cifuzz-external-example',
Expand Down
2 changes: 1 addition & 1 deletion infra/cifuzz/cifuzz_end_to_end_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

# This test will fail if not run as root because the fuzzer build process
# creates binaries that only root can write to.
# Use a seperate env var to keep this seperate from integration tests which
# Use a separate env var to keep this separate from integration tests which
# don't have this annoying property.
@unittest.skipIf(not os.getenv('END_TO_END_TESTS'),
'END_TO_END_TESTS=1 not set')
Expand Down
2 changes: 1 addition & 1 deletion infra/cifuzz/clusterfuzz_deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ def get_coverage(self, repo_path):


def get_clusterfuzz_deployment(config, workspace):
"""Returns object reprsenting deployment of ClusterFuzz used by |config|."""
"""Returns object representing deployment of ClusterFuzz used by |config|."""
deployment_cls = _PLATFORM_CLUSTERFUZZ_DEPLOYMENT_MAPPING[config.platform]
if config.no_clusterfuzz_deployment:
logging.info('Overriding ClusterFuzzDeployment. Using None.')
Expand Down
4 changes: 2 additions & 2 deletions infra/cifuzz/config_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def _get_language():
# given to OSS-Fuzz users by not making them specify the language again (and
# getting it from the project.yaml) is outweighed by the complexity in
# implementing this. A lot of the complexity comes from our unittests not
# setting a proper projet at this point.
# setting a proper project at this point.
return os.getenv('LANGUAGE', constants.DEFAULT_LANGUAGE)


Expand Down Expand Up @@ -183,7 +183,7 @@ def is_internal(self):

@property
def platform(self):
"""Returns the platform CIFuzz is runnning on."""
"""Returns the platform CIFuzz is running on."""
if not self.is_internal:
if not self.is_github:
return self.Platform.EXTERNAL_GENERIC_CI
Expand Down
6 changes: 3 additions & 3 deletions infra/cifuzz/config_utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,14 @@ def _create_config(self):
return config_utils.RunFuzzersConfig()

def test_coverage(self):
"""Tests that mode is overriden properly based on is_coverage."""
# Test that it is overriden when it is supposed to be.
"""Tests that mode is overridden properly based on is_coverage."""
# Test that it is overridden when it is supposed to be.
os.environ['SANITIZER'] = 'coverage'
os.environ['MODE'] = 'code-change'
config = self._create_config()
self.assertEqual(config.mode, 'coverage')

# Test that it isn't overriden when it isn't supposed to be.
# Test that it isn't overridden when it isn't supposed to be.
os.environ['SANITIZER'] = 'address'
mode = 'code-change'
os.environ['MODE'] = mode
Expand Down
2 changes: 1 addition & 1 deletion infra/cifuzz/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def get_base_docker_run_command(workspace,
language=constants.DEFAULT_LANGUAGE,
architecture=constants.DEFAULT_ARCHITECTURE,
docker_in_docker=False):
"""Returns part of the command that should be used everytime 'docker run' is
"""Returns part of the command that should be used every time 'docker run' is
invoked."""
docker_args, docker_container = get_base_docker_run_args(
workspace,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <vector>

// Forward declare the "fuzz target" interface.
// We deliberately keep this inteface simple and header-free.
// We deliberately keep this interface simple and header-free.
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size);

int main(int argc, char **argv) {
Expand Down
2 changes: 1 addition & 1 deletion infra/cifuzz/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def patch_environ(testcase_obj, env=None, empty=False, runner=False):
del os.environ[key]

if runner:
# Add the scripts for base-runner to the path since the wont be in
# Add the scripts for base-runner to the path since the won't be in
# /usr/local/bin on host machines during testing.
base_runner_dir = os.path.join(INFRA_DIR, 'base-images', 'base-runner')
os.environ['PATH'] = (os.environ.get('PATH', '') + os.pathsep +
Expand Down
2 changes: 1 addition & 1 deletion infra/experimental/chronos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ At the core, Chronos relies on caching containers after project build, in order
to enable fast rebuilding of a project following minor patches, and also enable
running of the tests in a given project. To support this, Chronos creates a snapshot
of a the docker container given project post build completion. This means that all `.o` files, generated
configuations etc. persist in the docker container. These artifacts are then
configurations etc. persist in the docker container. These artifacts are then
leverage for future "replay builds" where only a minor part of the project has changed,
e.g. due to some patching on the project. This patching could be e.g. minor adjustments
to the fuzzing harness source code e.g. by [oss-fuzz-gen](https://github.com/google/oss-fuzz-gen).
Expand Down
2 changes: 1 addition & 1 deletion infra/experimental/mcp/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ def _get_all_broken_oss_fuzz_projects(language: str = '') -> list[str]:

# Make sure the project actually exists in the OSS-Fuzz repository.
# We need to do this because Clusterfuzz may keep some projects rolling
# withouth them being in OSS-Fuzz any longer.
# without them being in OSS-Fuzz any longer.
project_path = os.path.join(oss_fuzz_mcp_config.BASE_OSS_FUZZ_DIR,
'projects', project['name'])
if not os.path.exists(project_path):
Expand Down
6 changes: 3 additions & 3 deletions infra/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ def get_parser(): # pylint: disable=too-many-statements,too-many-locals
'fuzz introspector. This involves (1) '
'building the fuzzers with ASAN; (2) '
'running all fuzzers; (3) building '
'fuzzers with coverge; (4) extracting '
'fuzzers with coverage; (4) extracting '
'coverage; (5) building fuzzers using '
'introspector')
introspector_parser.add_argument('project', help='name of the project')
Expand Down Expand Up @@ -616,7 +616,7 @@ def _add_base_image_tag_args(parser):


def _env_to_docker_args(env_list):
"""Turns envirnoment variable list into docker arguments."""
"""Turns environment variable list into docker arguments."""
return sum([['-e', v] for v in env_list], [])


Expand Down Expand Up @@ -978,7 +978,7 @@ def check_build(args):


def _get_fuzz_targets(project):
"""Returns names of fuzz targest build in the project's /out directory."""
"""Returns names of fuzz target build in the project's /out directory."""
fuzz_targets = []
for name in os.listdir(project.out):
if name.startswith('afl-'):
Expand Down
2 changes: 1 addition & 1 deletion infra/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def get_container_name():


def is_executable(file_path):
"""Returns True if |file_path| is an exectuable."""
"""Returns True if |file_path| is an executable."""
return os.path.exists(file_path) and os.access(file_path, os.X_OK)


Expand Down
2 changes: 1 addition & 1 deletion infra/utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def test_string(self): # pylint: disable=no-self-use

@unittest.skip('Causes spurious failures because of side-effects.')
def test_binary_string(self): # pylint: disable=no-self-use
"""Tests that utils.binary_print can print a bianry string."""
"""Tests that utils.binary_print can print a binary string."""
# Should execute without raising any exceptions.
with mock.patch('sys.stdout.buffer.write') as mock_write:
utils.binary_print(b'hello')
Expand Down
Loading