diff options
Diffstat (limited to 'syz-cluster/workflow/fuzz-step/main_test.go')
| -rw-r--r-- | syz-cluster/workflow/fuzz-step/main_test.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/syz-cluster/workflow/fuzz-step/main_test.go b/syz-cluster/workflow/fuzz-step/main_test.go index 038690bd6..6f305a818 100644 --- a/syz-cluster/workflow/fuzz-step/main_test.go +++ b/syz-cluster/workflow/fuzz-step/main_test.go @@ -12,6 +12,7 @@ import ( "github.com/google/syzkaller/pkg/build" "github.com/google/syzkaller/pkg/osutil" + "github.com/google/syzkaller/syz-cluster/pkg/api" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -117,3 +118,13 @@ func TestShouldSkipFuzzing(t *testing.T) { )) }) } + +func TestBugTitleRe(t *testing.T) { + assert.True(t, titleMatchesFilter(&api.FuzzConfig{}, "any title must match")) + assert.True(t, titleMatchesFilter(&api.FuzzConfig{ + BugTitleRe: `^Prefix:`, + }, "Prefix: must pass")) + assert.False(t, titleMatchesFilter(&api.FuzzConfig{ + BugTitleRe: `^Prefix:`, + }, "Without prefix")) +} |
