Oliver Chang
37179d7e8d
Fix exception in bisector.py ( #9399 )
...
The `run_function` is passed an `architecture` keyword argument:
a8cb9370f0/infra/helper.py (L1357)
This makes the `run_function` passed in the bisector ignore all keyword
arguments.
Related: https://github.com/google/osv.dev/issues/963
2023-01-12 09:26:10 +11:00
hanyoungYoo
c99b0107b2
[infra] Add different messages depending on bisection type ( #6547 )
...
A printed message after bisection should be different depending on the bisection type
2021-10-04 07:14:41 -05:00
jonathanmetzman
d88b5e4aa7
[CIFuzz] Add support for external projects to helper.py ( #6141 )
...
Add support to helper.py for external projects for all subcommands except `download_corpora`.
External users just need to specify `build_integration_path`, `project_src_path` and `external`.
Also do a big refactor to pass a project object as part of args instead of a string containing the name of the project or its
path.
Related: #6125
2021-08-04 06:42:17 -07:00
jonathanmetzman
6f0238764e
[infra][NFC] Use "testcase" instead of test_case for consistency. ( #6159 )
2021-08-03 18:05:00 -07:00
jonathanmetzman
ffe4f892b1
[helper] Fix build_image --pull and refactor ( #5642 )
...
Fix behavior of build_image --pull (Fixes #5640 )
Also refactor helper.py:
1. Change behavior of functions so that most return True on success and False on failure.
2. Only main will return 1 on failure and 0 on success now. Previous behavior was very error prone.
3. Rename _get_output_dir to _get_out_dir.
4. Make function docstrings use descriptive tense.
5. Make helper.py print help when no argument is specified.
2021-04-21 14:28:26 +00:00
Oliver Chang
e8646d25ec
Fix bisection when the original checkout is for a single branch. ( #5478 )
...
Repos cloned with `--branch BRANCH` will only track that branch, even
when we unshallow. If we provide a git SHA from another branch, it will
not be recognized.
To fix, this, we update the remote tracking config and fetch them.
For google/osv#88 .
2021-03-23 14:17:37 +11:00
Oliver Chang
a23d9bc6fb
Rename BaseRepoManager -> RepoManager. ( #4800 )
...
This was renamed in b0b99d5ccd
2020-12-08 10:01:38 +11:00
Oliver Chang
34751cf016
bisector: early exit when old_commit == new_commit. ( #4458 )
...
But do this after computing repo_url as that's still useful information.
2020-09-18 14:10:10 +10:00
Oliver Chang
662260da6e
bisector: try older commits if old_commit has the same result as new_commit ( #4096 )
2020-07-09 20:04:13 +10:00
Oliver Chang
4a51ecb61f
build_specified_commit: Handle build.sh which are part of upstream repo. ( #3932 )
...
This is a best effort attempt to parse the relevant copy command from
the Dockerfile.
Also add a main function to build_specified_commit to make it easier to
test.
2020-06-10 17:12:28 +10:00
Oliver Chang
15289d2bc2
Include repo URL in bisection error. ( #3795 )
2020-05-13 14:38:46 +10:00
Oliver Chang
af766f3f2c
bisector: always reset projects/ even when we exception out. ( #3769 )
2020-05-07 17:19:57 +10:00
Oliver Chang
434109ab61
Use dedup_token_length in bisector. ( #3764 )
...
Using whether or not the target crashed is not sufficient. There are
numerous cases where the state changes.
2020-05-06 15:30:16 +10:00
Oliver Chang
b16fcfc903
bisector: Properly detect MSan issues as well. ( #3762 )
...
Adopt a similar start/end marker approach to CF.
2020-05-06 12:09:51 +10:00
Oliver Chang
2d972c9162
Add a better check for crash during bisection. ( #3758 )
2020-05-04 16:50:25 +10:00
Oliver Chang
2f1fc1e94f
Raise exception if old_commit has the same behaviour as new_commit. ( #3749 )
...
Ignoring it and trying to bisect the entire range up to new_commit is
too slow and does not work well in practice.
2020-05-01 14:01:12 +10:00
Oliver Chang
3a23496fcd
bisector: Sort by timestamp order when getting base-builder tags. ( #3740 )
2020-04-30 15:50:33 +10:00
Oliver Chang
47068dff0a
Use base-builder close to commit date. ( #3715 )
2020-04-28 11:31:02 +10:00
Oliver Chang
05f7678e54
bisector: ignore old_commit if it's inaccurate. ( #3708 )
2020-04-27 10:56:17 +10:00
Oliver Chang
2e20541502
Fix bisector commandline invocation. ( #3692 )
2020-04-22 17:16:00 +10:00
Oliver Chang
ed292c0b40
Bisector: Be a bit smarter about picking which OSS-Fuzz commit to build with. ( #3665 )
...
When the build fails against HEAD OSS-Fuzz, we find the date of the
commit for the project, and use the latest revision of OSS-Fuzz before
it to rebuild the project builder container.
Subsequent runs will use the last built container, and if that fails
that will again find the closest revision of OSS-Fuzz.
Also factor BaseRepoManager out of RepoManager to provide a generic repo
manager class for dealing with existing checkouts (which don't need a
clone).
2020-04-21 10:11:29 +10:00
Oliver Chang
d5ad37e692
Return main repo URL in bisector result. ( #3672 )
2020-04-21 08:05:45 +10:00
Oliver Chang
0f22065c16
bisector: raise exceptions when building new or old commit fails. ( #3653 )
...
Let build failures continue during the actual bisection for now to keep
the bisection going. A future PR can improve the logic of that when it
happens.
2020-04-15 16:03:52 +10:00
Oliver Chang
0399965d7e
Allow bisecting with no old commit. ( #3641 )
...
Fixes #3598 .
2020-04-15 08:59:33 +10:00
Oliver Chang
aa045b9b37
Bisector fixes. ( #3601 )
...
- Copy /src from host instead of checking out repo on host. This fixes
issues with dependencies in the main repo.
- Add some more logging.
2020-04-14 11:38:23 +10:00
Oliver Chang
1992503e5c
Fix incorrect variable name in bisector.py ( #3581 )
2020-04-06 11:28:46 +10:00
Leo Neat
007226e5cc
[infra] unit/integration test updates ( #3300 )
...
* Merging build_specified_commit.py and utils.py
* undo dataflow change
* Updating RepoManager tests
* Updated detect_repo_tests
* Build specified commit updated
* Updated test_repos
* updating bisector tests
* formatting updates
* Switch inversions
* Rebase master
2020-01-30 10:27:56 -08:00
Leo Neat
4d5e5016c0
[Infra] Update print statements ( #3305 )
2020-01-29 14:10:04 -08:00
Leo Neat
8ffc6db00c
[Infra] CIFuzz pipeline complete. ( #3281 )
...
* Testing action build
* Testing action build
* Testing action build
* Testing action build
* Testing action build
* Testing action build
* Testing action build
* Testing action build
* Testing action build
* Testing action build
* Testing action build
* Testing action build
* Testing action build
* Testing action build
* Testing action build
* Testing action build
* Testing action build
* Testing action build
* Testing action build
* Testing action build
* Testing action build
* Working build
* Working build
* Working build
* Working build
* Working build
* Working build
* Working build
* Working build
* Working build
* Working build
* Working build
* Working build
* Working build
* Working build
* Working build
* Working build
* Working build
* Working build
* Working build
* Working build
* Working build
* Working build
* Working build
* Working build
* Working build
* Working build
* Working fuzzers with out error surface
* Working fuzzers with out error surface
* Working fuzzers with out error surface
* Printing std err
* Adding fuzzer timeout
* Adding fuzzer timeout
* Changing fuzzer timeout to fuzz time
* Formatting and refactoring
* Spelling in fuzz_target.py
* Spelling in fuzz_target.py
* Spelling in fuzz_target.py
* Upload artifact fix
* Upload artifact fix
* Upload artifact fix
* Upload artifact fix
* Upload artifact fix
* Upload artifact fix
* Upload artifact fix
* Refactoring error codes.
* reverting helper.py
* reverting helper.py
* reverting helper.py
* chaning method to static
* moving cifuzz file
* Jonathan changes
* Oliver and Jonathan comments
* Oliver and Jonathan comments
* Oliver and Jonathan comments
* Utils unit tests
* Test formatting and documentation
* Build fuzzer test added
* Changed repo manager errors
* Unit and integration tests complete
* Jonathan comments pt.1
* Jonathan comments pt.1
* Jonathan comments pt.1
* adding cifuzz_test
* Build fuzzer test completed
* Run fuzzers test finished.
* Removed SRC dependency
* Jonathan comments pt.2
* Max comments pt.1
* Max comments pt.2
* removing log specified out stream
* Max comments pt.3
* Adding OSS_FUZZ_HOME env var
* Jonathan comments pt.3
* Formatting
* Olivers comments
* Jonathan comments
2020-01-29 11:03:43 -08:00
jonathanmetzman
2bcc2bfe2b
[cifuzz][bisection] Make BuildData a namedtuple ( #3282 )
2020-01-23 09:48:09 -08:00
Leo Neat
14582175d0
[infra] Scripts for building fuzzers with CIFuzz ( #3207 )
2020-01-15 13:30:57 -08:00
Leo Neat
9532d4781a
[infra] Fixing bisection to work with more OSS-Fuzz projects ( #3152 )
...
* Max comments
* Added bisection tests
* Added test cases
* Docker run command added to build_specific commit
* Infer main repo uses docker image rather than docker file
* Added mores tests for repo infer
* With verbosity
* Formatting
* Bisection fixed
* Formatting updates
* Oliver small comments.
* Script infer main repo
* Detect repo and test module finished
* Detect main repo from script
* Regex searching
* Regex searching
* Max comments + bisector test script
* Oliver comments
* Max's comments
* String concat update
* Jonathan comments
2020-01-06 12:17:26 -08:00
Leo Neat
2c05fb229f
[infra] Add support for Bisecting Git Commits Introducing Crashes( #3119 )
2019-12-16 16:48:49 -08:00