Skip to content

Commit

Permalink
Replace terms that are uninclusive. (google#5045)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanmetzman authored Jan 25, 2021
1 parent 20b7246 commit 0ac841a
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 18 deletions.
8 changes: 4 additions & 4 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
# run arbitrary code.
extension-pkg-whitelist=

# Add files or directories to the blacklist. They should be base names, not
# Add files or directories to the blocklist. They should be base names, not
# paths.
ignore=CVS,base-clang,base-sanitizer-libs-builder

# Add files or directories matching the regex patterns to the blacklist. The
# Add files or directories matching the regex patterns to the blocklist. The
# regex matches against base names, not paths.
ignore-patterns=

Expand Down Expand Up @@ -444,8 +444,8 @@ allow-global-unused-variables=yes
callbacks=cb_,
_cb

# A regular expression matching the name of dummy variables (i.e. expected to
# not be used).
# A regular expression matching the name of placeholder variables (i.e. expected
# to not be used).
dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_

# Argument names that match this expression will be ignored. Default to name
Expand Down
9 changes: 4 additions & 5 deletions docs/getting-started/new_project_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Before you can start setting up your new project for fuzzing, you must do the fo
[docker-cleanup](https://gist.github.com/mikea/d23a839cba68778d94e0302e8a2c200f)
periodically to garbage-collect unused images.

- (optional) [Install gsutil](https://cloud.google.com/storage/docs/gsutil_install) for local code coverage sanity check.
- (optional) [Install gsutil](https://cloud.google.com/storage/docs/gsutil_install) for local code coverage testing.
For Google internal (gLinux) machines, please refer [here](https://cloud.google.com/storage/docs/gsutil_install#deb) instead.

## Creating the file structure
Expand Down Expand Up @@ -325,10 +325,9 @@ You can build your docker image and fuzz targets locally, so you can test them b
$ python infra/helper.py run_fuzzer $PROJECT_NAME <fuzz_target> --corpus-dir=<path-to-temp-corpus-dir>
```

4. We recommend taking a look at your code coverage as a sanity check to make
sure that your fuzz targets get to the code you expect. This would use the
corpus generated from the previous `run_fuzzer` step in your local corpus
directory.
4. We recommend taking a look at your code coverage as a test to ensure that
your fuzz targets get to the code you expect. This would use the corpus
generated from the previous `run_fuzzer` step in your local corpus directory.

```bash
$ python infra/helper.py build_fuzzers --sanitizer coverage $PROJECT_NAME
Expand Down
5 changes: 2 additions & 3 deletions infra/base-images/base-builder/bisect_clang.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def do_command(self, git_subcommand):
def test_commit(self, test_command):
"""Build LLVM at the currently checkedout commit, then run |test_command|.
If returncode is 0 run 'git bisect good' otherwise return 'git bisect bad'.
Return None if bisect didn't terminate yet. Return the culprit commit if it
Return None if bisect didn't finish yet. Return the culprit commit if it
does."""
build_clang(self.repo_dir)
retcode, _, _ = execute(test_command, shell=True, expect_zero=False)
Expand Down Expand Up @@ -208,8 +208,7 @@ def main():
8288453f6aac05080b751b680455349e09d49825
"""
# pylint: enable=line-too-long
# TODO(metzman): Sanity check CFLAGS for things like
# -fsanitize=fuzzer-no-link.
# TODO(metzman): Check CFLAGS for things like -fsanitize=fuzzer-no-link.
# TODO(metzman): Allow test_command to be optional and for just build.sh to be
# used instead.
test_command = sys.argv[1]
Expand Down
2 changes: 1 addition & 1 deletion infra/base-images/base-runner/coverage
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function run_fuzz_target {
local profdata_file="$DUMPS_DIR/$target.profdata"
local corpus_real="/corpus/${target}"

# -merge=1 requires an output directory, create a dummy dir for that.
# -merge=1 requires an output directory, create a new, empty dir for that.
local corpus_dummy="$OUT/dummy_corpus_dir_for_${target}"
rm -rf $corpus_dummy && mkdir -p $corpus_dummy

Expand Down
2 changes: 1 addition & 1 deletion infra/build/functions/build_and_run_coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def get_build_steps(project_name, project_yaml_file, dockerfile_lines,
type='reports',
date=report_date)

# Delete the existing report as gsutil cannot overwrite it in a sane way due
# Delete the existing report as gsutil cannot overwrite it in a useful way due
# to the lack of `-T` option (it creates a subdir in the destination dir).
build_steps.append(build_lib.gsutil_rm_rf_step(upload_report_url))
build_steps.append({
Expand Down
6 changes: 3 additions & 3 deletions infra/cifuzz/fuzz_target_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class IsReproducibleTest(fake_filesystem_unittest.TestCase):
"""Tests the is_reproducible method in the fuzz_target.FuzzTarget class."""

def setUp(self):
"""Sets up dummy fuzz target to test is_reproducible method."""
"""Sets up example fuzz target to test is_reproducible method."""
self.fuzz_target_path = '/example/path'
self.testcase_path = '/testcase'
self.test_target = fuzz_target.FuzzTarget(self.fuzz_target_path,
Expand Down Expand Up @@ -115,7 +115,7 @@ class GetTestCaseTest(unittest.TestCase):
"""Tests get_testcase."""

def setUp(self):
"""Sets up dummy fuzz target to test get_testcase method."""
"""Sets up example fuzz target to test get_testcase method."""
self.test_target = fuzz_target.FuzzTarget('/example/path', 10,
'/example/outdir')

Expand Down Expand Up @@ -180,7 +180,7 @@ class IsCrashReportableTest(fake_filesystem_unittest.TestCase):
"""Tests the is_crash_reportable method of FuzzTarget."""

def setUp(self):
"""Sets up dummy fuzz target to test is_crash_reportable method."""
"""Sets up example fuzz target to test is_crash_reportable method."""
self.fuzz_target_path = '/example/do_stuff_fuzzer'
self.test_target = fuzz_target.FuzzTarget(self.fuzz_target_path, 100,
'/example/outdir', 'example')
Expand Down
2 changes: 1 addition & 1 deletion infra/presubmit.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def check_valid_emails(self):
if auto_ccs:
email_addresses.extend(auto_ccs)

# Sanity check them.
# Check that email addresses seem normal.
for email_address in email_addresses:
if '@' not in email_address or '.' not in email_address:
self.error(email_address + ' is an invalid email address.')
Expand Down

0 comments on commit 0ac841a

Please sign in to comment.