aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/vcs/testos.go
Commit message (Collapse)AuthorAgeFilesLines
* pkg/vcs: export GitWrapperAleksandr Nogikh2025-01-091-3/+3
| | | | | | | | | | | | | 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.
* syz-ci: specify per-manager bisection backportsAleksandr Nogikh2023-07-201-0/+1
| | | | | | | | 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-1/+5
| | | | | | | | | | 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/bisect: use default compiler during bisection where possibleSpace Meyer2022-10-071-2/+4
| | | | | | | 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: 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-0/+4
|
* 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.
* pkg/kconfig: accept target when parsing KconfigDmitry Vyukov2020-10-291-1/+3
| | | | | | 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.
* pkg/bisect: switch to kconfig.MinimizeDmitry Vyukov2020-10-211-2/+5
| | | | | | | | | | | | | | | Use the new kconfig.Minimize for config minization instead of the config-bisect.pl script. This is mostly just deleting code. Also update tests: - minimization is now supposed to test the baseline config (update "testos" stub accordingly) - minimization is not supposed to return a config that does not build (a reasonable config minimization procedure can't arrive to such config), remove test that tests this Update #2171
* pkg/vcs: fix testDmitry Vyukov2020-10-211-1/+3
| | | | | | | | Minimization must call the predicate (otherwise how does it know this config triggers the crash?). This does not matter now, but will matter in future. Update #2171
* pkg/vcs: add repo OptPrecious and OptDontSandbox optionsDmitry Vyukov2020-10-211-2/+2
| | | | | | | | | | 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-1/+1
| | | | | | | Add ReleaseTag method that returns last release tag for the given commit. Update #2171
* pkg/bisect: improve config minimization testsDmitry Vyukov2020-07-021-2/+8
| | | | | | | Change a test to actually produce a new config as it is supposed to do during config minimization and check the resulting config. Add a regression test for the bug where we committed a broken config.
* pkg/bisect: Implement config bisectionJouni Hogander2020-07-021-1/+16
| | | | | | | | | 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: make EnvForCommit return full compiler pathDmitry Vyukov2019-10-221-4/+3
| | | | | | | All callers of EnvForCommit need the compiler path, so move this logic into EnvForCommit to avoid duplication. Also simplifies tests because test impl can now return an empty compiler (which should be unused).
* pkg/bisect: add initial testing support for cause bisectionZubin Mithra2019-10-221-0/+23
(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.