| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
Do not tolerate unknown blob hashes - it means that we are unable to
find the correct base commit given the repository.
Explicitly ignore newly added files - we definitely won't find their
hashes.
Explicitly skip malformed patches that won't have any blob hashes -
otherwise we could end up with too many candidates and waste too much
time.
|
| |
|
|
|
| |
Return the commits that represent unique sets of branches.
Sort the list topologically, breaking ties by commit date.
|
| |
|
|
|
|
| |
Given a git diff, determine the latest commit where the modified files
still have the exact sha hashes they had at the moment the git patch was
created.
|
| |
|
|
| |
Return not just the modified files, but also their blob hashes.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There's no sense to react to `git checkout` or `git fetch` which failed
due to network problems by re-cloning the whole repository - that
operation will fail just as well.
Detect at least one kind of such problems and just return an error from
the Poll() method, without wiping everything out.
For now, don't add tests as we would need some real remote git server
implementation to properly test it. Using a folder as a "remote"
repository, like we do in other tests, won't ever trigger networking
errors.
Closes #6099.
|
| |
|
|
|
|
|
|
|
|
| |
Rename the method to LatestCommit and make it more flexible:
1) Return the commit date alongside the commit hash.
2) Rename the time filter to highlight that it's non-inclusive.
3) Make it possible to query the commits newer than the specified commit
hash.
It will let us poll lore archives more efficiently.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The current common vcs interface and its implementations are designed to
support a very big number of situations (git modules, cleaning up
complex state, etc), which is too heavy and restrictive when we just
need a thin wrapper over the git command that supports a few basic
operations.
Refactor pkg/vcs to split out the wrapper code from the big git
implementation of the vcs.Repo interface.
Export the wrapper to enable reuse in other parts of the system.
|
| |
|
|
| |
Support filtering by the commit date.
|
| |
|
|
| |
Provide a functionality to extract the files affected by a git patch.
|
| |
|
|
| |
Add Commit.Patch with patch body.
|
| |
|
|
|
|
|
| |
Currently we have HeadCommit function that returns info
about the HEAD commit. Change it to a more flexible Commit
function that can return info about any commit.
This will be used in future changes.
|
| |
|
|
|
|
|
| |
Some commits don't live long remotely.
It sometimes happens we need them later to:
1. Merge coverage.
2. Mention during communication.
|
| |
|
|
|
| |
Every commit checkout takes >3 seconds.
Let's optimize this operation to save on large merges.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The approach we used works perfectly for all commits, but they must be
referenced by the full 40 character hash. In almost all cases, users
would prefer to use the shorter one.
If the commit hash is not 40 characters long, fetch the whole git tree.
The only unsupported scenario is fetching a commit that is referenced by
custom refs/* by its short hash. It's unlikely there's anything we can
do here.
|
| |
|
|
|
|
|
|
|
| |
This should make syzkaller only fetch the commits relevant for further
processing. Also, specifying the exact commit/branch name to fetch
allows us to access commits from custom refs.
Test the new behaviour and double-check that remote tags fetch was not
broken.
|
| |
|
|
| |
It's not needed anymore.
|
| |
|
|
|
|
|
|
|
|
| |
If the remote repo's tags conflict with the local ones, `git fetch` may
fail with `error: cannot lock ref %: % exists`.
It seems that the only way to restore the repository in this case is to
do `git fetch` with `--prune --prune-tags`. Since this also forces the
repository to forget all tags not present in the remote, let's do it
only when we got the error message.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
We are currently seeing errors that there are "untracked working
tree files which would be overrwritten by checkout".
This error occurs when files of the same path differ between branches,
regardless of whether the repository is clean or not.
Forcing FETCH_HEAD checkout, then moving repair() to after checkout
to clean repository to the current checkout.
Additionally, added a second "force" to git clean to clean directories
with '.git' subdirectories.
|
| | |
|
| |
|
|
|
| |
The Pixel repository from partner-android takes ~2 hours
to initialize, so increased the git command timeout to 3 hours.
|
| |
|
|
|
|
|
| |
1) ListCommitHashes, which lists all commit hashes reachable from the
specified commit.
2) Object, which allows to query the contents of an object at the
specified revision.
|
| |
|
|
|
|
|
|
|
|
|
| |
When changing branches, we were receiving an error
that submodules were not clean.
Added recurse-submodules flag in git reset to recursively
reset submodules.
Additionally, added command to recursively clean each
subdirectory.
|
| |
|
|
| |
Adding a remote origin if one has not been initialized.
|
| |
|
|
|
|
|
|
|
|
| |
Increase the maximum age of fetched commits when searching for fix tags
and commit titles. This enables syz-ci to find older commits provided with
'#syz fix' commands.
https://groups.google.com/g/syzkaller/c/nbd2tUr5AhU
Signed-off-by: Alexander Egorenkov <eaibmz@gmail>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Android kernel source uses Git submodules to separate vendor- or
device-specific kernel modules from the main kernel source.
This calls 'git submodules update --init' after calls to 'git checkout',
which is the equivalent of adding the '--recurse-submodules' flag to
'git clone'.
For cases where submodules aren't used (all other Syzkaller targets)
this additional command is a no-op.
|
| |
|
|
|
|
| |
Returns true if the current tree contains the specified commit
(the commit is reachable from the current HEAD).
Cntains(commit string) (bool, error)
|
| |
|
|
|
| |
Store config options identified using DebugTracer. Also change bisection
and configuration minimization code to use new DebugTracer.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
git fetch can fail due to force-recreated tags:
> ! [rejected] ext4_for_linus -> ext4_for_linus
> (would clobber existing tag)
And due to something related to updating local branches
(see 'git help fetch' for details).
--force should avoid both issues and it seems that
we always want force for our purposes (rather than
fail update/patch testing).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fetching a remote branch w/o the corresponding remote with git
disables delta optimization on the server's side and the git
client is forced to download the complete branch even if it
already has got an older version. This leads to several problems as:
* Long fetch time
* Limitless growth of local git repo due to git fetch creating
a new pack file every time
Create a remote before fetching to fix the above issues.
With a remote, only the first fetch will take some time and all the following
ones shall be very fast. Furthermore, git fetch will avoid creating many
pack files in .git/objects/pack.
Signed-off-by: Alexander Egorenkov <Alexander.Egorenkov@ibm.com>
|
| |
|
|
|
|
| |
We currently detect v5.10-rc1 as v5.9 because we ignore -rc tags.
This makes it impossible to enable configs that were already added for v5.10.
Treat v5.10-rc1 as v5.10 already.
|
| |
|
|
|
|
|
|
|
|
| |
The pkg/vcs code assumed that we fully manage the repo
within an autonomous program. In particular it tried
to repair any errors by dropping and re-creating the repo.
This does not work well for command-line tools that work
with a user-provided repo. Add OptPrecious for such uses.
Update #2171
|
| |
|
|
|
|
|
| |
Add ReleaseTag method that returns last release tag
for the given commit.
Update #2171
|
| |
|
|
|
|
|
|
| |
The Freshness columns in Instances: table on the dashboard page look outdated, for
these fields are showing when that patch was authored. Where possible, using when
that patch was committed into the tree in question would be more meaningful.
Update #1537
|
| |
|
|
|
|
| |
Create a struct on pkg/vcs to store data of syzkaller email recipients
and update its users. The struct contains default name, email, and a
label to divide user into To and Cc when sending the emails.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently we sandbox all repos b/c we assumed
that all builds are also sandboxes. But this causes
havoc for bisection/patch testing b/c syzkaller build
is not actually sandboxed anywhere. Build creates
root-owned files and then git can't do anything with them
but don't report errors either:
$ git checkout 8eda0b95 && echo OK
error: unable to unlink old 'sys/linux/gen/386.go': Permission denied
error: unable to unlink old 'sys/linux/gen/ppc64le.go': Permission denied
...
HEAD is now at 8eda0b957e5b
OK
We trust own sources and we don't test syzkaller patches,
so don't sandbox syzkaller repos.
|
| |
|
|
|
|
| |
"git clean -fd" does not remove ignored files,
while can mess state when .gitignore changes across commits.
Use "git clean -fdx" to delete ignored files as well.
|
| |
|
|
|
| |
Maybe it will help to fix:
https://groups.google.com/forum/#!topic/syzkaller-bugs/2lgvlHd8t1c
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If you try to run git-using tests while the GIT_DIR environment variable
(and GIT_WORK_TREE, etc) happens to be set, the tests are going to do fun
and exciting things on a repository that isn't the test repository it tries
to set up.
As it turns out, if you try to run "make test" using git rebase -x, you'll
end up with GIT_DIR set to the syzkaller tree. Hilarity ensues.
Unset GIT_DIR, GIT_WORK_TREE and a few other environment variables when
invoking git - that way it'll default to looking at the working directory
that we have given it, which is what we expect.
Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
They should have been detected by "same binary" logic.
But the problem is that we may use different compilers
for different commits and they switch exactly at release commits.
So we can build the release with a differnet compiler than the
rest of commits and then obviously it won't be "same binary".
Detect release commits separately.
Update #1271
|
| |
|
|
|
|
|
|
| |
Detect bisection to merge commits and to commits that don't affect
kernel binary (comments, other arches, whitespaces, etc).
Such bisections are not reported in emails (but shown on web).
Update #1271
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(note: incomplete change)
Refactor existing code as follows:
* Move reusable test utility functions from git_repo_test.go to
pkg/vcs/test_util.go and make them exported.
* Split Run() into Run()+runImpl().
* Change type of bisect.go:env.inst to `instance.BuilderTester`.
Change usage inside syz-testbuild/testbuild.go accordingly.
* Move most of linux.PreviousReleaseTags() into vcs/git.go as
git.previousReleaseTags().
* Allow build.CompilerIdentity to be mocked.
Introduce the following changes:
* instance.BuilderTester is an interface with methods
BuildSyzkaller()
BuildKernel()
Test()
NewEnv() now returns this interface.
* type testEnv implements instance.BuilderTester.
* type testBuilder implements builder interface. Add a entry into table
inside pkg/build/build.go:getBuilder() to return testBuilder object.
|
| |
|
|
|
|
|
|
|
|
| |
OpenBSD uses cvs and does not enforce the standard Git convention for
commit messages of putting a summary followed by a new line and body.
If such commit[1] contains a `Reported-by` header, it's currently not
detected. Instead, if the body is empty try to extract data from the
commit summary.
[1] https://github.com/openbsd/src/commit/bdbfbec5cea84d24d6a598cf1e63dbdb10e8331a
|
| |
|
|
|
| |
There is a bunch of repetition to invoke git.
Wrap it into a helper method.
|
| |
|
|
|
|
|
|
| |
If we cherry-pick some fixes during bisection
we need to "git reset" repo before "git bisect reset".
Otherwise it will fail. Reset repo in more points.
Update #501
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In preparation for syz-ci bisection:
- move bisection function into a separate interface
they look out of place in vcs.Repo because most OSes
don't implement it and most users don't case
- extract author name and more CC emails for commits
- move linux-specific PreviousReleaseTags into linux.go
- fix inconclusive bisection (more than 1 potential commits)
- add tests fr bisection
- add maintainers returned from get_maintainers.pl for commits
that don't have enough emails (e.g. only author email)
Update #501
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This implements 2 features:
- syz-ci polls a set of additional repos to discover fixing commits sooner
(e.g. it can now discover a fixing commit in netfilter tree before
it reaches any of the tested trees).
- syz-ci uploads info about commits to dashboard.
For example, a user marks a bug as fixed by commit "foo: bar".
syz-ci will find this commit in the main namespace repo
and upload commmit hash/date/author to dashboard. This in turn
allows to show links to fixing commits.
Fixes #691
Fixes #610
|
| |
|
|
|
|
| |
Fetch of a named remote does not seem to fetch all tags.
This is a problem for linux-next as it contains lots of tags
that are not on the main branch because of periodic rebases.
|
| |
|
|
|
|
|
| |
pkg/bisect uses Poll and then relies on tags for compiler detection.
Don't use --no-tags when fetching.
Update #501
|