aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/vcs
Commit message (Collapse)AuthorAgeFilesLines
* pkg/vcs: be more strict in BaseForDiffAleksandr Nogikh2026-01-162-6/+41
| | | | | | | | | | 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.
* pkg/vcs: return multiple base commit candidatesAleksandr Nogikh2026-01-132-28/+62
| | | | | Return the commits that represent unique sets of branches. Sort the list topologically, breaking ties by commit date.
* pkg/vcs: find base commit by blob sha hashesAleksandr Nogikh2026-01-092-0/+264
| | | | | | 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.
* pkg/vcs: extend git testing helpersAleksandr Nogikh2026-01-092-12/+29
| | | | | Add a commitChangeset() method to simplify setting up repository states in tests.
* pkg/vcs: extend ParseGitDiffAleksandr Nogikh2026-01-092-11/+46
| | | | Return not just the modified files, but also their blob hashes.
* all: remove unused nolint directivesDmitry Vyukov2026-01-022-4/+0
|
* pkg/vcs: reduce cyclomatic complexity link funcDmitry Vyukov2025-12-291-47/+63
|
* pkg/vcs: support git@github.com reposDmitry Vyukov2025-12-292-0/+15
|
* pkg/vcs: backport fixes for devm_drm_of_get_bridge link errorAleksandr Nogikh2025-09-021-0/+12
| | | | | | This should fix our broken bisections. Closes #6136.
* all: apply linter auto fixesTaras Madan2025-07-171-5/+7
| | | | ./tools/syz-env bin/golangci-lint run ./... --fix
* pkg/report: use crash.KASANUnknown instead of crash.KASANOtherTaras Madan2025-07-031-2/+2
| | | | | | What we need is the category for "matched unknown KASAN bug". This king on bugs should be recategorised. The final goal is to keep this category empty.
* pkg/report: split crash.KASAN into partsTaras Madan2025-07-031-2/+2
| | | | We want to prioritize KASAN bugs differently.
* dashboard/app: use crash types instead, no regexpsTaras Madan2025-07-021-31/+55
|
* pkg/vcs: don't re-clone on network errorsAleksandr Nogikh2025-06-171-2/+10
| | | | | | | | | | | | | | | | 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.
* 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-134-39/+50
| | | | | | | | | | 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.
* pkg/vcs: use clang-15 for builds up to v6.15Aleksandr Nogikh2025-04-242-3/+11
| | | | | Otherwise we need to backport too many fix commits to address build/boot errors.
* pkg/vcs: cherry-pick the batman-adv fixAleksandr Nogikh2025-04-231-0/+7
| | | | | | | | The bug is easily triggerable during fuzzing / running reproducers and it was present in torvalds for ~1.5 months. Backport it when building these revisions in order to not derail the bisections.
* pkg/vcs: backport a binder_add_device fixAleksandr Nogikh2025-03-121-0/+6
| | | | | Otherwise we will not be able to bisect 3 months of Linux kernel history.
* pkg/vcs: add one more Linux backportAleksandr Nogikh2025-02-171-0/+6
| | | | | | | The commit should fix the bisections for the period of 2-3 months. See e.g. this failed bisection: https://syzkaller.appspot.com/x/bisect.txt?x=124a9200580000
* all: remove loop variables scopingTaras Madan2025-02-171-1/+0
|
* all: delete dead codeTaras Madan2025-02-102-23/+0
| | | | | go install golang.org/x/tools/cmd/deadcode@latest deadcode -test ./...
* all: use min/max functionsDmitry Vyukov2025-01-171-3/+1
| | | | They are shorter, more readable, and don't require temp vars.
* pkg/vcs: export GitWrapperAleksandr Nogikh2025-01-099-209/+245
| | | | | | | | | | | | | 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-034-8/+16
| | | | Support filtering by the commit date.
* pkg/vcs: work around bug in jiri prebuilt_versions hookLaura Peskin2024-12-091-1/+5
| | | | | | Invoke `jiri update` twice (once from the fuchsia bootstrap script, then as a standalone command) when initializing a new fuchsia checkout.
* pkg/vcs: backport "Fix broken irq restoration in kvm_wait" for bisectAleksandr Nogikh2024-12-051-0/+6
| | | | It unblocks the bisection for the period of Jan 2021-Mar 2021.
* pkg/vcs: implement remaining Repo methods for fuchsiaLaura Peskin2024-12-051-9/+16
| | | | | | | | | | | | | | | | | This is a temporary workaround for managing a fuchsia checkout: - Mark the repo as "precious" so that checkout operations don't delete GN args and other build configuration state. In a follow-up, this will be replaced by a fuchsia-specific `repair` method using `fx clean`. - Checkout operations apply only to fuchsia.git, which has a chance of creating inconsistencies between versions of fuchsia and its dependencies. The main poll workflow (using `jiri`) is not affected by this problem, but bisection workflows may fail. This will be fixed in a follow-up by checking out branches and commits from fuchsia's global integration repo.
* pkg/build: add build command for starnixLaura Peskin2024-10-302-4/+10
| | | | Co-authored-by: eep@google.com
* pkg/vcs: parse git diffsAleksandr Nogikh2024-10-252-0/+33
| | | | Provide a functionality to extract the files affected by a git patch.
* pkg/vcs: more not implemented for fuchsiaTaras Madan2024-10-241-8/+8
|
* pkg/vcs: expose commit patchDmitry Vyukov2024-10-153-2/+34
| | | | Add Commit.Patch with patch body.
* pkg/vcs: change HeadCommit to CommitDmitry Vyukov2024-10-157-38/+35
| | | | | | | 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-103-0/+16
| | | | | | | 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-293-0/+23
| | | | | Every commit checkout takes >3 seconds. Let's optimize this operation to save on large merges.
* sys/targets: add consts for gvisor/starnixDmitry Vyukov2024-05-271-1/+1
| | | | | Lint started warning about duplicate "gvisor" const in pkg/cover. Add gvisor/starnix consts to sys/targets package to avoid duplication.
* tools/syz-linter: check t.Logf/Errorf/Fatalf messagesDmitry Vyukov2024-04-171-1/+1
| | | | | Fix checking of Logf, it has string in 0-th arg. Add checking of t.Errorf/Fatalf.
* all: remove akaros supportDmitry Vyukov2024-04-152-29/+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: remove parentheses from email testsAleksandr Nogikh2024-03-221-8/+8
| | | | | | | | | | | There's unfortunately no consistency in how mail.ParseAddress reacts to parentheses in display names. Versions before 1.22 used to keep them, 1.22+ cut them out. For syzbot operation the difference is not very significant, but it makes our tests too version dependent. Let's just omit parentheses from the test cases.
* pkg/bisect: make bisection more robustSimone Weiß2024-03-181-2/+7
| | | | | | | Bisection should not fail if the Kconfig or the baseline config have issues. Broken kernel sources might lead to issues when parsing Kconfig, ignore this and proceed with the original config. If the baseline config is not parseable, proceed anyway as this is an optional parameter to begin with.
* pkg/vcs: support fetches by a short git hashAleksandr Nogikh2024-03-052-2/+24
| | | | | | | | | | | | 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.
* pkg/vcs: make git fetch calls more specificAleksandr Nogikh2024-01-173-4/+63
| | | | | | | | | 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.
* pkg/vcs: delete ListRecentCommits()Aleksandr Nogikh2023-12-204-28/+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/vcs: circumvent ref conflicts during fetchAleksandr Nogikh2023-08-301-0/+13
| | | | | | | | | | 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.
* pkg/bisect: test a subset of releasesAleksandr Nogikh2023-08-252-24/+34
| | | | | | | | | | 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.
* pkg/vcs: don't supress rcu stall reports twiceAleksandr Nogikh2023-08-182-5/+23
| | | | First check if the cmdline config is already present.
* pkg/vcs: patch an objtool Linux bugAleksandr Nogikh2023-08-091-0/+8
| | | | | | | | | | The following error appears when bisecting older Linux versions: check.c: In function 'validate_call': check.c:2865:58: error: '%d' directive output may be truncated writing between 1 and 10 bytes into a region of size 9 [-Werror=format-truncation=] 2865 | snprintf(pvname, sizeof(pvname), "pv_ops[%d]", idx);
* pkg/vcs: add tests for automatic backportsAleksandr Nogikh2023-08-042-2/+118
| | | | Also, slightly refactor the code to facilitate testing.
* pkg/vcs: add a Comment field to backport descriptionsAleksandr Nogikh2023-08-041-0/+2
| | | | | | | | These backports are also specified in syz-ci configs, which are stored as plain JSON files. Add a special dummy field that will be used for remembering the rationale for the backport as well as useful links.