aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/vcs/git_repo_test.go
Commit message (Collapse)AuthorAgeFilesLines
* pkg/vcs: export GitWrapperAleksandr Nogikh2025-01-091-1/+1
| | | | | | | | | | | | | 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.
* pkg/vcs: change HeadCommit to CommitDmitry Vyukov2024-10-151-3/+3
| | | | | | | 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.
* pkg/vcs: delete ListRecentCommits()Aleksandr Nogikh2023-12-201-10/+0
| | | | It's not needed anymore.
* all: use `t.TempDir` to create temporary test directoryEng Zer Jun2022-03-281-16/+3
| | | | | | | | | This commit replaces all `ioutil.TempDir` with `t.TempDir` in tests. The directory created by `t.TempDir` is automatically removed when the test and all its subtests complete. Reference: https://pkg.go.dev/testing#T.TempDir Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
* pkg/vcs: add repo.Contains methodDmitry Vyukov2020-12-251-0/+29
| | | | | | Returns true if the current tree contains the specified commit (the commit is reachable from the current HEAD). Cntains(commit string) (bool, error)
* pkg/kconfig: store minimization resultsJouni Hogander2020-12-101-8/+2
| | | | | Store config options identified using DebugTracer. Also change bisection and configuration minimization code to use new DebugTracer.
* pkg/vcs: add repo OptPrecious and OptDontSandbox optionsDmitry Vyukov2020-10-211-1/+1
| | | | | | | | | | 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
* pkg: get and store Maintainers dataPedro Lopes2020-07-311-2/+2
| | | | | | 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.
* .golangci.yml: reenable dupl checkerDmitry Vyukov2020-06-051-49/+23
| | | | | At some point it was enabled, but then somehow got disabled. Re-enable and fix some regressions.
* pkg/vcs: always extract tags from subjectDmitry Vyukov2020-05-181-0/+10
|
* pkg/bisect: add test for #1527Dmitry Vyukov2019-12-101-0/+7
| | | | Update #1527
* pkg/bisect: detect wrong bisectionsDmitry Vyukov2019-11-071-0/+5
| | | | | | | | 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
* pkg/bisect: add initial testing support for cause bisectionZubin Mithra2019-10-221-105/+20
| | | | | | | | | | | | | | | | | | | | | | | | (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.
* pkg/vcs: handle git commits without a bodyAnton Lindqvist2019-09-241-0/+7
| | | | | | | | | | 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
* pkg/vcs: refactor bisection supportDmitry Vyukov2019-03-171-4/+143
| | | | | | | | | | | | | | | 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
* dashboard/app: poll commits infoDmitry Vyukov2019-02-171-1/+179
| | | | | | | | | | | | | | | 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
* pkg/vcs: disable sandboxing in testsDmitry Vyukov2018-12-181-0/+5
| | | | syz-ci disabling does not work across syz-ci updates.
* pkg/vcs: fix fetching of commits on non master branchDmitry Vyukov2018-12-161-0/+163
Fixes #728