aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/vcs/vcs.go
Commit message (Collapse)AuthorAgeFilesLines
* all: remove unused nolint directivesDmitry Vyukov2026-01-021-2/+0
|
* pkg/vcs: reduce cyclomatic complexity link funcDmitry Vyukov2025-12-291-47/+63
|
* pkg/vcs: support git@github.com reposDmitry Vyukov2025-12-291-0/+3
|
* pkg: restore vcs.TreeLink and html.SetGlobSearchPathMarco Elver2025-06-061-0/+5
| | | | | | | This partially reverts commit 43f51a00700e5960fc890e6c3d596846757bf29d to restore vcs.TreeLink and html.SetGlobSearchPath. This broke internal code.
* pkg/vcs: extend ListCommitHashesAleksandr Nogikh2025-05-131-2/+9
| | | | | | | | | | 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.
* all: delete dead codeTaras Madan2025-02-101-4/+0
| | | | | go install golang.org/x/tools/cmd/deadcode@latest deadcode -test ./...
* pkg/vcs: export GitWrapperAleksandr Nogikh2025-01-091-5/+5
| | | | | | | | | | | | | 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: extend ListCommitHashesAleksandr Nogikh2025-01-031-1/+1
| | | | Support filtering by the commit date.
* pkg/build: add build command for starnixLaura Peskin2024-10-301-0/+3
| | | | Co-authored-by: eep@google.com
* pkg/vcs: expose commit patchDmitry Vyukov2024-10-151-0/+1
| | | | Add Commit.Patch with patch body.
* pkg/vcs: change HeadCommit to CommitDmitry Vyukov2024-10-151-2/+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.
* syz-ci: introduce gitArchive parametersTaras Madan2024-10-101-0/+3
| | | | | | | Some commits don't live long remotely. It sometimes happens we need them later to: 1. Merge coverage. 2. Mention during communication.
* pkg/covermerger: optimize checkoutsTaras Madan2024-08-291-0/+3
| | | | | Every commit checkout takes >3 seconds. Let's optimize this operation to save on large merges.
* all: remove akaros supportDmitry Vyukov2024-04-151-2/+0
| | | | | | | Akaros support is unused, it was shutdown on syzbot for a while, the akaros development seems to be frozen for years as well. We have a bunch of hacks for Akaros since it supported only super old gcc and haven't supported Go. Remove it.
* pkg/vcs: delete ListRecentCommits()Aleksandr Nogikh2023-12-201-3/+0
| | | | It's not needed anymore.
* pkg/vcs/vcs.go: nolint goconst because it improves readabilityTaras Madan2023-10-261-0/+1
| | | | To unblock #4285.
* pkg/bisect: test a subset of releasesAleksandr Nogikh2023-08-251-0/+26
| | | | | | | | | | For older bugs (or for bugs on stable trees), our cause bisection strategy times out while trying to iterate over all reachable tags. Try to be smarter and only take a subset of them, thus limiting the time we spend detecting the bug-free release. Closes #3376.
* syz-ci: specify per-manager bisection backportsAleksandr Nogikh2023-07-201-1/+2
| | | | | | | | It might be the case that the kernels that are being fuzzed on syz-ci require their own backports to build/test older revisions during bisection. Let users specify it in the syz-ci config.
* pkg/bisect: try to drop instrumentationAleksandr Nogikh2023-07-051-2/+3
| | | | | | | | | | Refactor Minimize(). As a part of Minimize(), attempt to drop all unnecessary instrumentation and test whether the kernel is still crashing. This should reduce the number of irrelevant crashes during bisection and thus increase bisection result quality.
* pkg/vcs: extract merge bases of two commitsAleksandr Nogikh2023-04-281-0/+3
|
* pkg/vcs: add two more vcs.Repo methodsAleksandr Nogikh2023-04-061-0/+10
| | | | | | | 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.
* pkg/bisect: use default compiler during bisection where possibleSpace Meyer2022-10-071-2/+2
| | | | | | | This allows us to bisect at least recently introduced bugs, where the manager that found the bug uses a non standard compiler. This is usefull during development of a new sanitizer for which a compiler with non-upstreamed patches is required.
* pkg/bisect: try to reidentify commit rebased after crashSpace Meyer2022-10-061-5/+6
| | | | | | | | | | | | | | When bisecting a breaking commit, syzkaller starts the bisection from the commit recorded in the last crash for the given bug. Previously the bisection was aborted should the commit no longer exist in the repo. Now we try to reidentify the breaking commit. For git pretty much the best we can do is to search a commit reachable from HEAD with the same title. Other VCS systems might have something better. Syzkaller will still first validate that the start commit is indeed broken in the way it expects. This prevents syzkaller from getting confused should we accidentally pick a completely unrelated commit.
* pkg/bisect: support clang for crash bisectionSpace Meyer2022-09-011-2/+2
| | | | | Before we hardcoded bisection to use gcc, now the compiler family can be configured in the bisection config.
* pkg/vcs: fetch linux upstream stable before bisectionsSpace Meyer2022-09-011-2/+6
|
* pkg/vcs: add FileLinkDmitry Vyukov2022-05-201-5/+17
| | | | | | | Add a function that produces a link to a source file:line for the given repository/commit. Update #652
* dashboard/app: show link to git commit for patch testingDmitry Vyukov2021-03-131-3/+20
|
* pkg/vcs: allow sso protocol for git reposDmitry Vyukov2021-01-091-2/+2
|
* pkg/vcs: allow ~ in git repo URLsDmitry Vyukov2020-12-301-3/+3
|
* pkg/vcs: reorder codeDmitry Vyukov2020-12-251-50/+50
| | | | | Recipients is not the most importnat part of the vcs interface, move it from the very top closer to the bottom.
* pkg/vcs: add repo.Contains methodDmitry Vyukov2020-12-251-0/+4
| | | | | | 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-3/+3
| | | | | Store config options identified using DebugTracer. Also change bisection and configuration minimization code to use new DebugTracer.
* tools/syz-bisect: use vcs.HEAD by defaultJouni Hogander2020-12-101-0/+2
| | | | Use vcs.HEAD if syzkaller or kernel commit is not given
* tools/syz-reprolist: don't drop syzkaller repo on errorsDmitry Vyukov2020-11-241-2/+2
|
* pkg/kconfig: accept target when parsing KconfigDmitry Vyukov2020-10-291-1/+2
| | | | | | Kconfig depends on the target arch. Add target argument for Kconfig parsing. Resolve $(SRCARCH) properly (previously we always assumed x86_64).
* tools/syz-kconf: detect -rcN tagsDmitry Vyukov2020-10-291-1/+1
| | | | | | 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.
* sys/targets: add OS/Arch name constsDmitry Vyukov2020-10-261-7/+8
| | | | | | | | | | | | We use strings to identify OS/Arch. These strings are duplicated throughout the code base massively. golangci-lint points to possiblity of typos and duplication. We already had to define these names in pkg/csource and disable checking for prog package. A future change triggers such warnings in another package. Add OS/Arch name consts to sys/targets so that they can be used to refer to OS/Arch. Use the consts everywhere.
* pkg/vcs: add repo OptPrecious and OptDontSandbox optionsDmitry Vyukov2020-10-211-10/+20
| | | | | | | | | | 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/vcs: add ReleaseTagDmitry Vyukov2020-10-211-0/+4
| | | | | | | Add ReleaseTag method that returns last release tag for the given commit. Update #2171
* pkg/vcs: use committer dateTetsuo Handa2020-10-101-0/+1
| | | | | | | | 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
* pkg/vcs: support git URL starting with file:///Alexander Egorenkov2020-10-021-2/+6
| | | | | | For use inside a Docker container e.g. Signed-off-by: Alexander Egorenkov <Alexander.Egorenkov@ibm.com>
* pkg: get and store Maintainers dataPedro Lopes2020-07-311-1/+54
| | | | | | 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.
* pkg/vcs: don't sandbox syzkaller repoDmitry Vyukov2020-07-121-6/+3
| | | | | | | | | | | | | | | | | | | 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.
* pkg/bisect: Implement config bisectionJouni Hogander2020-07-021-0/+4
| | | | | | | | | Implement Linux kernel configuration bisection. Use bisected minimalistic configuration in commit bisection. Utilizes config_bisect.pl script from Linux kernel tree in bisection. Modify syz-bisect to read in kernel.baseline_config. This is used as a "good" configuration when bisection is run.
* pkg/vcs: Fix golangci-lint formatting errorPaul Chaignon2020-04-061-3/+4
| | | | | | | | pkg/vcs/vcs.go:186:2: var `gitSshRepoRe` should be `gitSSHRepoRe` gitSshRepoRe = regexp.MustCompile(`^(git|ssh|http|https|ftp|ftps)@[a-zA-Z0-9-_]+(\.[a-zA-Z0-9-_]+)+(:[a-zA-Z0-9-_]+)?(/[a-zA-Z0-9-_./]+)?(/)?$`) ^ Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
* pkg/vcs: Support ssh git reposJukka Kaartinen2020-04-031-1/+2
| | | | Signed-off-by: Jukka Kaartinen <jukka.kaartinen@unikie.com>
* pkg/vcs: Unset various git environment variables when invoking gitAndrew Donnellan2019-12-121-0/+5
| | | | | | | | | | | | | | | | 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>
* pkg/vcs: don't CC people on CC (sic)Dmitry Vyukov2019-12-101-2/+2
| | | | Update #1441
* dashboard/app: don't report bisections pointing to release commitsDmitry Vyukov2019-11-271-0/+2
| | | | | | | | | | | 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
* pkg/bisect: detect wrong bisectionsDmitry Vyukov2019-11-071-0/+1
| | | | | | | | 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