Status: Early prototype phase
The tools supports various tasks (e.g. reproduce a crash locally) needed by ClusterFuzz's users.
Currently, it supports reproducing a crash locally. In the future, it will support uploading a fuzzer, tailing fuzzer log, and uploading a testcase.
- gsutil
blackbox
andxdotool
; these can be installed withapt-get
.
ClusterFuzz tools is a single binary file built with Pex. Therefore, you can simply copy the binary and run it.
For Goobuntu:
- Run
prodaccess
- Run
/google/data/ro/teams/clusterfuzz-tools/releases/clusterfuzz reproduce -h
For others:
- Download the latest stable version
- Run
clusterfuzz-<version>.pex reproduce -h
See <binary> reproduce --help
. Run <binary> reproduce [testcase-id]
Here's the workflow (we think) might be appropriate when fixing a bug:
- Run
<binary> reproduce [testcase-id]
- Make a new branch and make a code change
- Run against the code change with
<binary> reproduce [testcase-id] --current
- If the crash doesn’t occur anymore, it means your code change fixes the crash
./pants -V
to bootstrap Pants- Run the tool's tests:
./pants test.pytest --coverage=1 tool:test
- Run the ci's tests:
./pants test.pytest --coverage=1 ci/continuous_integration:test
- Run the tool binary:
./pants run tool:clusterfuzz-ci -- reproduce -h
- Ensure all the latest binaries are present and symlinked in
/google/data/ro/teams/clusterfuzz-tools/releases
. - Run
ansible-playbook playbook.yml -e release=<release-type> -e machine=<machine-name>
whererelease-type
is one of[release, release-candidate, master]
andmachine-name
is the prefix of the machine you wish to update or deploy (for example,machine=release
corresponds to the boot diskrelease-ci-boot
and the machinerelease-ci
).
We publish our binary to 2 places: Cloud Storage (for public) and X20 (for Googlers).
- Increment the version number in
tool/clusterfuzz/resources/VERSION
- Create and merge a pull request to increase the version number
- Set the new version in the env:
export VERSION=<version>
. - Build the Pex binary:
./pants binary tool:clusterfuzz-$VERSION
- Upload to our public storage:
gsutil cp dist/clusterfuzz-$VERSION.pex gs://clusterfuzz-tools/
- Make the link public:
gsutil acl set public-read gs://clusterfuzz-tools/clusterfuzz-$VERSION.pex
- Copy to X20:
cp dist/clusterfuzz-$VERSION.pex /google/data/rw/teams/clusterfuzz-tools/releases/
- Change permission:
chmod 775 /google/data/rw/teams/clusterfuzz-tools/releases/clusterfuzz-$VERSION.pex
- Symlink:
- Release:
ln -sf /google/data/rw/teams/clusterfuzz-tools/releases/clusterfuzz-$VERSION.pex /google/data/rw/teams/clusterfuzz-tools/releases/clusterfuzz
- Release Candidate:
ln -sf /google/data/rw/teams/clusterfuzz-tools/releases/clusterfuzz-$VERSION.pex /google/data/rw/teams/clusterfuzz-tools/releases/clusterfuzz-rc
- Confirm it with:
ls -l /google/data/rw/teams/clusterfuzz-tools/releases/clusterfuzz*
- Test by running:
/google/data/ro/teams/clusterfuzz-tools/releases/clusterfuzz reproduce -h
- Tag the current version with
git tag -a $VERSION -m "Version $VERSION"
- Push the tag
git push --tags