Skip to content

Commit

Permalink
drop = sign in pastseed
Browse files Browse the repository at this point in the history
Signed-off-by: Pierre Fenoll <[email protected]>
  • Loading branch information
fenollp committed Apr 23, 2023
1 parent 8b26d7f commit 58a87e5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions do_pastseed.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (
rt "github.com/FuzzyMonkeyCo/monkey/pkg/runtime"
)

var rePastseed = regexp.MustCompile(rt.PastSeedMagic + `=([^\s]+)`)
var rePastseed = regexp.MustCompile(rt.PastSeedMagic + ` ([^\s]+)`)

// Looks in the logs for the youngest seed that triggered a bug
// Only ever prints best seed on a newline character
// Only ever prints best seed and a newline character
// so it can be used as --seed=$(monkey pastseed)
func doPastseed(starfile string) int {
for offset := uint64(1); true; offset++ {
Expand Down
6 changes: 3 additions & 3 deletions pkg/runtime/fuzz.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ func (rt *Runtime) Fuzz(
ctx = metadata.AppendToOutgoingContext(ctx, "token", fuzzRep.GetToken())
}
// Keep in this order (suggested last) for pastseed
log.Printf("[ERR] (not an error) %s=%s (seed)", PastSeedMagic, fuzzRep.GetSeed())
log.Printf("[ERR] (not an error) %s=%s (suggested)", PastSeedMagic, suggestedSeed)
log.Printf("[ERR] (not an error) %s %s (seed)", PastSeedMagic, fuzzRep.GetSeed())
log.Printf("[ERR] (not an error) %s %s (suggested)", PastSeedMagic, suggestedSeed)
rt.progress.Printf(" --seed=%s", fuzzRep.GetSeed())
return
}
Expand Down Expand Up @@ -130,7 +130,7 @@ func (rt *Runtime) Fuzz(
case *fm.Srv_FuzzingResult_:
result = msg.FuzzingResult
suggestedSeed = result.GetSuggestedSeed()
log.Printf("[ERR] (not an error) %s=%s (suggested)", PastSeedMagic, suggestedSeed)
log.Printf("[ERR] (not an error) %s %s (suggested)", PastSeedMagic, suggestedSeed)
return
default: // unreachable
err = fmt.Errorf("unhandled srv msg %T: %+v", msg, srv)
Expand Down

0 comments on commit 58a87e5

Please sign in to comment.