aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/syz-testbed/stats.go2
-rw-r--r--tools/syz-testbed/table.go17
2 files changed, 18 insertions, 1 deletions
diff --git a/tools/syz-testbed/stats.go b/tools/syz-testbed/stats.go
index 1ff4af4d0..0db75c45c 100644
--- a/tools/syz-testbed/stats.go
+++ b/tools/syz-testbed/stats.go
@@ -142,7 +142,7 @@ func (view StatView) GenerateBugTable() (*Table, error) {
for _, bug := range summaries {
for _, group := range view.Groups {
if bug.found[group.Name] {
- table.Set(bug.title, group.Name, "YES")
+ table.Set(bug.title, group.Name, NewBoolCell(true))
}
}
}
diff --git a/tools/syz-testbed/table.go b/tools/syz-testbed/table.go
index f8ead50fb..31312ac93 100644
--- a/tools/syz-testbed/table.go
+++ b/tools/syz-testbed/table.go
@@ -35,6 +35,10 @@ type RatioCell struct {
TotalCount int
}
+type BoolCell struct {
+ Value bool
+}
+
func NewValueCell(sample *stats.Sample) *ValueCell {
return &ValueCell{Value: sample.Median(), Sample: sample}
}
@@ -55,6 +59,19 @@ func (c *RatioCell) String() string {
return fmt.Sprintf("%d / %d", c.TrueCount, c.TotalCount)
}
+func NewBoolCell(value bool) *BoolCell {
+ return &BoolCell{
+ Value: value,
+ }
+}
+
+func (c *BoolCell) String() string {
+ if c.Value {
+ return "YES"
+ }
+ return "NO"
+}
+
func NewTable(topLeft string, columns ...string) *Table {
return &Table{
TopLeftHeader: topLeft,