aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/vcs/git.go
diff options
context:
space:
mode:
authorJouni Hogander <jouni.hogander@unikie.com>2020-11-10 15:01:26 +0200
committerDmitry Vyukov <dvyukov@google.com>2020-12-10 12:57:35 +0100
commitcbdf514ebdff5b19bc93cdfcc81598587627330e (patch)
treecec672b32afba297ff06bc3cd4d39205596cc78a /pkg/vcs/git.go
parentf86bec81e1bafa82d30486258de616fff295b5f7 (diff)
pkg/kconfig: store minimization results
Store config options identified using DebugTracer. Also change bisection and configuration minimization code to use new DebugTracer.
Diffstat (limited to 'pkg/vcs/git.go')
-rw-r--r--pkg/vcs/git.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/pkg/vcs/git.go b/pkg/vcs/git.go
index 1a90341ac..163f3e497 100644
--- a/pkg/vcs/git.go
+++ b/pkg/vcs/git.go
@@ -7,7 +7,6 @@ import (
"bufio"
"bytes"
"fmt"
- "io"
"net/mail"
"os"
"os/exec"
@@ -16,6 +15,7 @@ import (
"strings"
"time"
+ "github.com/google/syzkaller/pkg/debugtracer"
"github.com/google/syzkaller/pkg/hash"
"github.com/google/syzkaller/pkg/log"
"github.com/google/syzkaller/pkg/osutil"
@@ -431,7 +431,8 @@ func splitEmail(email string) (user, domain string, err error) {
return
}
-func (git *git) Bisect(bad, good string, trace io.Writer, pred func() (BisectResult, error)) ([]*Commit, error) {
+func (git *git) Bisect(bad, good string, dt debugtracer.DebugTracer, pred func() (BisectResult,
+ error)) ([]*Commit, error) {
git.reset()
firstBad, err := git.getCommit(bad)
if err != nil {
@@ -442,7 +443,7 @@ func (git *git) Bisect(bad, good string, trace io.Writer, pred func() (BisectRes
return nil, err
}
defer git.reset()
- fmt.Fprintf(trace, "# git bisect start %v %v\n%s", bad, good, output)
+ dt.Log("# git bisect start %v %v\n%s", bad, good, output)
current, err := git.HeadCommit()
if err != nil {
return nil, err
@@ -463,7 +464,7 @@ func (git *git) Bisect(bad, good string, trace io.Writer, pred func() (BisectRes
firstBad = current
}
output, err = git.git("bisect", bisectTerms[res])
- fmt.Fprintf(trace, "# git bisect %v %v\n%s", bisectTerms[res], current.Hash, output)
+ dt.Log("# git bisect %v %v\n%s", bisectTerms[res], current.Hash, output)
if err != nil {
if bytes.Contains(output, []byte("There are only 'skip'ped commits left to test")) {
return git.bisectInconclusive(output)