aboutsummaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
authorTaras Madan <tarasmadan@google.com>2025-07-01 19:09:33 +0200
committerTaras Madan <tarasmadan@google.com>2025-07-01 21:41:27 +0000
commitbc80e4f080d226b12fae367dc46bc54ac3681009 (patch)
tree396991c29ca9a28b701a72013e5283ef0188b8ec /pkg
parent065d1b73397a6839320b1fc6cb5b40e8623a4825 (diff)
all/mocks: regenerate with mockery v3
Diffstat (limited to 'pkg')
-rw-r--r--pkg/coveragedb/mocks/ReadOnlyTransaction.go69
-rw-r--r--pkg/coveragedb/mocks/Row.go61
-rw-r--r--pkg/coveragedb/mocks/RowIterator.go65
-rw-r--r--pkg/coveragedb/mocks/SpannerClient.go119
-rw-r--r--pkg/covermerger/mocks/FileVersProvider.go90
-rw-r--r--pkg/gcs/mocks/Client.go248
-rw-r--r--pkg/rpcserver/mocks/Manager.go150
7 files changed, 441 insertions, 361 deletions
diff --git a/pkg/coveragedb/mocks/ReadOnlyTransaction.go b/pkg/coveragedb/mocks/ReadOnlyTransaction.go
index 1a4eecfb8..3f00faca0 100644
--- a/pkg/coveragedb/mocks/ReadOnlyTransaction.go
+++ b/pkg/coveragedb/mocks/ReadOnlyTransaction.go
@@ -1,16 +1,31 @@
-// Code generated by mockery v2.52.1. DO NOT EDIT.
+// Code generated by mockery; DO NOT EDIT.
+// github.com/vektra/mockery
+// template: testify
package mocks
import (
- context "context"
+ "context"
- spanner "cloud.google.com/go/spanner"
+ "cloud.google.com/go/spanner"
+ "github.com/google/syzkaller/pkg/coveragedb/spannerclient"
mock "github.com/stretchr/testify/mock"
-
- spannerclient "github.com/google/syzkaller/pkg/coveragedb/spannerclient"
)
+// NewReadOnlyTransaction creates a new instance of ReadOnlyTransaction. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
+// The first argument is typically a *testing.T value.
+func NewReadOnlyTransaction(t interface {
+ mock.TestingT
+ Cleanup(func())
+}) *ReadOnlyTransaction {
+ mock := &ReadOnlyTransaction{}
+ mock.Mock.Test(t)
+
+ t.Cleanup(func() { mock.AssertExpectations(t) })
+
+ return mock
+}
+
// ReadOnlyTransaction is an autogenerated mock type for the ReadOnlyTransaction type
type ReadOnlyTransaction struct {
mock.Mock
@@ -24,23 +39,22 @@ func (_m *ReadOnlyTransaction) EXPECT() *ReadOnlyTransaction_Expecter {
return &ReadOnlyTransaction_Expecter{mock: &_m.Mock}
}
-// Query provides a mock function with given fields: ctx, statement
-func (_m *ReadOnlyTransaction) Query(ctx context.Context, statement spanner.Statement) spannerclient.RowIterator {
- ret := _m.Called(ctx, statement)
+// Query provides a mock function for the type ReadOnlyTransaction
+func (_mock *ReadOnlyTransaction) Query(ctx context.Context, statement spanner.Statement) spannerclient.RowIterator {
+ ret := _mock.Called(ctx, statement)
if len(ret) == 0 {
panic("no return value specified for Query")
}
var r0 spannerclient.RowIterator
- if rf, ok := ret.Get(0).(func(context.Context, spanner.Statement) spannerclient.RowIterator); ok {
- r0 = rf(ctx, statement)
+ if returnFunc, ok := ret.Get(0).(func(context.Context, spanner.Statement) spannerclient.RowIterator); ok {
+ r0 = returnFunc(ctx, statement)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(spannerclient.RowIterator)
}
}
-
return r0
}
@@ -58,31 +72,28 @@ func (_e *ReadOnlyTransaction_Expecter) Query(ctx interface{}, statement interfa
func (_c *ReadOnlyTransaction_Query_Call) Run(run func(ctx context.Context, statement spanner.Statement)) *ReadOnlyTransaction_Query_Call {
_c.Call.Run(func(args mock.Arguments) {
- run(args[0].(context.Context), args[1].(spanner.Statement))
+ var arg0 context.Context
+ if args[0] != nil {
+ arg0 = args[0].(context.Context)
+ }
+ var arg1 spanner.Statement
+ if args[1] != nil {
+ arg1 = args[1].(spanner.Statement)
+ }
+ run(
+ arg0,
+ arg1,
+ )
})
return _c
}
-func (_c *ReadOnlyTransaction_Query_Call) Return(_a0 spannerclient.RowIterator) *ReadOnlyTransaction_Query_Call {
- _c.Call.Return(_a0)
+func (_c *ReadOnlyTransaction_Query_Call) Return(rowIterator spannerclient.RowIterator) *ReadOnlyTransaction_Query_Call {
+ _c.Call.Return(rowIterator)
return _c
}
-func (_c *ReadOnlyTransaction_Query_Call) RunAndReturn(run func(context.Context, spanner.Statement) spannerclient.RowIterator) *ReadOnlyTransaction_Query_Call {
+func (_c *ReadOnlyTransaction_Query_Call) RunAndReturn(run func(ctx context.Context, statement spanner.Statement) spannerclient.RowIterator) *ReadOnlyTransaction_Query_Call {
_c.Call.Return(run)
return _c
}
-
-// NewReadOnlyTransaction creates a new instance of ReadOnlyTransaction. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
-// The first argument is typically a *testing.T value.
-func NewReadOnlyTransaction(t interface {
- mock.TestingT
- Cleanup(func())
-}) *ReadOnlyTransaction {
- mock := &ReadOnlyTransaction{}
- mock.Mock.Test(t)
-
- t.Cleanup(func() { mock.AssertExpectations(t) })
-
- return mock
-}
diff --git a/pkg/coveragedb/mocks/Row.go b/pkg/coveragedb/mocks/Row.go
index 549e7d214..3ea716173 100644
--- a/pkg/coveragedb/mocks/Row.go
+++ b/pkg/coveragedb/mocks/Row.go
@@ -1,8 +1,26 @@
-// Code generated by mockery v2.52.1. DO NOT EDIT.
+// Code generated by mockery; DO NOT EDIT.
+// github.com/vektra/mockery
+// template: testify
package mocks
-import mock "github.com/stretchr/testify/mock"
+import (
+ mock "github.com/stretchr/testify/mock"
+)
+
+// NewRow creates a new instance of Row. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
+// The first argument is typically a *testing.T value.
+func NewRow(t interface {
+ mock.TestingT
+ Cleanup(func())
+}) *Row {
+ mock := &Row{}
+ mock.Mock.Test(t)
+
+ t.Cleanup(func() { mock.AssertExpectations(t) })
+
+ return mock
+}
// Row is an autogenerated mock type for the Row type
type Row struct {
@@ -17,21 +35,20 @@ func (_m *Row) EXPECT() *Row_Expecter {
return &Row_Expecter{mock: &_m.Mock}
}
-// ToStruct provides a mock function with given fields: p
-func (_m *Row) ToStruct(p interface{}) error {
- ret := _m.Called(p)
+// ToStruct provides a mock function for the type Row
+func (_mock *Row) ToStruct(p interface{}) error {
+ ret := _mock.Called(p)
if len(ret) == 0 {
panic("no return value specified for ToStruct")
}
var r0 error
- if rf, ok := ret.Get(0).(func(interface{}) error); ok {
- r0 = rf(p)
+ if returnFunc, ok := ret.Get(0).(func(interface{}) error); ok {
+ r0 = returnFunc(p)
} else {
r0 = ret.Error(0)
}
-
return r0
}
@@ -48,31 +65,23 @@ func (_e *Row_Expecter) ToStruct(p interface{}) *Row_ToStruct_Call {
func (_c *Row_ToStruct_Call) Run(run func(p interface{})) *Row_ToStruct_Call {
_c.Call.Run(func(args mock.Arguments) {
- run(args[0].(interface{}))
+ var arg0 interface{}
+ if args[0] != nil {
+ arg0 = args[0].(interface{})
+ }
+ run(
+ arg0,
+ )
})
return _c
}
-func (_c *Row_ToStruct_Call) Return(_a0 error) *Row_ToStruct_Call {
- _c.Call.Return(_a0)
+func (_c *Row_ToStruct_Call) Return(err error) *Row_ToStruct_Call {
+ _c.Call.Return(err)
return _c
}
-func (_c *Row_ToStruct_Call) RunAndReturn(run func(interface{}) error) *Row_ToStruct_Call {
+func (_c *Row_ToStruct_Call) RunAndReturn(run func(p interface{}) error) *Row_ToStruct_Call {
_c.Call.Return(run)
return _c
}
-
-// NewRow creates a new instance of Row. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
-// The first argument is typically a *testing.T value.
-func NewRow(t interface {
- mock.TestingT
- Cleanup(func())
-}) *Row {
- mock := &Row{}
- mock.Mock.Test(t)
-
- t.Cleanup(func() { mock.AssertExpectations(t) })
-
- return mock
-}
diff --git a/pkg/coveragedb/mocks/RowIterator.go b/pkg/coveragedb/mocks/RowIterator.go
index 7bea62355..055039af6 100644
--- a/pkg/coveragedb/mocks/RowIterator.go
+++ b/pkg/coveragedb/mocks/RowIterator.go
@@ -1,12 +1,28 @@
-// Code generated by mockery v2.52.1. DO NOT EDIT.
+// Code generated by mockery; DO NOT EDIT.
+// github.com/vektra/mockery
+// template: testify
package mocks
import (
- spannerclient "github.com/google/syzkaller/pkg/coveragedb/spannerclient"
+ "github.com/google/syzkaller/pkg/coveragedb/spannerclient"
mock "github.com/stretchr/testify/mock"
)
+// NewRowIterator creates a new instance of RowIterator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
+// The first argument is typically a *testing.T value.
+func NewRowIterator(t interface {
+ mock.TestingT
+ Cleanup(func())
+}) *RowIterator {
+ mock := &RowIterator{}
+ mock.Mock.Test(t)
+
+ t.Cleanup(func() { mock.AssertExpectations(t) })
+
+ return mock
+}
+
// RowIterator is an autogenerated mock type for the RowIterator type
type RowIterator struct {
mock.Mock
@@ -20,9 +36,9 @@ func (_m *RowIterator) EXPECT() *RowIterator_Expecter {
return &RowIterator_Expecter{mock: &_m.Mock}
}
-// Next provides a mock function with no fields
-func (_m *RowIterator) Next() (spannerclient.Row, error) {
- ret := _m.Called()
+// Next provides a mock function for the type RowIterator
+func (_mock *RowIterator) Next() (spannerclient.Row, error) {
+ ret := _mock.Called()
if len(ret) == 0 {
panic("no return value specified for Next")
@@ -30,23 +46,21 @@ func (_m *RowIterator) Next() (spannerclient.Row, error) {
var r0 spannerclient.Row
var r1 error
- if rf, ok := ret.Get(0).(func() (spannerclient.Row, error)); ok {
- return rf()
+ if returnFunc, ok := ret.Get(0).(func() (spannerclient.Row, error)); ok {
+ return returnFunc()
}
- if rf, ok := ret.Get(0).(func() spannerclient.Row); ok {
- r0 = rf()
+ if returnFunc, ok := ret.Get(0).(func() spannerclient.Row); ok {
+ r0 = returnFunc()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(spannerclient.Row)
}
}
-
- if rf, ok := ret.Get(1).(func() error); ok {
- r1 = rf()
+ if returnFunc, ok := ret.Get(1).(func() error); ok {
+ r1 = returnFunc()
} else {
r1 = ret.Error(1)
}
-
return r0, r1
}
@@ -67,8 +81,8 @@ func (_c *RowIterator_Next_Call) Run(run func()) *RowIterator_Next_Call {
return _c
}
-func (_c *RowIterator_Next_Call) Return(_a0 spannerclient.Row, _a1 error) *RowIterator_Next_Call {
- _c.Call.Return(_a0, _a1)
+func (_c *RowIterator_Next_Call) Return(row spannerclient.Row, err error) *RowIterator_Next_Call {
+ _c.Call.Return(row, err)
return _c
}
@@ -77,9 +91,10 @@ func (_c *RowIterator_Next_Call) RunAndReturn(run func() (spannerclient.Row, err
return _c
}
-// Stop provides a mock function with no fields
-func (_m *RowIterator) Stop() {
- _m.Called()
+// Stop provides a mock function for the type RowIterator
+func (_mock *RowIterator) Stop() {
+ _mock.Called()
+ return
}
// RowIterator_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop'
@@ -108,17 +123,3 @@ func (_c *RowIterator_Stop_Call) RunAndReturn(run func()) *RowIterator_Stop_Call
_c.Run(run)
return _c
}
-
-// NewRowIterator creates a new instance of RowIterator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
-// The first argument is typically a *testing.T value.
-func NewRowIterator(t interface {
- mock.TestingT
- Cleanup(func())
-}) *RowIterator {
- mock := &RowIterator{}
- mock.Mock.Test(t)
-
- t.Cleanup(func() { mock.AssertExpectations(t) })
-
- return mock
-}
diff --git a/pkg/coveragedb/mocks/SpannerClient.go b/pkg/coveragedb/mocks/SpannerClient.go
index 0919b57cc..5f5c6cc05 100644
--- a/pkg/coveragedb/mocks/SpannerClient.go
+++ b/pkg/coveragedb/mocks/SpannerClient.go
@@ -1,17 +1,31 @@
-// Code generated by mockery v2.52.1. DO NOT EDIT.
+// Code generated by mockery; DO NOT EDIT.
+// github.com/vektra/mockery
+// template: testify
package mocks
import (
- context "context"
+ "context"
+ "time"
- spanner "cloud.google.com/go/spanner"
+ "cloud.google.com/go/spanner"
+ "github.com/google/syzkaller/pkg/coveragedb/spannerclient"
mock "github.com/stretchr/testify/mock"
+)
- spannerclient "github.com/google/syzkaller/pkg/coveragedb/spannerclient"
+// NewSpannerClient creates a new instance of SpannerClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
+// The first argument is typically a *testing.T value.
+func NewSpannerClient(t interface {
+ mock.TestingT
+ Cleanup(func())
+}) *SpannerClient {
+ mock := &SpannerClient{}
+ mock.Mock.Test(t)
- time "time"
-)
+ t.Cleanup(func() { mock.AssertExpectations(t) })
+
+ return mock
+}
// SpannerClient is an autogenerated mock type for the SpannerClient type
type SpannerClient struct {
@@ -26,16 +40,15 @@ func (_m *SpannerClient) EXPECT() *SpannerClient_Expecter {
return &SpannerClient_Expecter{mock: &_m.Mock}
}
-// Apply provides a mock function with given fields: ctx, ms, opts
-func (_m *SpannerClient) Apply(ctx context.Context, ms []*spanner.Mutation, opts ...spanner.ApplyOption) (time.Time, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
+// Apply provides a mock function for the type SpannerClient
+func (_mock *SpannerClient) Apply(ctx context.Context, ms []*spanner.Mutation, opts ...spanner.ApplyOption) (time.Time, error) {
+ var tmpRet mock.Arguments
+ if len(opts) > 0 {
+ tmpRet = _mock.Called(ctx, ms, opts)
+ } else {
+ tmpRet = _mock.Called(ctx, ms)
}
- var _ca []interface{}
- _ca = append(_ca, ctx, ms)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
+ ret := tmpRet
if len(ret) == 0 {
panic("no return value specified for Apply")
@@ -43,21 +56,19 @@ func (_m *SpannerClient) Apply(ctx context.Context, ms []*spanner.Mutation, opts
var r0 time.Time
var r1 error
- if rf, ok := ret.Get(0).(func(context.Context, []*spanner.Mutation, ...spanner.ApplyOption) (time.Time, error)); ok {
- return rf(ctx, ms, opts...)
+ if returnFunc, ok := ret.Get(0).(func(context.Context, []*spanner.Mutation, ...spanner.ApplyOption) (time.Time, error)); ok {
+ return returnFunc(ctx, ms, opts...)
}
- if rf, ok := ret.Get(0).(func(context.Context, []*spanner.Mutation, ...spanner.ApplyOption) time.Time); ok {
- r0 = rf(ctx, ms, opts...)
+ if returnFunc, ok := ret.Get(0).(func(context.Context, []*spanner.Mutation, ...spanner.ApplyOption) time.Time); ok {
+ r0 = returnFunc(ctx, ms, opts...)
} else {
r0 = ret.Get(0).(time.Time)
}
-
- if rf, ok := ret.Get(1).(func(context.Context, []*spanner.Mutation, ...spanner.ApplyOption) error); ok {
- r1 = rf(ctx, ms, opts...)
+ if returnFunc, ok := ret.Get(1).(func(context.Context, []*spanner.Mutation, ...spanner.ApplyOption) error); ok {
+ r1 = returnFunc(ctx, ms, opts...)
} else {
r1 = ret.Error(1)
}
-
return r0, r1
}
@@ -77,13 +88,25 @@ func (_e *SpannerClient_Expecter) Apply(ctx interface{}, ms interface{}, opts ..
func (_c *SpannerClient_Apply_Call) Run(run func(ctx context.Context, ms []*spanner.Mutation, opts ...spanner.ApplyOption)) *SpannerClient_Apply_Call {
_c.Call.Run(func(args mock.Arguments) {
- variadicArgs := make([]spanner.ApplyOption, len(args)-2)
- for i, a := range args[2:] {
- if a != nil {
- variadicArgs[i] = a.(spanner.ApplyOption)
- }
+ var arg0 context.Context
+ if args[0] != nil {
+ arg0 = args[0].(context.Context)
}
- run(args[0].(context.Context), args[1].([]*spanner.Mutation), variadicArgs...)
+ var arg1 []*spanner.Mutation
+ if args[1] != nil {
+ arg1 = args[1].([]*spanner.Mutation)
+ }
+ var arg2 []spanner.ApplyOption
+ var variadicArgs []spanner.ApplyOption
+ if len(args) > 2 {
+ variadicArgs = args[2].([]spanner.ApplyOption)
+ }
+ arg2 = variadicArgs
+ run(
+ arg0,
+ arg1,
+ arg2...,
+ )
})
return _c
}
@@ -93,14 +116,15 @@ func (_c *SpannerClient_Apply_Call) Return(commitTimestamp time.Time, err error)
return _c
}
-func (_c *SpannerClient_Apply_Call) RunAndReturn(run func(context.Context, []*spanner.Mutation, ...spanner.ApplyOption) (time.Time, error)) *SpannerClient_Apply_Call {
+func (_c *SpannerClient_Apply_Call) RunAndReturn(run func(ctx context.Context, ms []*spanner.Mutation, opts ...spanner.ApplyOption) (time.Time, error)) *SpannerClient_Apply_Call {
_c.Call.Return(run)
return _c
}
-// Close provides a mock function with no fields
-func (_m *SpannerClient) Close() {
- _m.Called()
+// Close provides a mock function for the type SpannerClient
+func (_mock *SpannerClient) Close() {
+ _mock.Called()
+ return
}
// SpannerClient_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
@@ -130,23 +154,22 @@ func (_c *SpannerClient_Close_Call) RunAndReturn(run func()) *SpannerClient_Clos
return _c
}
-// Single provides a mock function with no fields
-func (_m *SpannerClient) Single() spannerclient.ReadOnlyTransaction {
- ret := _m.Called()
+// Single provides a mock function for the type SpannerClient
+func (_mock *SpannerClient) Single() spannerclient.ReadOnlyTransaction {
+ ret := _mock.Called()
if len(ret) == 0 {
panic("no return value specified for Single")
}
var r0 spannerclient.ReadOnlyTransaction
- if rf, ok := ret.Get(0).(func() spannerclient.ReadOnlyTransaction); ok {
- r0 = rf()
+ if returnFunc, ok := ret.Get(0).(func() spannerclient.ReadOnlyTransaction); ok {
+ r0 = returnFunc()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(spannerclient.ReadOnlyTransaction)
}
}
-
return r0
}
@@ -167,8 +190,8 @@ func (_c *SpannerClient_Single_Call) Run(run func()) *SpannerClient_Single_Call
return _c
}
-func (_c *SpannerClient_Single_Call) Return(_a0 spannerclient.ReadOnlyTransaction) *SpannerClient_Single_Call {
- _c.Call.Return(_a0)
+func (_c *SpannerClient_Single_Call) Return(readOnlyTransaction spannerclient.ReadOnlyTransaction) *SpannerClient_Single_Call {
+ _c.Call.Return(readOnlyTransaction)
return _c
}
@@ -176,17 +199,3 @@ func (_c *SpannerClient_Single_Call) RunAndReturn(run func() spannerclient.ReadO
_c.Call.Return(run)
return _c
}
-
-// NewSpannerClient creates a new instance of SpannerClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
-// The first argument is typically a *testing.T value.
-func NewSpannerClient(t interface {
- mock.TestingT
- Cleanup(func())
-}) *SpannerClient {
- mock := &SpannerClient{}
- mock.Mock.Test(t)
-
- t.Cleanup(func() { mock.AssertExpectations(t) })
-
- return mock
-}
diff --git a/pkg/covermerger/mocks/FileVersProvider.go b/pkg/covermerger/mocks/FileVersProvider.go
index 4e07532bd..4c0709874 100644
--- a/pkg/covermerger/mocks/FileVersProvider.go
+++ b/pkg/covermerger/mocks/FileVersProvider.go
@@ -1,12 +1,28 @@
-// Code generated by mockery v2.52.1. DO NOT EDIT.
+// Code generated by mockery; DO NOT EDIT.
+// github.com/vektra/mockery
+// template: testify
package mocks
import (
- covermerger "github.com/google/syzkaller/pkg/covermerger"
+ "github.com/google/syzkaller/pkg/covermerger"
mock "github.com/stretchr/testify/mock"
)
+// NewFileVersProvider creates a new instance of FileVersProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
+// The first argument is typically a *testing.T value.
+func NewFileVersProvider(t interface {
+ mock.TestingT
+ Cleanup(func())
+}) *FileVersProvider {
+ mock := &FileVersProvider{}
+ mock.Mock.Test(t)
+
+ t.Cleanup(func() { mock.AssertExpectations(t) })
+
+ return mock
+}
+
// FileVersProvider is an autogenerated mock type for the FileVersProvider type
type FileVersProvider struct {
mock.Mock
@@ -20,16 +36,15 @@ func (_m *FileVersProvider) EXPECT() *FileVersProvider_Expecter {
return &FileVersProvider_Expecter{mock: &_m.Mock}
}
-// GetFileVersions provides a mock function with given fields: targetFilePath, repoCommits
-func (_m *FileVersProvider) GetFileVersions(targetFilePath string, repoCommits ...covermerger.RepoCommit) (covermerger.FileVersions, error) {
- _va := make([]interface{}, len(repoCommits))
- for _i := range repoCommits {
- _va[_i] = repoCommits[_i]
+// GetFileVersions provides a mock function for the type FileVersProvider
+func (_mock *FileVersProvider) GetFileVersions(targetFilePath string, repoCommits ...covermerger.RepoCommit) (covermerger.FileVersions, error) {
+ var tmpRet mock.Arguments
+ if len(repoCommits) > 0 {
+ tmpRet = _mock.Called(targetFilePath, repoCommits)
+ } else {
+ tmpRet = _mock.Called(targetFilePath)
}
- var _ca []interface{}
- _ca = append(_ca, targetFilePath)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
+ ret := tmpRet
if len(ret) == 0 {
panic("no return value specified for GetFileVersions")
@@ -37,23 +52,21 @@ func (_m *FileVersProvider) GetFileVersions(targetFilePath string, repoCommits .
var r0 covermerger.FileVersions
var r1 error
- if rf, ok := ret.Get(0).(func(string, ...covermerger.RepoCommit) (covermerger.FileVersions, error)); ok {
- return rf(targetFilePath, repoCommits...)
+ if returnFunc, ok := ret.Get(0).(func(string, ...covermerger.RepoCommit) (covermerger.FileVersions, error)); ok {
+ return returnFunc(targetFilePath, repoCommits...)
}
- if rf, ok := ret.Get(0).(func(string, ...covermerger.RepoCommit) covermerger.FileVersions); ok {
- r0 = rf(targetFilePath, repoCommits...)
+ if returnFunc, ok := ret.Get(0).(func(string, ...covermerger.RepoCommit) covermerger.FileVersions); ok {
+ r0 = returnFunc(targetFilePath, repoCommits...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(covermerger.FileVersions)
}
}
-
- if rf, ok := ret.Get(1).(func(string, ...covermerger.RepoCommit) error); ok {
- r1 = rf(targetFilePath, repoCommits...)
+ if returnFunc, ok := ret.Get(1).(func(string, ...covermerger.RepoCommit) error); ok {
+ r1 = returnFunc(targetFilePath, repoCommits...)
} else {
r1 = ret.Error(1)
}
-
return r0, r1
}
@@ -72,37 +85,30 @@ func (_e *FileVersProvider_Expecter) GetFileVersions(targetFilePath interface{},
func (_c *FileVersProvider_GetFileVersions_Call) Run(run func(targetFilePath string, repoCommits ...covermerger.RepoCommit)) *FileVersProvider_GetFileVersions_Call {
_c.Call.Run(func(args mock.Arguments) {
- variadicArgs := make([]covermerger.RepoCommit, len(args)-1)
- for i, a := range args[1:] {
- if a != nil {
- variadicArgs[i] = a.(covermerger.RepoCommit)
- }
+ var arg0 string
+ if args[0] != nil {
+ arg0 = args[0].(string)
+ }
+ var arg1 []covermerger.RepoCommit
+ var variadicArgs []covermerger.RepoCommit
+ if len(args) > 1 {
+ variadicArgs = args[1].([]covermerger.RepoCommit)
}
- run(args[0].(string), variadicArgs...)
+ arg1 = variadicArgs
+ run(
+ arg0,
+ arg1...,
+ )
})
return _c
}
-func (_c *FileVersProvider_GetFileVersions_Call) Return(_a0 covermerger.FileVersions, _a1 error) *FileVersProvider_GetFileVersions_Call {
- _c.Call.Return(_a0, _a1)
+func (_c *FileVersProvider_GetFileVersions_Call) Return(fileVersions covermerger.FileVersions, err error) *FileVersProvider_GetFileVersions_Call {
+ _c.Call.Return(fileVersions, err)
return _c
}
-func (_c *FileVersProvider_GetFileVersions_Call) RunAndReturn(run func(string, ...covermerger.RepoCommit) (covermerger.FileVersions, error)) *FileVersProvider_GetFileVersions_Call {
+func (_c *FileVersProvider_GetFileVersions_Call) RunAndReturn(run func(targetFilePath string, repoCommits ...covermerger.RepoCommit) (covermerger.FileVersions, error)) *FileVersProvider_GetFileVersions_Call {
_c.Call.Return(run)
return _c
}
-
-// NewFileVersProvider creates a new instance of FileVersProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
-// The first argument is typically a *testing.T value.
-func NewFileVersProvider(t interface {
- mock.TestingT
- Cleanup(func())
-}) *FileVersProvider {
- mock := &FileVersProvider{}
- mock.Mock.Test(t)
-
- t.Cleanup(func() { mock.AssertExpectations(t) })
-
- return mock
-}
diff --git a/pkg/gcs/mocks/Client.go b/pkg/gcs/mocks/Client.go
index d422b9c41..c8d2501f5 100644
--- a/pkg/gcs/mocks/Client.go
+++ b/pkg/gcs/mocks/Client.go
@@ -1,15 +1,30 @@
-// Code generated by mockery v2.52.1. DO NOT EDIT.
+// Code generated by mockery; DO NOT EDIT.
+// github.com/vektra/mockery
+// template: testify
package mocks
import (
- io "io"
-
- gcs "github.com/google/syzkaller/pkg/gcs"
+ "io"
+ "github.com/google/syzkaller/pkg/gcs"
mock "github.com/stretchr/testify/mock"
)
+// NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
+// The first argument is typically a *testing.T value.
+func NewClient(t interface {
+ mock.TestingT
+ Cleanup(func())
+}) *Client {
+ mock := &Client{}
+ mock.Mock.Test(t)
+
+ t.Cleanup(func() { mock.AssertExpectations(t) })
+
+ return mock
+}
+
// Client is an autogenerated mock type for the Client type
type Client struct {
mock.Mock
@@ -23,21 +38,20 @@ func (_m *Client) EXPECT() *Client_Expecter {
return &Client_Expecter{mock: &_m.Mock}
}
-// Close provides a mock function with no fields
-func (_m *Client) Close() error {
- ret := _m.Called()
+// Close provides a mock function for the type Client
+func (_mock *Client) Close() error {
+ ret := _mock.Called()
if len(ret) == 0 {
panic("no return value specified for Close")
}
var r0 error
- if rf, ok := ret.Get(0).(func() error); ok {
- r0 = rf()
+ if returnFunc, ok := ret.Get(0).(func() error); ok {
+ r0 = returnFunc()
} else {
r0 = ret.Error(0)
}
-
return r0
}
@@ -58,8 +72,8 @@ func (_c *Client_Close_Call) Run(run func()) *Client_Close_Call {
return _c
}
-func (_c *Client_Close_Call) Return(_a0 error) *Client_Close_Call {
- _c.Call.Return(_a0)
+func (_c *Client_Close_Call) Return(err error) *Client_Close_Call {
+ _c.Call.Return(err)
return _c
}
@@ -68,21 +82,20 @@ func (_c *Client_Close_Call) RunAndReturn(run func() error) *Client_Close_Call {
return _c
}
-// DeleteFile provides a mock function with given fields: path
-func (_m *Client) DeleteFile(path string) error {
- ret := _m.Called(path)
+// DeleteFile provides a mock function for the type Client
+func (_mock *Client) DeleteFile(path string) error {
+ ret := _mock.Called(path)
if len(ret) == 0 {
panic("no return value specified for DeleteFile")
}
var r0 error
- if rf, ok := ret.Get(0).(func(string) error); ok {
- r0 = rf(path)
+ if returnFunc, ok := ret.Get(0).(func(string) error); ok {
+ r0 = returnFunc(path)
} else {
r0 = ret.Error(0)
}
-
return r0
}
@@ -99,24 +112,30 @@ func (_e *Client_Expecter) DeleteFile(path interface{}) *Client_DeleteFile_Call
func (_c *Client_DeleteFile_Call) Run(run func(path string)) *Client_DeleteFile_Call {
_c.Call.Run(func(args mock.Arguments) {
- run(args[0].(string))
+ var arg0 string
+ if args[0] != nil {
+ arg0 = args[0].(string)
+ }
+ run(
+ arg0,
+ )
})
return _c
}
-func (_c *Client_DeleteFile_Call) Return(_a0 error) *Client_DeleteFile_Call {
- _c.Call.Return(_a0)
+func (_c *Client_DeleteFile_Call) Return(err error) *Client_DeleteFile_Call {
+ _c.Call.Return(err)
return _c
}
-func (_c *Client_DeleteFile_Call) RunAndReturn(run func(string) error) *Client_DeleteFile_Call {
+func (_c *Client_DeleteFile_Call) RunAndReturn(run func(path string) error) *Client_DeleteFile_Call {
_c.Call.Return(run)
return _c
}
-// FileExists provides a mock function with given fields: path
-func (_m *Client) FileExists(path string) (bool, error) {
- ret := _m.Called(path)
+// FileExists provides a mock function for the type Client
+func (_mock *Client) FileExists(path string) (bool, error) {
+ ret := _mock.Called(path)
if len(ret) == 0 {
panic("no return value specified for FileExists")
@@ -124,21 +143,19 @@ func (_m *Client) FileExists(path string) (bool, error) {
var r0 bool
var r1 error
- if rf, ok := ret.Get(0).(func(string) (bool, error)); ok {
- return rf(path)
+ if returnFunc, ok := ret.Get(0).(func(string) (bool, error)); ok {
+ return returnFunc(path)
}
- if rf, ok := ret.Get(0).(func(string) bool); ok {
- r0 = rf(path)
+ if returnFunc, ok := ret.Get(0).(func(string) bool); ok {
+ r0 = returnFunc(path)
} else {
r0 = ret.Get(0).(bool)
}
-
- if rf, ok := ret.Get(1).(func(string) error); ok {
- r1 = rf(path)
+ if returnFunc, ok := ret.Get(1).(func(string) error); ok {
+ r1 = returnFunc(path)
} else {
r1 = ret.Error(1)
}
-
return r0, r1
}
@@ -155,24 +172,30 @@ func (_e *Client_Expecter) FileExists(path interface{}) *Client_FileExists_Call
func (_c *Client_FileExists_Call) Run(run func(path string)) *Client_FileExists_Call {
_c.Call.Run(func(args mock.Arguments) {
- run(args[0].(string))
+ var arg0 string
+ if args[0] != nil {
+ arg0 = args[0].(string)
+ }
+ run(
+ arg0,
+ )
})
return _c
}
-func (_c *Client_FileExists_Call) Return(_a0 bool, _a1 error) *Client_FileExists_Call {
- _c.Call.Return(_a0, _a1)
+func (_c *Client_FileExists_Call) Return(b bool, err error) *Client_FileExists_Call {
+ _c.Call.Return(b, err)
return _c
}
-func (_c *Client_FileExists_Call) RunAndReturn(run func(string) (bool, error)) *Client_FileExists_Call {
+func (_c *Client_FileExists_Call) RunAndReturn(run func(path string) (bool, error)) *Client_FileExists_Call {
_c.Call.Return(run)
return _c
}
-// FileReader provides a mock function with given fields: path
-func (_m *Client) FileReader(path string) (io.ReadCloser, error) {
- ret := _m.Called(path)
+// FileReader provides a mock function for the type Client
+func (_mock *Client) FileReader(path string) (io.ReadCloser, error) {
+ ret := _mock.Called(path)
if len(ret) == 0 {
panic("no return value specified for FileReader")
@@ -180,23 +203,21 @@ func (_m *Client) FileReader(path string) (io.ReadCloser, error) {
var r0 io.ReadCloser
var r1 error
- if rf, ok := ret.Get(0).(func(string) (io.ReadCloser, error)); ok {
- return rf(path)
+ if returnFunc, ok := ret.Get(0).(func(string) (io.ReadCloser, error)); ok {
+ return returnFunc(path)
}
- if rf, ok := ret.Get(0).(func(string) io.ReadCloser); ok {
- r0 = rf(path)
+ if returnFunc, ok := ret.Get(0).(func(string) io.ReadCloser); ok {
+ r0 = returnFunc(path)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(io.ReadCloser)
}
}
-
- if rf, ok := ret.Get(1).(func(string) error); ok {
- r1 = rf(path)
+ if returnFunc, ok := ret.Get(1).(func(string) error); ok {
+ r1 = returnFunc(path)
} else {
r1 = ret.Error(1)
}
-
return r0, r1
}
@@ -213,24 +234,30 @@ func (_e *Client_Expecter) FileReader(path interface{}) *Client_FileReader_Call
func (_c *Client_FileReader_Call) Run(run func(path string)) *Client_FileReader_Call {
_c.Call.Run(func(args mock.Arguments) {
- run(args[0].(string))
+ var arg0 string
+ if args[0] != nil {
+ arg0 = args[0].(string)
+ }
+ run(
+ arg0,
+ )
})
return _c
}
-func (_c *Client_FileReader_Call) Return(_a0 io.ReadCloser, _a1 error) *Client_FileReader_Call {
- _c.Call.Return(_a0, _a1)
+func (_c *Client_FileReader_Call) Return(readCloser io.ReadCloser, err error) *Client_FileReader_Call {
+ _c.Call.Return(readCloser, err)
return _c
}
-func (_c *Client_FileReader_Call) RunAndReturn(run func(string) (io.ReadCloser, error)) *Client_FileReader_Call {
+func (_c *Client_FileReader_Call) RunAndReturn(run func(path string) (io.ReadCloser, error)) *Client_FileReader_Call {
_c.Call.Return(run)
return _c
}
-// FileWriter provides a mock function with given fields: path, contentType, contentEncoding
-func (_m *Client) FileWriter(path string, contentType string, contentEncoding string) (io.WriteCloser, error) {
- ret := _m.Called(path, contentType, contentEncoding)
+// FileWriter provides a mock function for the type Client
+func (_mock *Client) FileWriter(path string, contentType string, contentEncoding string) (io.WriteCloser, error) {
+ ret := _mock.Called(path, contentType, contentEncoding)
if len(ret) == 0 {
panic("no return value specified for FileWriter")
@@ -238,23 +265,21 @@ func (_m *Client) FileWriter(path string, contentType string, contentEncoding st
var r0 io.WriteCloser
var r1 error
- if rf, ok := ret.Get(0).(func(string, string, string) (io.WriteCloser, error)); ok {
- return rf(path, contentType, contentEncoding)
+ if returnFunc, ok := ret.Get(0).(func(string, string, string) (io.WriteCloser, error)); ok {
+ return returnFunc(path, contentType, contentEncoding)
}
- if rf, ok := ret.Get(0).(func(string, string, string) io.WriteCloser); ok {
- r0 = rf(path, contentType, contentEncoding)
+ if returnFunc, ok := ret.Get(0).(func(string, string, string) io.WriteCloser); ok {
+ r0 = returnFunc(path, contentType, contentEncoding)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(io.WriteCloser)
}
}
-
- if rf, ok := ret.Get(1).(func(string, string, string) error); ok {
- r1 = rf(path, contentType, contentEncoding)
+ if returnFunc, ok := ret.Get(1).(func(string, string, string) error); ok {
+ r1 = returnFunc(path, contentType, contentEncoding)
} else {
r1 = ret.Error(1)
}
-
return r0, r1
}
@@ -273,24 +298,40 @@ func (_e *Client_Expecter) FileWriter(path interface{}, contentType interface{},
func (_c *Client_FileWriter_Call) Run(run func(path string, contentType string, contentEncoding string)) *Client_FileWriter_Call {
_c.Call.Run(func(args mock.Arguments) {
- run(args[0].(string), args[1].(string), args[2].(string))
+ var arg0 string
+ if args[0] != nil {
+ arg0 = args[0].(string)
+ }
+ var arg1 string
+ if args[1] != nil {
+ arg1 = args[1].(string)
+ }
+ var arg2 string
+ if args[2] != nil {
+ arg2 = args[2].(string)
+ }
+ run(
+ arg0,
+ arg1,
+ arg2,
+ )
})
return _c
}
-func (_c *Client_FileWriter_Call) Return(_a0 io.WriteCloser, _a1 error) *Client_FileWriter_Call {
- _c.Call.Return(_a0, _a1)
+func (_c *Client_FileWriter_Call) Return(writeCloser io.WriteCloser, err error) *Client_FileWriter_Call {
+ _c.Call.Return(writeCloser, err)
return _c
}
-func (_c *Client_FileWriter_Call) RunAndReturn(run func(string, string, string) (io.WriteCloser, error)) *Client_FileWriter_Call {
+func (_c *Client_FileWriter_Call) RunAndReturn(run func(path string, contentType string, contentEncoding string) (io.WriteCloser, error)) *Client_FileWriter_Call {
_c.Call.Return(run)
return _c
}
-// ListObjects provides a mock function with given fields: path
-func (_m *Client) ListObjects(path string) ([]*gcs.Object, error) {
- ret := _m.Called(path)
+// ListObjects provides a mock function for the type Client
+func (_mock *Client) ListObjects(path string) ([]*gcs.Object, error) {
+ ret := _mock.Called(path)
if len(ret) == 0 {
panic("no return value specified for ListObjects")
@@ -298,23 +339,21 @@ func (_m *Client) ListObjects(path string) ([]*gcs.Object, error) {
var r0 []*gcs.Object
var r1 error
- if rf, ok := ret.Get(0).(func(string) ([]*gcs.Object, error)); ok {
- return rf(path)
+ if returnFunc, ok := ret.Get(0).(func(string) ([]*gcs.Object, error)); ok {
+ return returnFunc(path)
}
- if rf, ok := ret.Get(0).(func(string) []*gcs.Object); ok {
- r0 = rf(path)
+ if returnFunc, ok := ret.Get(0).(func(string) []*gcs.Object); ok {
+ r0 = returnFunc(path)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*gcs.Object)
}
}
-
- if rf, ok := ret.Get(1).(func(string) error); ok {
- r1 = rf(path)
+ if returnFunc, ok := ret.Get(1).(func(string) error); ok {
+ r1 = returnFunc(path)
} else {
r1 = ret.Error(1)
}
-
return r0, r1
}
@@ -331,36 +370,41 @@ func (_e *Client_Expecter) ListObjects(path interface{}) *Client_ListObjects_Cal
func (_c *Client_ListObjects_Call) Run(run func(path string)) *Client_ListObjects_Call {
_c.Call.Run(func(args mock.Arguments) {
- run(args[0].(string))
+ var arg0 string
+ if args[0] != nil {
+ arg0 = args[0].(string)
+ }
+ run(
+ arg0,
+ )
})
return _c
}
-func (_c *Client_ListObjects_Call) Return(_a0 []*gcs.Object, _a1 error) *Client_ListObjects_Call {
- _c.Call.Return(_a0, _a1)
+func (_c *Client_ListObjects_Call) Return(objects []*gcs.Object, err error) *Client_ListObjects_Call {
+ _c.Call.Return(objects, err)
return _c
}
-func (_c *Client_ListObjects_Call) RunAndReturn(run func(string) ([]*gcs.Object, error)) *Client_ListObjects_Call {
+func (_c *Client_ListObjects_Call) RunAndReturn(run func(path string) ([]*gcs.Object, error)) *Client_ListObjects_Call {
_c.Call.Return(run)
return _c
}
-// Publish provides a mock function with given fields: path
-func (_m *Client) Publish(path string) error {
- ret := _m.Called(path)
+// Publish provides a mock function for the type Client
+func (_mock *Client) Publish(path string) error {
+ ret := _mock.Called(path)
if len(ret) == 0 {
panic("no return value specified for Publish")
}
var r0 error
- if rf, ok := ret.Get(0).(func(string) error); ok {
- r0 = rf(path)
+ if returnFunc, ok := ret.Get(0).(func(string) error); ok {
+ r0 = returnFunc(path)
} else {
r0 = ret.Error(0)
}
-
return r0
}
@@ -377,31 +421,23 @@ func (_e *Client_Expecter) Publish(path interface{}) *Client_Publish_Call {
func (_c *Client_Publish_Call) Run(run func(path string)) *Client_Publish_Call {
_c.Call.Run(func(args mock.Arguments) {
- run(args[0].(string))
+ var arg0 string
+ if args[0] != nil {
+ arg0 = args[0].(string)
+ }
+ run(
+ arg0,
+ )
})
return _c
}
-func (_c *Client_Publish_Call) Return(_a0 error) *Client_Publish_Call {
- _c.Call.Return(_a0)
+func (_c *Client_Publish_Call) Return(err error) *Client_Publish_Call {
+ _c.Call.Return(err)
return _c
}
-func (_c *Client_Publish_Call) RunAndReturn(run func(string) error) *Client_Publish_Call {
+func (_c *Client_Publish_Call) RunAndReturn(run func(path string) error) *Client_Publish_Call {
_c.Call.Return(run)
return _c
}
-
-// NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
-// The first argument is typically a *testing.T value.
-func NewClient(t interface {
- mock.TestingT
- Cleanup(func())
-}) *Client {
- mock := &Client{}
- mock.Mock.Test(t)
-
- t.Cleanup(func() { mock.AssertExpectations(t) })
-
- return mock
-}
diff --git a/pkg/rpcserver/mocks/Manager.go b/pkg/rpcserver/mocks/Manager.go
index 717205338..40cff2553 100644
--- a/pkg/rpcserver/mocks/Manager.go
+++ b/pkg/rpcserver/mocks/Manager.go
@@ -1,19 +1,31 @@
-// Code generated by mockery v2.52.1. DO NOT EDIT.
+// Code generated by mockery; DO NOT EDIT.
+// github.com/vektra/mockery
+// template: testify
package mocks
import (
- flatrpc "github.com/google/syzkaller/pkg/flatrpc"
+ "github.com/google/syzkaller/pkg/flatrpc"
+ "github.com/google/syzkaller/pkg/fuzzer/queue"
+ "github.com/google/syzkaller/pkg/signal"
+ "github.com/google/syzkaller/pkg/vminfo"
+ "github.com/google/syzkaller/prog"
mock "github.com/stretchr/testify/mock"
+)
- prog "github.com/google/syzkaller/prog"
-
- queue "github.com/google/syzkaller/pkg/fuzzer/queue"
+// NewManager creates a new instance of Manager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
+// The first argument is typically a *testing.T value.
+func NewManager(t interface {
+ mock.TestingT
+ Cleanup(func())
+}) *Manager {
+ mock := &Manager{}
+ mock.Mock.Test(t)
- signal "github.com/google/syzkaller/pkg/signal"
+ t.Cleanup(func() { mock.AssertExpectations(t) })
- vminfo "github.com/google/syzkaller/pkg/vminfo"
-)
+ return mock
+}
// Manager is an autogenerated mock type for the Manager type
type Manager struct {
@@ -28,9 +40,9 @@ func (_m *Manager) EXPECT() *Manager_Expecter {
return &Manager_Expecter{mock: &_m.Mock}
}
-// BugFrames provides a mock function with no fields
-func (_m *Manager) BugFrames() ([]string, []string) {
- ret := _m.Called()
+// BugFrames provides a mock function for the type Manager
+func (_mock *Manager) BugFrames() ([]string, []string) {
+ ret := _mock.Called()
if len(ret) == 0 {
panic("no return value specified for BugFrames")
@@ -38,25 +50,23 @@ func (_m *Manager) BugFrames() ([]string, []string) {
var r0 []string
var r1 []string
- if rf, ok := ret.Get(0).(func() ([]string, []string)); ok {
- return rf()
+ if returnFunc, ok := ret.Get(0).(func() ([]string, []string)); ok {
+ return returnFunc()
}
- if rf, ok := ret.Get(0).(func() []string); ok {
- r0 = rf()
+ if returnFunc, ok := ret.Get(0).(func() []string); ok {
+ r0 = returnFunc()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]string)
}
}
-
- if rf, ok := ret.Get(1).(func() []string); ok {
- r1 = rf()
+ if returnFunc, ok := ret.Get(1).(func() []string); ok {
+ r1 = returnFunc()
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).([]string)
}
}
-
return r0, r1
}
@@ -87,9 +97,9 @@ func (_c *Manager_BugFrames_Call) RunAndReturn(run func() ([]string, []string))
return _c
}
-// CoverageFilter provides a mock function with given fields: modules
-func (_m *Manager) CoverageFilter(modules []*vminfo.KernelModule) ([]uint64, error) {
- ret := _m.Called(modules)
+// CoverageFilter provides a mock function for the type Manager
+func (_mock *Manager) CoverageFilter(modules []*vminfo.KernelModule) ([]uint64, error) {
+ ret := _mock.Called(modules)
if len(ret) == 0 {
panic("no return value specified for CoverageFilter")
@@ -97,23 +107,21 @@ func (_m *Manager) CoverageFilter(modules []*vminfo.KernelModule) ([]uint64, err
var r0 []uint64
var r1 error
- if rf, ok := ret.Get(0).(func([]*vminfo.KernelModule) ([]uint64, error)); ok {
- return rf(modules)
+ if returnFunc, ok := ret.Get(0).(func([]*vminfo.KernelModule) ([]uint64, error)); ok {
+ return returnFunc(modules)
}
- if rf, ok := ret.Get(0).(func([]*vminfo.KernelModule) []uint64); ok {
- r0 = rf(modules)
+ if returnFunc, ok := ret.Get(0).(func([]*vminfo.KernelModule) []uint64); ok {
+ r0 = returnFunc(modules)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]uint64)
}
}
-
- if rf, ok := ret.Get(1).(func([]*vminfo.KernelModule) error); ok {
- r1 = rf(modules)
+ if returnFunc, ok := ret.Get(1).(func([]*vminfo.KernelModule) error); ok {
+ r1 = returnFunc(modules)
} else {
r1 = ret.Error(1)
}
-
return r0, r1
}
@@ -130,24 +138,30 @@ func (_e *Manager_Expecter) CoverageFilter(modules interface{}) *Manager_Coverag
func (_c *Manager_CoverageFilter_Call) Run(run func(modules []*vminfo.KernelModule)) *Manager_CoverageFilter_Call {
_c.Call.Run(func(args mock.Arguments) {
- run(args[0].([]*vminfo.KernelModule))
+ var arg0 []*vminfo.KernelModule
+ if args[0] != nil {
+ arg0 = args[0].([]*vminfo.KernelModule)
+ }
+ run(
+ arg0,
+ )
})
return _c
}
-func (_c *Manager_CoverageFilter_Call) Return(_a0 []uint64, _a1 error) *Manager_CoverageFilter_Call {
- _c.Call.Return(_a0, _a1)
+func (_c *Manager_CoverageFilter_Call) Return(uint64s []uint64, err error) *Manager_CoverageFilter_Call {
+ _c.Call.Return(uint64s, err)
return _c
}
-func (_c *Manager_CoverageFilter_Call) RunAndReturn(run func([]*vminfo.KernelModule) ([]uint64, error)) *Manager_CoverageFilter_Call {
+func (_c *Manager_CoverageFilter_Call) RunAndReturn(run func(modules []*vminfo.KernelModule) ([]uint64, error)) *Manager_CoverageFilter_Call {
_c.Call.Return(run)
return _c
}
-// MachineChecked provides a mock function with given fields: features, syscalls
-func (_m *Manager) MachineChecked(features flatrpc.Feature, syscalls map[*prog.Syscall]bool) (queue.Source, error) {
- ret := _m.Called(features, syscalls)
+// MachineChecked provides a mock function for the type Manager
+func (_mock *Manager) MachineChecked(features flatrpc.Feature, syscalls map[*prog.Syscall]bool) (queue.Source, error) {
+ ret := _mock.Called(features, syscalls)
if len(ret) == 0 {
panic("no return value specified for MachineChecked")
@@ -155,23 +169,21 @@ func (_m *Manager) MachineChecked(features flatrpc.Feature, syscalls map[*prog.S
var r0 queue.Source
var r1 error
- if rf, ok := ret.Get(0).(func(flatrpc.Feature, map[*prog.Syscall]bool) (queue.Source, error)); ok {
- return rf(features, syscalls)
+ if returnFunc, ok := ret.Get(0).(func(flatrpc.Feature, map[*prog.Syscall]bool) (queue.Source, error)); ok {
+ return returnFunc(features, syscalls)
}
- if rf, ok := ret.Get(0).(func(flatrpc.Feature, map[*prog.Syscall]bool) queue.Source); ok {
- r0 = rf(features, syscalls)
+ if returnFunc, ok := ret.Get(0).(func(flatrpc.Feature, map[*prog.Syscall]bool) queue.Source); ok {
+ r0 = returnFunc(features, syscalls)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(queue.Source)
}
}
-
- if rf, ok := ret.Get(1).(func(flatrpc.Feature, map[*prog.Syscall]bool) error); ok {
- r1 = rf(features, syscalls)
+ if returnFunc, ok := ret.Get(1).(func(flatrpc.Feature, map[*prog.Syscall]bool) error); ok {
+ r1 = returnFunc(features, syscalls)
} else {
r1 = ret.Error(1)
}
-
return r0, r1
}
@@ -189,38 +201,48 @@ func (_e *Manager_Expecter) MachineChecked(features interface{}, syscalls interf
func (_c *Manager_MachineChecked_Call) Run(run func(features flatrpc.Feature, syscalls map[*prog.Syscall]bool)) *Manager_MachineChecked_Call {
_c.Call.Run(func(args mock.Arguments) {
- run(args[0].(flatrpc.Feature), args[1].(map[*prog.Syscall]bool))
+ var arg0 flatrpc.Feature
+ if args[0] != nil {
+ arg0 = args[0].(flatrpc.Feature)
+ }
+ var arg1 map[*prog.Syscall]bool
+ if args[1] != nil {
+ arg1 = args[1].(map[*prog.Syscall]bool)
+ }
+ run(
+ arg0,
+ arg1,
+ )
})
return _c
}
-func (_c *Manager_MachineChecked_Call) Return(_a0 queue.Source, _a1 error) *Manager_MachineChecked_Call {
- _c.Call.Return(_a0, _a1)
+func (_c *Manager_MachineChecked_Call) Return(source queue.Source, err error) *Manager_MachineChecked_Call {
+ _c.Call.Return(source, err)
return _c
}
-func (_c *Manager_MachineChecked_Call) RunAndReturn(run func(flatrpc.Feature, map[*prog.Syscall]bool) (queue.Source, error)) *Manager_MachineChecked_Call {
+func (_c *Manager_MachineChecked_Call) RunAndReturn(run func(features flatrpc.Feature, syscalls map[*prog.Syscall]bool) (queue.Source, error)) *Manager_MachineChecked_Call {
_c.Call.Return(run)
return _c
}
-// MaxSignal provides a mock function with no fields
-func (_m *Manager) MaxSignal() signal.Signal {
- ret := _m.Called()
+// MaxSignal provides a mock function for the type Manager
+func (_mock *Manager) MaxSignal() signal.Signal {
+ ret := _mock.Called()
if len(ret) == 0 {
panic("no return value specified for MaxSignal")
}
var r0 signal.Signal
- if rf, ok := ret.Get(0).(func() signal.Signal); ok {
- r0 = rf()
+ if returnFunc, ok := ret.Get(0).(func() signal.Signal); ok {
+ r0 = returnFunc()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(signal.Signal)
}
}
-
return r0
}
@@ -241,8 +263,8 @@ func (_c *Manager_MaxSignal_Call) Run(run func()) *Manager_MaxSignal_Call {
return _c
}
-func (_c *Manager_MaxSignal_Call) Return(_a0 signal.Signal) *Manager_MaxSignal_Call {
- _c.Call.Return(_a0)
+func (_c *Manager_MaxSignal_Call) Return(signal1 signal.Signal) *Manager_MaxSignal_Call {
+ _c.Call.Return(signal1)
return _c
}
@@ -250,17 +272,3 @@ func (_c *Manager_MaxSignal_Call) RunAndReturn(run func() signal.Signal) *Manage
_c.Call.Return(run)
return _c
}
-
-// NewManager creates a new instance of Manager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
-// The first argument is typically a *testing.T value.
-func NewManager(t interface {
- mock.TestingT
- Cleanup(func())
-}) *Manager {
- mock := &Manager{}
- mock.Mock.Test(t)
-
- t.Cleanup(func() { mock.AssertExpectations(t) })
-
- return mock
-}