fix: correct success rate
This commit is contained in:
parent
10c5fb7ac4
commit
6db5ffc8c2
11
pew.go
11
pew.go
@ -353,13 +353,11 @@ func testKernelExploit(q *qemu.System, ka config.Artifact,
|
|||||||
}
|
}
|
||||||
|
|
||||||
func genOkFail(name string, ok bool) (aurv aurora.Value) {
|
func genOkFail(name string, ok bool) (aurv aurora.Value) {
|
||||||
state.Overall += 1
|
|
||||||
s := " " + name
|
s := " " + name
|
||||||
if name == "" {
|
if name == "" {
|
||||||
s = ""
|
s = ""
|
||||||
}
|
}
|
||||||
if ok {
|
if ok {
|
||||||
state.Success += 1
|
|
||||||
s += " SUCCESS "
|
s += " SUCCESS "
|
||||||
aurv = aurora.BgGreen(aurora.Black(s))
|
aurv = aurora.BgGreen(aurora.Black(s))
|
||||||
} else {
|
} else {
|
||||||
@ -410,9 +408,15 @@ func dumpResult(q *qemu.System, ka config.Artifact, ki distro.KernelInfo,
|
|||||||
Str("timeout", fmt.Sprintf("%v", q.KilledByTimeout)).
|
Str("timeout", fmt.Sprintf("%v", q.KilledByTimeout)).
|
||||||
Msg("internal")
|
Msg("internal")
|
||||||
res.InternalErrorString = res.InternalError.Error()
|
res.InternalErrorString = res.InternalError.Error()
|
||||||
|
} else {
|
||||||
|
colored := ""
|
||||||
|
|
||||||
|
state.Overall += 1
|
||||||
|
|
||||||
|
if res.Test.Ok {
|
||||||
|
state.Success += 1
|
||||||
}
|
}
|
||||||
|
|
||||||
colored := ""
|
|
||||||
switch ka.Type {
|
switch ka.Type {
|
||||||
case config.KernelExploit:
|
case config.KernelExploit:
|
||||||
colored = aurora.Sprintf("%s %s",
|
colored = aurora.Sprintf("%s %s",
|
||||||
@ -435,7 +439,6 @@ func dumpResult(q *qemu.System, ka config.Artifact, ki distro.KernelInfo,
|
|||||||
additional = "(timeout)"
|
additional = "(timeout)"
|
||||||
}
|
}
|
||||||
|
|
||||||
if res.InternalError == nil {
|
|
||||||
if additional != "" {
|
if additional != "" {
|
||||||
q.Log.Info().Msgf("%v %v", colored, additional)
|
q.Log.Info().Msgf("%v %v", colored, additional)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user