aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/vcs/linux.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-07-07 09:06:48 +0200
committerDmitry Vyukov <dvyukov@google.com>2020-07-07 10:40:55 +0200
commitf7b01f08a31f0ab533410a3ba3b74f781674e059 (patch)
tree1c5789396db89c50ee301c12743f2f72da3734ae /pkg/vcs/linux.go
parente419f4e6d851d09202e550ac2a5975ef68fd6935 (diff)
pkg/vcs: fix config bisection tests more
config-bisect.pl uses bash-isms and can't run on non-linux. It also silently ignores all errors which made failures very obscure -- the script happily succeeds in presence of any errors. So the test failed later reading .config. Use "set -eu" to not fail silently. Also trace all config-bisect.pl invocations and output. good/bad decisions are important and we always log them in the normal bisection.
Diffstat (limited to 'pkg/vcs/linux.go')
-rw-r--r--pkg/vcs/linux.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/vcs/linux.go b/pkg/vcs/linux.go
index 3509c361a..a9a823621 100644
--- a/pkg/vcs/linux.go
+++ b/pkg/vcs/linux.go
@@ -273,6 +273,7 @@ func (ctx *linux) Minimize(original, baseline []byte, trace io.Writer,
if err != nil {
return nil, fmt.Errorf("config bisect failed: %v", err)
}
+ fmt.Fprintf(trace, "# config-bisect.pl -r:\n%s", output)
for {
config, err := ioutil.ReadFile(filepath.Join(ctx.git.dir, ".config"))
if err != nil {
@@ -293,6 +294,7 @@ func (ctx *linux) Minimize(original, baseline []byte, trace io.Writer,
output1, err := osutil.RunCmd(time.Hour, "", configBisect,
"-l", ctx.git.dir, "-b", ctx.git.dir, kernelBaselineConfig, kernelConfig, verdict)
+ fmt.Fprintf(trace, "# config-bisect.pl %v:\n%s", verdict, output1)
output = append(output, output1...)
if err != nil {
if verr, ok := err.(*osutil.VerboseError); ok && verr.ExitCode == 2 {