aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-09-03 09:45:50 +0200
committerDmitry Vyukov <dvyukov@google.com>2018-09-03 16:22:41 +0200
commitffd18c6443b683c4a6a320e7fb5fadca90541612 (patch)
treeaada59e8e1afcc5b270aef2509d31edc44eee6d4
parentbfe906cbb9c73c326f24327e1a89bc0cd0c314c7 (diff)
dashboard/app: split repo and branch by space
We currently split them with / which makes it hard to copy paste and generally understand that these are 2 separate things. Split them with a space. User request: https://groups.google.com/forum/#!msg/syzkaller-bugs/yNFv3qgXY3I/ejPrxLCdBAAJ
-rw-r--r--dashboard/app/app_test.go5
-rw-r--r--dashboard/app/email_test.go14
-rw-r--r--dashboard/app/entities.go5
-rw-r--r--dashboard/app/jobs_test.go8
-rw-r--r--dashboard/app/reporting_test.go25
5 files changed, 37 insertions, 20 deletions
diff --git a/dashboard/app/app_test.go b/dashboard/app/app_test.go
index f782c5e70..6e9c21072 100644
--- a/dashboard/app/app_test.go
+++ b/dashboard/app/app_test.go
@@ -147,6 +147,11 @@ var testConfig = &GlobalConfig{
},
},
},
+ KernelRepos: map[string]KernelRepo{
+ "repo10/branch10": {
+ Alias: "repo10alias",
+ },
+ },
}
const (
diff --git a/dashboard/app/email_test.go b/dashboard/app/email_test.go
index 3db5fa797..f9c2c9236 100644
--- a/dashboard/app/email_test.go
+++ b/dashboard/app/email_test.go
@@ -50,7 +50,7 @@ func TestEmailReport(t *testing.T) {
syzbot found the following crash on:
HEAD commit: 111111111111 kernel_commit_title1
-git tree: repo1/branch1
+git tree: repo1 branch1
console output: %[2]v
kernel config: %[3]v
dashboard link: https://testapp.appspot.com/bug?extid=%[1]v
@@ -148,7 +148,7 @@ For more options, visit https://groups.google.com/d/optout.
body := fmt.Sprintf(`syzbot has found a reproducer for the following crash on:
HEAD commit: 111111111111 kernel_commit_title1
-git tree: repo1/branch1
+git tree: repo1 branch1
console output: %[3]v
kernel config: %[4]v
dashboard link: https://testapp.appspot.com/bug?extid=%[1]v
@@ -200,7 +200,7 @@ report1
syzbot found the following crash on:
HEAD commit: 111111111111 kernel_commit_title1
-git tree: repo1/branch1
+git tree: repo1 branch1
console output: %[3]v
kernel config: %[4]v
dashboard link: https://testapp.appspot.com/bug?extid=%[1]v
@@ -246,7 +246,7 @@ Content-Type: text/plain
c.expectOK(c.POST("/_ah/mail/", incoming3))
// Now upload a C reproducer.
- build2 := testBuild(2)
+ build2 := testBuild(10)
build2.KernelCommitTitle = "a really long title, longer than 80 chars, really long-long-long-long-long-long title"
c.client2.UploadBuild(build2)
crash.BuildID = build2.ID
@@ -275,12 +275,12 @@ Content-Type: text/plain
c.expectEQ(len(msg.Attachments), 0)
body := fmt.Sprintf(`syzbot has found a reproducer for the following crash on:
-HEAD commit: 222222222222 a really long title, longer than 80 chars, re..
-git tree: repo2/branch2
+HEAD commit: 101010101010 a really long title, longer than 80 chars, re..
+git tree: repo10alias
console output: %[4]v
kernel config: %[5]v
dashboard link: https://testapp.appspot.com/bug?extid=%[1]v
-compiler: compiler2
+compiler: compiler10
syz repro: %[3]v
C reproducer: %[2]v
diff --git a/dashboard/app/entities.go b/dashboard/app/entities.go
index 56ff8fbca..9154bc68b 100644
--- a/dashboard/app/entities.go
+++ b/dashboard/app/entities.go
@@ -363,7 +363,10 @@ func kernelRepoInfoRaw(repo, branch string) KernelRepo {
}
info := config.KernelRepos[repoID]
if info.Alias == "" {
- info.Alias = repoID
+ info.Alias = repo
+ if branch != "" {
+ info.Alias += " " + branch
+ }
}
return info
}
diff --git a/dashboard/app/jobs_test.go b/dashboard/app/jobs_test.go
index 797b4eaa0..d5ad69d92 100644
--- a/dashboard/app/jobs_test.go
+++ b/dashboard/app/jobs_test.go
@@ -146,7 +146,7 @@ test crash report
Tested on:
commit: 111111111111 kernel_commit_title1
-git tree: repo1/branch1
+git tree: repo1 branch1
console output: %[3]v
kernel config: %[2]v
compiler: compiler1
@@ -188,7 +188,7 @@ failed to apply patch
Tested on:
commit: 111111111111 kernel_commit_title1
-git tree: repo1/branch1
+git tree: repo1 branch1
kernel config: %[2]v
compiler: compiler1
patch: %[1]v
@@ -233,7 +233,7 @@ Error text is too large and was truncated, full error text is at:
Tested on:
commit: 111111111111 kernel_commit_title1
-git tree: repo1/branch1
+git tree: repo1 branch1
kernel config: %[4]v
compiler: compiler1
patch: %[3]v
@@ -271,7 +271,7 @@ Reported-and-tested-by: syzbot+%v@testapp.appspotmail.com
Tested on:
commit: 111111111111 kernel_commit_title1
-git tree: repo1/branch1
+git tree: repo1 branch1
kernel config: %[3]v
compiler: compiler1
patch: %[2]v
diff --git a/dashboard/app/reporting_test.go b/dashboard/app/reporting_test.go
index 4d13fd0d5..be43899b5 100644
--- a/dashboard/app/reporting_test.go
+++ b/dashboard/app/reporting_test.go
@@ -9,6 +9,7 @@ import (
"testing"
"time"
+ "github.com/google/go-cmp/cmp"
"github.com/google/syzkaller/dashboard/dashapi"
)
@@ -49,7 +50,7 @@ func TestReportBug(t *testing.T) {
Maintainers: []string{"bar@foo.com", "foo@bar.com"},
CompilerID: "compiler1",
KernelRepo: "repo1",
- KernelRepoAlias: "repo1/branch1",
+ KernelRepoAlias: "repo1 branch1",
KernelBranch: "branch1",
KernelCommit: "1111111111111111111111111111111111111111",
KernelCommitTitle: build.KernelCommitTitle,
@@ -62,9 +63,11 @@ func TestReportBug(t *testing.T) {
ReportLink: externalLink(c.ctx, textCrashReport, dbCrash.Report),
CrashID: rep.CrashID,
NumCrashes: 1,
- HappenedOn: []string{"repo1/branch1"},
+ HappenedOn: []string{"repo1 branch1"},
+ }
+ if diff := cmp.Diff(want, rep); diff != "" {
+ t.Fatal(diff)
}
- c.expectEQ(rep, want)
// Since we did not update bug status yet, should get the same report again.
c.expectEQ(c.client.pollBug(), want)
@@ -85,7 +88,9 @@ func TestReportBug(t *testing.T) {
want.ReproSyzLink = externalLink(c.ctx, textReproSyz, dbCrash.ReproSyz)
want.LogLink = externalLink(c.ctx, textCrashLog, dbCrash.Log)
want.ReportLink = externalLink(c.ctx, textCrashReport, dbCrash.Report)
- c.expectEQ(rep1, want)
+ if diff := cmp.Diff(want, rep1); diff != "" {
+ t.Fatal(diff)
+ }
reply, _ := c.client.ReportingUpdate(&dashapi.BugUpdate{
ID: rep.ID,
@@ -119,7 +124,9 @@ func TestReportBug(t *testing.T) {
want.First = true
want.Config = []byte(`{"Index":2}`)
want.NumCrashes = 3
- c.expectEQ(rep2, want)
+ if diff := cmp.Diff(want, rep2); diff != "" {
+ t.Fatal(diff)
+ }
// Check that that we can't upstream the bug in the final reporting.
reply, _ = c.client.ReportingUpdate(&dashapi.BugUpdate{
@@ -190,7 +197,7 @@ func TestInvalidBug(t *testing.T) {
Title: "title1 (2)",
CompilerID: "compiler1",
KernelRepo: "repo1",
- KernelRepoAlias: "repo1/branch1",
+ KernelRepoAlias: "repo1 branch1",
KernelBranch: "branch1",
KernelCommit: "1111111111111111111111111111111111111111",
KernelCommitTitle: build.KernelCommitTitle,
@@ -205,9 +212,11 @@ func TestInvalidBug(t *testing.T) {
ReproCLink: externalLink(c.ctx, textReproC, dbCrash.ReproC),
CrashID: rep.CrashID,
NumCrashes: 1,
- HappenedOn: []string{"repo1/branch1"},
+ HappenedOn: []string{"repo1 branch1"},
+ }
+ if diff := cmp.Diff(want, rep); diff != "" {
+ t.Fatal(diff)
}
- c.expectEQ(rep, want)
c.client.ReportFailedRepro(testCrashID(crash1))
}