Commit Graph

6 Commits

Author SHA1 Message Date
Dmitry Vyukov
30cb7f98cd pkg/bisect: detect wrong bisections
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
2019-11-07 11:07:03 +01:00
Dmitry Vyukov
4ee855e7ec tools/syz-testbuild: fix too long line 2019-10-22 15:58:22 +02:00
Dmitry Vyukov
084e388155 pkg/vcs: make EnvForCommit return full compiler path
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).
2019-10-22 15:41:03 +02:00
Zubin Mithra
a2bdbd8c37 pkg/bisect: add initial testing support for cause bisection
(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.
2019-10-22 10:09:57 +02:00
Dmitry Vyukov
39449875b6 syz-ci: don't assume kernel config is called .config
.config is linux-ism. We have a convention that kernel config
is copied to kernel.config file. Use it.
2019-05-12 11:38:18 +02:00
Dmitry Vyukov
93e723abbc tools/syz-testbuild: add utility for kernel build testing
syz-testbuild tests kernel build/boot on releases as it will be done by pkg/bisect.
This allows to ensure that, for example, a change to kernel config won't break
build/boot on older releases and consequently won't break bisection process.
The binary needs to run under root because it creates images.
The kernel checkout given to the tool will be cleaned and used for in-tree builds.
Example invocation:

sudo syz-testbuild -kernel_src $LINUX_CHECKOUT \
	-config dashboard/config/upstream-kasan.config \
	-sysctl dashboard/config/upstream.sysctl \
	-cmdline dashboard/config/upstream-apparmor.cmdline \
	-userspace $WHEEZY_USERSPACE \
	-bisect_bin $BISECT_BIN

A suitable wheezy userspace can be downloaded from:
https://storage.googleapis.com/syzkaller/wheezy.tar.gz
A set of binaries required for bisection (older compilers) can be downloaded from:
https://storage.googleapis.com/syzkaller/bisect_bin.tar.gz
2019-03-17 18:06:44 +01:00