aboutsummaryrefslogtreecommitdiffstats
path: root/dashboard/app/linux_reporting_test.go
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2023-02-07 16:20:16 +0100
committerAleksandr Nogikh <wp32pw@gmail.com>2023-02-16 11:29:36 +0100
commit2f0f5f6d638c8a24c1b8b04ebc9e303d330644cc (patch)
treee577540c32b8f5f45a0b7b5bbf286a180fcab82f /dashboard/app/linux_reporting_test.go
parent6e13575de15a4d480e4edf604d5f83ca3ee1c64e (diff)
dashboard/app: infer bug subsystems from crashes
After each saved crash, invoke the new pkg/subsystem machinery to infer the subsystem list. Use 5 crashes with biggest priority to base the inference on.
Diffstat (limited to 'dashboard/app/linux_reporting_test.go')
-rw-r--r--dashboard/app/linux_reporting_test.go23
1 files changed, 15 insertions, 8 deletions
diff --git a/dashboard/app/linux_reporting_test.go b/dashboard/app/linux_reporting_test.go
index 1d4e82ac2..004150361 100644
--- a/dashboard/app/linux_reporting_test.go
+++ b/dashboard/app/linux_reporting_test.go
@@ -7,6 +7,7 @@ import (
"testing"
"github.com/google/syzkaller/dashboard/dashapi"
+ "github.com/stretchr/testify/assert"
)
func TestFsSubsystemFlow(t *testing.T) {
@@ -33,7 +34,7 @@ func TestFsSubsystemFlow(t *testing.T) {
// We skip the first stage and report the bug right away.
reply := c.pollEmailBug()
- c.expectEQ(reply.Subject, "[syzbot] WARNING: abcd")
+ c.expectEQ(reply.Subject, "[syzbot] [kernel?] WARNING: abcd")
// B. Send a non-vfs bug without a reproducer.
// -----------------------------------------
@@ -47,9 +48,10 @@ func TestFsSubsystemFlow(t *testing.T) {
reply = c.pollEmailBug()
// The subsystem should have been taken from the guilty path.
- c.expectEQ(reply.Subject, "[syzbot] [nilfs2?] WARNING in nilfs_dat_commit_end")
- c.expectEQ(reply.To, []string{
+ c.expectEQ(reply.Subject, "[syzbot] [nilfs?] WARNING in nilfs_dat_commit_end")
+ assert.ElementsMatch(t, reply.To, []string{
"konishi.ryusuke@gmail.com",
+ "linux-fsdevel@vger.kernel.org",
"linux-kernel@vger.kernel.org",
"linux-nilfs@vger.kernel.org",
"maintainer@kernel.org",
@@ -91,11 +93,16 @@ renameat2(r0, &(0x7f00000004c0)='./file0\x00', r0, &(0x7f0000000500)='./bus/file
client.updateBug(vfsBug.ID, dashapi.BugStatusUpstream, "")
// .. and poll the email.
reply = c.pollEmailBug()
- c.expectEQ(reply.Subject, "[syzbot] [vfs?] [ntfs3?] WARNING in do_mkdirat")
+ c.expectEQ(reply.Subject, "[syzbot] [ntfs3?] WARNING in do_mkdirat")
// Make sure ntfs3 maintainers are in the recipients.
- c.expectEQ(reply.To, []string{"almaz.alexandrovich@paragon-software.com",
- "linux-kernel@vger.kernel.org", "maintainer@kernel.org",
- "ntfs3@lists.linux.dev", "test@syzkaller.com"})
+ assert.ElementsMatch(t, reply.To, []string{
+ "almaz.alexandrovich@paragon-software.com",
+ "linux-fsdevel@vger.kernel.org",
+ "linux-kernel@vger.kernel.org",
+ "maintainer@kernel.org",
+ "ntfs3@lists.linux.dev",
+ "test@syzkaller.com",
+ })
}
func TestVfsSubsystemFlow(t *testing.T) {
@@ -143,5 +150,5 @@ renameat2(r0, &(0x7f00000004c0)='./file0\x00', r0, &(0x7f0000000500)='./bus/file
client.updateBug(vfsBug.ID, dashapi.BugStatusUpstream, "")
// .. and poll the email.
reply := c.pollEmailBug()
- c.expectEQ(reply.Subject, "[syzbot] [vfs?] WARNING in do_mkdirat2")
+ c.expectEQ(reply.Subject, "[syzbot] [fs?] WARNING in do_mkdirat2")
}