Skip to main content

Automatic bisection utility for Mozilla Firefox and SpiderMonkey

Project description

Autobisect

Task Status Code style: black codecov

Autobisect is a python module that automates bisection of Mozilla Firefox and SpiderMonkey bugs.

Installation

git clone git@github.com:MozillaSecurity/autobisect.git
cd autobisect
poetry install

Usage

Firefox bug bisection supports the following arguments:

python -m autobisect firefox --help
usage: __main__.py firefox [-h] [--log-level LOG_LEVEL] [--start START] [--end END] [--timeout TIMEOUT] [--repeat REPEAT] [--config CONFIG] [--find-fix] [--os {Android,Darwin,Linux,Windows}]
                           [--cpu {AMD64,ARM64,aarch64,arm,arm64,i686,x64,x86,x86_64}] [--central | --release | --beta | --esr-stable | --esr-next | --try | --autoland] [-d] [-a] [-t] [--fuzzing]
                           [--fuzzilli] [--coverage] [--valgrind] [--no-opt] [--launch-timeout LAUNCH_TIMEOUT] [-p PREFS] [--xvfb] [--ignore [IGNORE [IGNORE ...]]]
                           testcase

positional arguments:
  testcase              Path to testcase

optional arguments:
  -h, --help            show this help message and exit
  --log-level LOG_LEVEL
                        Configure console logging. Options: DEBUG, INFO, WARN, ERROR, CRIT (default: INFO)

Boundary Arguments:
  Accepts revision or build date in YYYY-MM-DD format)

  --start START         Start build id (default: earliest available build)
  --end END             End build id (default: latest available build)

Bisection Arguments:
  --timeout TIMEOUT     Maximum iteration time in seconds (default: 60)
  --repeat REPEAT       Number of times to evaluate testcase (per build)
  --config CONFIG       Path to optional config file
  --find-fix            Identify fix date

Target Arguments:
  --os {Android,Darwin,Linux,Windows}
                        Specify the target system. (default: Linux)
  --cpu {AMD64,ARM64,aarch64,arm,arm64,i686,x64,x86,x86_64}
                        Specify the target CPU. (default: x86_64)

Branch Arguments:
  --central             Download from mozilla-central (default)
  --release             Download from mozilla-release
  --beta                Download from mozilla-beta
  --esr-stable          Download from esr-stable
  --esr-next            Download from esr-next
  --try                 Download from try
  --autoland            Download from autoland

Build Arguments:
  -d, --debug           Get debug builds w/ symbols (default=optimized).
  -a, --asan            Download AddressSanitizer builds.
  -t, --tsan            Download ThreadSanitizer builds.
  --fuzzing             Download --enable-fuzzing builds.
  --fuzzilli            Download --enable-js-fuzzilli builds.
  --coverage            Download --coverage builds.
  --valgrind            Download Valgrind builds.
  --no-opt              Download non-optimized builds.

Launcher Arguments:
  --launch-timeout LAUNCH_TIMEOUT
                        Number of seconds to wait before LaunchError is raised (default: 300)
  -p PREFS, --prefs PREFS
                        Optional prefs.js file to use
  --xvfb                Use Xvfb (Linux only)

Reporter Arguments:
  --ignore [IGNORE [IGNORE ...]]
                        Space separated list of issue types to ignore. Valid options: log-limit memory timeout (default: log-limit memory timeout)

Simple Bisection

python -m autobisect firefox trigger.html --prefs prefs.js --asan --end 2017-11-14

By default, Autobisect will cache downloaded builds (up to 30GBs) to reduce bisection time. This behavior can be modified by supplying a custom configuration file in the following format:

[autobisect]
storage-path: /home/ubuntu/cached
persist: true
; size in MBs
persist-limit: 30000

Development

Autobisect includes a pre-commit hook for black and flake8. To install the pre-commit hook, run the following.

pre-commit install

Furthermore, all tests should be executed via tox.

poetry run tox

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autobisect-7.4.2.tar.gz (146.4 kB view details)

Uploaded Source

Built Distribution

autobisect-7.4.2-py3-none-any.whl (213.4 kB view details)

Uploaded Python 3

File details

Details for the file autobisect-7.4.2.tar.gz.

File metadata

  • Download URL: autobisect-7.4.2.tar.gz
  • Upload date:
  • Size: 146.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/42.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.18 tqdm/4.66.1 importlib-metadata/6.8.0 keyring/24.3.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.13

File hashes

Hashes for autobisect-7.4.2.tar.gz
Algorithm Hash digest
SHA256 033f0ebd01d4501e20c82c6dde76ebf8b4f60ae080c42f88c2a9a6ea4a197898
MD5 a61411eed87cb4ea86b27e9f70566b20
BLAKE2b-256 3ab917d630a4116f11bc3b011d8af969c1563121d8486329ed23f4a296307c32

See more details on using hashes here.

File details

Details for the file autobisect-7.4.2-py3-none-any.whl.

File metadata

  • Download URL: autobisect-7.4.2-py3-none-any.whl
  • Upload date:
  • Size: 213.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/42.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.18 tqdm/4.66.1 importlib-metadata/6.8.0 keyring/24.3.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.13

File hashes

Hashes for autobisect-7.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4f91135d8f26f2c8a1a096b0affb3ab5b2da9053aef59dfa4e865bc1ca42c735
MD5 9322f79aded7f1d3980c5ed387288b98
BLAKE2b-256 8966c33b749f3c63c4f9745e4f3f77187f5d381c726324c34e637f35fa4890cb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page