diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2021-07-16 14:57:55 +0000 |
|---|---|---|
| committer | Aleksandr Nogikh <wp32pw@gmail.com> | 2021-07-20 13:39:45 +0200 |
| commit | 2fe31df39f956886ef214b5b028362964aa07a53 (patch) | |
| tree | 2f94fc7eb2b84927d3059e85fa0e198ba4380ec0 /pkg/instance/instance.go | |
| parent | b5969a9bdd1769ae7dc56682c4dbb8bc8f2ab7c3 (diff) | |
all: capture compiler id during the build process
Default compilers are specified in the OS- and platform-dependent logic.
It is more convenient to extract info about them during the kernel build
itself, rather than during the manager object initialization.
Apply the necessary changes throughout the code that is involved in
building the kernels and processing information about this process.
Diffstat (limited to 'pkg/instance/instance.go')
| -rw-r--r-- | pkg/instance/instance.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pkg/instance/instance.go b/pkg/instance/instance.go index 3e28f2170..70846711f 100644 --- a/pkg/instance/instance.go +++ b/pkg/instance/instance.go @@ -29,7 +29,7 @@ import ( type Env interface { BuildSyzkaller(string, string) error - BuildKernel(string, string, string, string, string, []byte) (string, string, error) + BuildKernel(string, string, string, string, string, []byte) (string, build.ImageDetails, error) Test(numVMs int, reproSyz, reproOpts, reproC []byte) ([]error, error) } @@ -106,7 +106,7 @@ func (env *env) BuildSyzkaller(repoURL, commit string) error { } func (env *env) BuildKernel(compilerBin, ccacheBin, userspaceDir, cmdlineFile, sysctlFile string, kernelConfig []byte) ( - string, string, error) { + string, build.ImageDetails, error) { imageDir := filepath.Join(env.cfg.Workdir, "image") params := build.Params{ TargetOS: env.cfg.TargetOS, @@ -121,18 +121,18 @@ func (env *env) BuildKernel(compilerBin, ccacheBin, userspaceDir, cmdlineFile, s SysctlFile: sysctlFile, Config: kernelConfig, } - kernelSign, err := build.Image(params) + details, err := build.Image(params) if err != nil { - return "", "", err + return "", details, err } if err := SetConfigImage(env.cfg, imageDir, true); err != nil { - return "", "", err + return "", details, err } kernelConfigFile := filepath.Join(imageDir, "kernel.config") if !osutil.IsExist(kernelConfigFile) { kernelConfigFile = "" } - return kernelConfigFile, kernelSign, nil + return kernelConfigFile, details, nil } func SetConfigImage(cfg *mgrconfig.Config, imageDir string, reliable bool) error { |
