diff --git a/src/libs/protocols/protos/csi.proto b/src/libs/protocols/protos/csi.proto index e6da50c8b8..94a9603b12 100644 --- a/src/libs/protocols/protos/csi.proto +++ b/src/libs/protocols/protos/csi.proto @@ -7,12 +7,6 @@ syntax = "proto3"; option go_package = "github.com/kata-containers/kata-containers/src/runtime/virtcontainers/pkg/agent/protocols/grpc"; package grpc; -import "gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.equal_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.testgen_all) = true; -option (gogoproto.benchgen_all) = true; // This should be kept in sync with CSI NodeGetVolumeStatsResponse (https://github.com/container-storage-interface/spec/blob/v1.5.0/csi.proto) message VolumeStatsResponse { diff --git a/src/libs/protocols/protos/health.proto b/src/libs/protocols/protos/health.proto index e8a6601598..da72ff32e9 100644 --- a/src/libs/protocols/protos/health.proto +++ b/src/libs/protocols/protos/health.proto @@ -11,13 +11,6 @@ option go_package = "github.com/kata-containers/kata-containers/src/runtime/virt package grpc; -import "gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.equal_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.testgen_all) = true; -option (gogoproto.benchgen_all) = true; - message CheckRequest { string service = 1; } diff --git a/src/libs/protocols/protos/oci.proto b/src/libs/protocols/protos/oci.proto index 081915c042..85c4ba5c3c 100644 --- a/src/libs/protocols/protos/oci.proto +++ b/src/libs/protocols/protos/oci.proto @@ -9,12 +9,6 @@ syntax = "proto3"; option go_package = "github.com/kata-containers/kata-containers/src/runtime/virtcontainers/pkg/agent/protocols/grpc"; package grpc; -import "gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.equal_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.testgen_all) = true; -option (gogoproto.benchgen_all) = true; message Spec { // Version of the Open Container Initiative Runtime Specification with which the bundle complies. diff --git a/src/runtime/virtcontainers/pkg/agent/protocols/grpc/csi.pb.go b/src/runtime/virtcontainers/pkg/agent/protocols/grpc/csi.pb.go index 3fc66aec1e..56d66ac012 100644 --- a/src/runtime/virtcontainers/pkg/agent/protocols/grpc/csi.pb.go +++ b/src/runtime/virtcontainers/pkg/agent/protocols/grpc/csi.pb.go @@ -4,9 +4,7 @@ package grpc import ( - bytes "bytes" fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" math "math" @@ -205,136 +203,33 @@ func init() { func init() { proto.RegisterFile("csi.proto", fileDescriptor_e099a7ef79268152) } var fileDescriptor_e099a7ef79268152 = []byte{ - // 410 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x92, 0xcf, 0x6b, 0xd4, 0x40, - 0x14, 0xc7, 0xf7, 0xb5, 0xd9, 0xb6, 0xfb, 0x16, 0xec, 0x3a, 0xfe, 0x20, 0x14, 0x19, 0x96, 0x5c, - 0x0c, 0x05, 0x13, 0x58, 0xff, 0x01, 0xa9, 0x16, 0x11, 0x21, 0x85, 0x59, 0x57, 0xd1, 0x83, 0x32, - 0x49, 0xc7, 0x38, 0x34, 0x99, 0x09, 0x99, 0x49, 0xce, 0x3d, 0xfa, 0xa7, 0x78, 0xf1, 0xee, 0xd1, - 0x63, 0x8f, 0x1e, 0x3d, 0xba, 0xf9, 0x2b, 0x3c, 0x4a, 0x26, 0x54, 0xd7, 0xee, 0xed, 0x7d, 0xbe, - 0xdf, 0x37, 0xef, 0x17, 0x83, 0x93, 0xcc, 0xc8, 0xa8, 0xaa, 0xb5, 0xd5, 0xc4, 0xcb, 0xeb, 0x2a, - 0x3b, 0x0a, 0x72, 0x9d, 0xeb, 0xd8, 0x29, 0x69, 0xf3, 0x31, 0xee, 0xc9, 0x81, 0x8b, 0x86, 0xcc, - 0xe0, 0x12, 0xf0, 0xce, 0x6b, 0x5d, 0x34, 0xa5, 0x58, 0x5a, 0x6e, 0x0d, 0x13, 0xa6, 0xd2, 0xca, - 0x08, 0xf2, 0x10, 0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x5a, 0xd3, 0xd1, 0xcf, 0x35, 0x1d, 0xfd, 0x5e, - 0x53, 0xb8, 0xec, 0x28, 0x7c, 0xe9, 0x28, 0x7c, 0xeb, 0x28, 0x7c, 0xef, 0x28, 0x5c, 0x75, 0x14, - 0x7e, 0x74, 0x14, 0x7e, 0x75, 0x14, 0xde, 0xbd, 0xcf, 0xa5, 0xfd, 0xd4, 0xa4, 0x51, 0xa6, 0xcb, - 0xf8, 0x82, 0x5b, 0xfe, 0x28, 0xd3, 0xca, 0x72, 0xa9, 0x44, 0x6d, 0xb6, 0xd8, 0xd4, 0x59, 0x5c, - 0x37, 0xca, 0xca, 0x52, 0xc4, 0xad, 0xac, 0xed, 0x86, 0x55, 0x5d, 0xe4, 0x31, 0xcf, 0x85, 0xb2, - 0xc3, 0xaf, 0xc8, 0x74, 0x61, 0xe2, 0xfe, 0x2c, 0xe9, 0x9e, 0xe3, 0xc7, 0x7f, 0x02, 0x00, 0x00, - 0xff, 0xff, 0x62, 0xcb, 0xed, 0xf6, 0x44, 0x02, 0x00, 0x00, + // 374 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x91, 0x5d, 0xab, 0xd3, 0x30, + 0x1c, 0xc6, 0x97, 0x73, 0xba, 0x73, 0xd6, 0x7f, 0xc1, 0xd5, 0xf8, 0x42, 0x11, 0x29, 0xa3, 0x37, + 0x96, 0x81, 0x2d, 0xcc, 0x2f, 0x20, 0xd3, 0x21, 0x22, 0x74, 0x90, 0x39, 0x45, 0x2f, 0x94, 0xb4, + 0x0b, 0x35, 0xac, 0x4d, 0x4a, 0x93, 0x16, 0x2f, 0xf7, 0x85, 0xfc, 0x1e, 0xbb, 0xf4, 0xd2, 0x4b, + 0xd7, 0x4f, 0x22, 0xcd, 0x98, 0xce, 0xb3, 0xbb, 0xfc, 0x9e, 0xe7, 0x49, 0xfe, 0x2f, 0x01, 0x3b, + 0x53, 0x3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0xa6, 0x42, 0xd6, 0x25, 0x2d, 0x4c, 0xc7, 0x23, 0xf2, + 0x97, 0xb1, 0x07, 0xb7, 0x25, 0x53, 0x66, 0x97, 0x7d, 0xcb, 0x36, 0x39, 0xe1, 0xfc, 0xfb, 0xfe, + 0xe0, 0x0f, 0x7e, 0x1d, 0xfc, 0xc1, 0xae, 0xf3, 0xd1, 0xbe, 0xf3, 0xd1, 0xcf, 0xce, 0x47, 0xbf, + 0x3b, 0x1f, 0x7d, 0xfe, 0x92, 0x73, 0xfd, 0xad, 0x49, 0xa3, 0x4c, 0x96, 0xf1, 0x96, 0x6a, 0xfa, + 0x3c, 0x93, 0x42, 0x53, 0x2e, 0x58, 0xad, 0x2e, 0x58, 0xd5, 0x59, 0x5c, 0x37, 0x42, 0xf3, 0x92, + 0xc5, 0x2d, 0xaf, 0xf5, 0x99, 0x55, 0x6d, 0xf3, 0x98, 0xe6, 0x4c, 0xe8, 0xd8, 0x7c, 0x79, 0x26, + 0x0b, 0x15, 0xf7, 0x5b, 0x48, 0x6f, 0x0c, 0xbf, 0xf8, 0x13, 0x00, 0x00, 0xff, 0xff, 0x33, 0x42, + 0x95, 0x9d, 0x0f, 0x02, 0x00, 0x00, } -func (this *VolumeStatsResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*VolumeStatsResponse) - if !ok { - that2, ok := that.(VolumeStatsResponse) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Usage) != len(that1.Usage) { - return false - } - for i := range this.Usage { - if !this.Usage[i].Equal(that1.Usage[i]) { - return false - } - } - if !this.VolumeCondition.Equal(that1.VolumeCondition) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *VolumeUsage) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*VolumeUsage) - if !ok { - that2, ok := that.(VolumeUsage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Available != that1.Available { - return false - } - if this.Total != that1.Total { - return false - } - if this.Used != that1.Used { - return false - } - if this.Unit != that1.Unit { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *VolumeCondition) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*VolumeCondition) - if !ok { - that2, ok := that.(VolumeCondition) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Abnormal != that1.Abnormal { - return false - } - if this.Message != that1.Message { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} func (m *VolumeStatsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -490,118 +385,6 @@ func encodeVarintCsi(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func NewPopulatedVolumeStatsResponse(r randyCsi, easy bool) *VolumeStatsResponse { - this := &VolumeStatsResponse{} - if r.Intn(5) != 0 { - v1 := r.Intn(5) - this.Usage = make([]*VolumeUsage, v1) - for i := 0; i < v1; i++ { - this.Usage[i] = NewPopulatedVolumeUsage(r, easy) - } - } - if r.Intn(5) != 0 { - this.VolumeCondition = NewPopulatedVolumeCondition(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCsi(r, 3) - } - return this -} - -func NewPopulatedVolumeUsage(r randyCsi, easy bool) *VolumeUsage { - this := &VolumeUsage{} - this.Available = uint64(uint64(r.Uint32())) - this.Total = uint64(uint64(r.Uint32())) - this.Used = uint64(uint64(r.Uint32())) - this.Unit = VolumeUsage_Unit([]int32{0, 1, 2}[r.Intn(3)]) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCsi(r, 5) - } - return this -} - -func NewPopulatedVolumeCondition(r randyCsi, easy bool) *VolumeCondition { - this := &VolumeCondition{} - this.Abnormal = bool(bool(r.Intn(2) == 0)) - this.Message = string(randStringCsi(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCsi(r, 3) - } - return this -} - -type randyCsi interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneCsi(r randyCsi) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringCsi(r randyCsi) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RuneCsi(r) - } - return string(tmps) -} -func randUnrecognizedCsi(r randyCsi, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldCsi(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldCsi(dAtA []byte, r randyCsi, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateCsi(dAtA, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - dAtA = encodeVarintPopulateCsi(dAtA, uint64(v3)) - case 1: - dAtA = encodeVarintPopulateCsi(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateCsi(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateCsi(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateCsi(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateCsi(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} func (m *VolumeStatsResponse) Size() (n int) { if m == nil { return 0 diff --git a/src/runtime/virtcontainers/pkg/agent/protocols/grpc/csipb_test.go b/src/runtime/virtcontainers/pkg/agent/protocols/grpc/csipb_test.go deleted file mode 100644 index 5a1c81fd3b..0000000000 --- a/src/runtime/virtcontainers/pkg/agent/protocols/grpc/csipb_test.go +++ /dev/null @@ -1,585 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: csi.proto - -package grpc - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - proto "github.com/gogo/protobuf/proto" - math "math" - math_rand "math/rand" - testing "testing" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestVolumeStatsResponseProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolumeStatsResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &VolumeStatsResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestVolumeStatsResponseMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolumeStatsResponse(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &VolumeStatsResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkVolumeStatsResponseProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*VolumeStatsResponse, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedVolumeStatsResponse(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkVolumeStatsResponseProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedVolumeStatsResponse(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &VolumeStatsResponse{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestVolumeUsageProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolumeUsage(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &VolumeUsage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestVolumeUsageMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolumeUsage(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &VolumeUsage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkVolumeUsageProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*VolumeUsage, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedVolumeUsage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkVolumeUsageProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedVolumeUsage(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &VolumeUsage{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestVolumeConditionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolumeCondition(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &VolumeCondition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestVolumeConditionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolumeCondition(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &VolumeCondition{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkVolumeConditionProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*VolumeCondition, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedVolumeCondition(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkVolumeConditionProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedVolumeCondition(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &VolumeCondition{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestVolumeStatsResponseJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolumeStatsResponse(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &VolumeStatsResponse{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestVolumeUsageJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolumeUsage(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &VolumeUsage{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestVolumeConditionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolumeCondition(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &VolumeCondition{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestVolumeStatsResponseProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolumeStatsResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &VolumeStatsResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestVolumeStatsResponseProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolumeStatsResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &VolumeStatsResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestVolumeUsageProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolumeUsage(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &VolumeUsage{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestVolumeUsageProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolumeUsage(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &VolumeUsage{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestVolumeConditionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolumeCondition(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &VolumeCondition{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestVolumeConditionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolumeCondition(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &VolumeCondition{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestVolumeStatsResponseSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolumeStatsResponse(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkVolumeStatsResponseSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*VolumeStatsResponse, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedVolumeStatsResponse(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestVolumeUsageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolumeUsage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkVolumeUsageSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*VolumeUsage, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedVolumeUsage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestVolumeConditionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolumeCondition(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkVolumeConditionSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*VolumeCondition, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedVolumeCondition(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestVolumeStatsResponseStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedVolumeStatsResponse(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestVolumeUsageStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedVolumeUsage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestVolumeConditionStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedVolumeCondition(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/src/runtime/virtcontainers/pkg/agent/protocols/grpc/health.pb.go b/src/runtime/virtcontainers/pkg/agent/protocols/grpc/health.pb.go index 4fdde69e94..cf5fa6d133 100644 --- a/src/runtime/virtcontainers/pkg/agent/protocols/grpc/health.pb.go +++ b/src/runtime/virtcontainers/pkg/agent/protocols/grpc/health.pb.go @@ -4,11 +4,9 @@ package grpc import ( - bytes "bytes" context "context" fmt "fmt" github_com_containerd_ttrpc "github.com/containerd/ttrpc" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" math "math" @@ -184,117 +182,31 @@ func init() { func init() { proto.RegisterFile("health.proto", fileDescriptor_fdbebe66dda7cb29) } var fileDescriptor_fdbebe66dda7cb29 = []byte{ - // 382 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x52, 0x31, 0x4b, 0xc3, 0x40, - 0x18, 0xed, 0x15, 0x6d, 0xf1, 0x9a, 0x6a, 0x39, 0x1d, 0x6a, 0x87, 0x43, 0xe3, 0x60, 0x17, 0x13, - 0xa8, 0x20, 0xe8, 0x22, 0x28, 0xa2, 0x22, 0xa4, 0x90, 0x6a, 0x05, 0x87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x16, 0xdd, 0x51, 0x3a, 0xcc, 0xba, 0x94, 0x24, 0x97, 0xe9, 0xd1, 0x0e, 0x2c, 0x3b, - 0x1e, 0x09, 0xc5, 0xaf, 0x26, 0xaf, 0x34, 0x9a, 0x22, 0x33, 0x51, 0xe3, 0x11, 0x16, 0xd2, 0x22, - 0xe8, 0x00, 0x2e, 0xab, 0x08, 0x84, 0xd2, 0x7e, 0xb3, 0xaf, 0x56, 0xdb, 0xfc, 0xb7, 0x33, 0x3a, - 0x84, 0xc5, 0x69, 0xe2, 0x22, 0x67, 0x2d, 0xe5, 0x16, 0x95, 0x38, 0x79, 0x06, 0xe3, 0x09, 0xce, - 0x7d, 0x4e, 0x70, 0xee, 0x7b, 0x82, 0xc1, 0x53, 0x82, 0xc1, 0x6b, 0x82, 0xc1, 0x5b, 0x82, 0xc1, - 0x7b, 0x82, 0xc1, 0x38, 0xc1, 0xe0, 0x23, 0xc1, 0xe0, 0x2b, 0xc1, 0xe0, 0xae, 0xe3, 0x05, 0xc2, - 0x8f, 0x7b, 0x86, 0x4b, 0x87, 0x66, 0xdf, 0x11, 0xce, 0x9e, 0x4b, 0x43, 0xe1, 0x04, 0x21, 0x61, - 0xfc, 0x0f, 0xe6, 0xcc, 0x35, 0x59, 0x1c, 0x8a, 0x60, 0x48, 0xcc, 0x51, 0xc0, 0xc4, 0xcc, 0x28, - 0xea, 0x7b, 0xa6, 0xea, 0x9f, 0xfe, 0x1a, 0x97, 0x0e, 0xb8, 0x29, 0xf7, 0xeb, 0x15, 0x14, 0xde, - 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0x07, 0xad, 0xad, 0xb7, 0x67, 0x02, 0x00, 0x00, + // 351 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x52, 0xc1, 0x4a, 0xeb, 0x40, + 0x14, 0xed, 0x94, 0xf7, 0x5a, 0xde, 0x6d, 0xfa, 0x5e,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 0x31, 0x9c, 0xe5, 0xc3, 0xa2, 0x4b, 0x2d, 0xe3, 0x0a, 0x3d, 0xde, 0x83, 0xba, 0x1f, 0x50, 0xa6, + 0xbe, 0x34, 0x65, 0xad, 0x31, 0x34, 0x59, 0x88, 0x3a, 0xcf, 0x50, 0xc9, 0x8b, 0xe0, 0x23, 0xf8, + 0xad, 0x4f, 0x60, 0x9c, 0xf7, 0x5b, 0x7d, 0xb5, 0xd6, 0xf6, 0x8f, 0x9d, 0xf1, 0x31, 0x54, 0x97, + 0x17, 0x37, 0x39, 0x5b, 0x39, 0xb7, 0xa9, 0xc4, 0xd9, 0xd3, 0x7c, 0x61, 0x96, 0xde, 0x17, 0x66, + 0xe9, 0x25, 0x35, 0xd1, 0x3c, 0x35, 0xd1, 0x5b, 0x6a, 0xa2, 0x8f, 0xd4, 0x44, 0x0f, 0x83, 0x20, + 0x52, 0x61, 0x32, 0xb2, 0x09, 0x9f, 0x3a, 0x63, 0x5f, 0xf9, 0x07, 0x84, 0x33, 0xe5, 0x47, 0x8c, + 0x0a, 0xf9, 0x0d, 0x4b, 0x41, 0x1c, 0x91, 0x30, 0x15, 0x4d, 0xa9, 0x33, 0x8b, 0x84, 0x5a, 0x19, + 0xc5, 0xe3, 0xc0, 0xd1, 0x75, 0x1d, 0xfd, 0x25, 0x08, 0x9f, 0x48, 0x27, 0x8b, 0x33, 0xaa, 0x68, + 0x7c, 0xf8, 0x19, 0x00, 0x00, 0xff, 0xff, 0x51, 0x9e, 0x56, 0xf8, 0x32, 0x02, 0x00, 0x00, } -func (this *CheckRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*CheckRequest) - if !ok { - that2, ok := that.(CheckRequest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Service != that1.Service { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *HealthCheckResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HealthCheckResponse) - if !ok { - that2, ok := that.(HealthCheckResponse) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Status != that1.Status { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *VersionCheckResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*VersionCheckResponse) - if !ok { - that2, ok := that.(VersionCheckResponse) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.GrpcVersion != that1.GrpcVersion { - return false - } - if this.AgentVersion != that1.AgentVersion { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} func (m *CheckRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -413,106 +325,6 @@ func encodeVarintHealth(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func NewPopulatedCheckRequest(r randyHealth, easy bool) *CheckRequest { - this := &CheckRequest{} - this.Service = string(randStringHealth(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedHealth(r, 2) - } - return this -} - -func NewPopulatedHealthCheckResponse(r randyHealth, easy bool) *HealthCheckResponse { - this := &HealthCheckResponse{} - this.Status = HealthCheckResponse_ServingStatus([]int32{0, 1, 2}[r.Intn(3)]) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedHealth(r, 2) - } - return this -} - -func NewPopulatedVersionCheckResponse(r randyHealth, easy bool) *VersionCheckResponse { - this := &VersionCheckResponse{} - this.GrpcVersion = string(randStringHealth(r)) - this.AgentVersion = string(randStringHealth(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedHealth(r, 3) - } - return this -} - -type randyHealth interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneHealth(r randyHealth) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringHealth(r randyHealth) string { - v1 := r.Intn(100) - tmps := make([]rune, v1) - for i := 0; i < v1; i++ { - tmps[i] = randUTF8RuneHealth(r) - } - return string(tmps) -} -func randUnrecognizedHealth(r randyHealth, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldHealth(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldHealth(dAtA []byte, r randyHealth, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateHealth(dAtA, uint64(key)) - v2 := r.Int63() - if r.Intn(2) == 0 { - v2 *= -1 - } - dAtA = encodeVarintPopulateHealth(dAtA, uint64(v2)) - case 1: - dAtA = encodeVarintPopulateHealth(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateHealth(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateHealth(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateHealth(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateHealth(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} func (m *CheckRequest) Size() (n int) { if m == nil { return 0 diff --git a/src/runtime/virtcontainers/pkg/agent/protocols/grpc/healthpb_test.go b/src/runtime/virtcontainers/pkg/agent/protocols/grpc/healthpb_test.go deleted file mode 100644 index 61a10475bf..0000000000 --- a/src/runtime/virtcontainers/pkg/agent/protocols/grpc/healthpb_test.go +++ /dev/null @@ -1,585 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: health.proto - -package grpc - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - proto "github.com/gogo/protobuf/proto" - math "math" - math_rand "math/rand" - testing "testing" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestCheckRequestProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCheckRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CheckRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCheckRequestMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCheckRequest(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CheckRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCheckRequestProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CheckRequest, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCheckRequest(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCheckRequestProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCheckRequest(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &CheckRequest{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestHealthCheckResponseProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHealthCheckResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &HealthCheckResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestHealthCheckResponseMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHealthCheckResponse(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &HealthCheckResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkHealthCheckResponseProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*HealthCheckResponse, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedHealthCheckResponse(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkHealthCheckResponseProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedHealthCheckResponse(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &HealthCheckResponse{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestVersionCheckResponseProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVersionCheckResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &VersionCheckResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestVersionCheckResponseMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVersionCheckResponse(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &VersionCheckResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkVersionCheckResponseProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*VersionCheckResponse, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedVersionCheckResponse(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkVersionCheckResponseProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedVersionCheckResponse(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &VersionCheckResponse{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCheckRequestJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCheckRequest(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CheckRequest{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestHealthCheckResponseJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHealthCheckResponse(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &HealthCheckResponse{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestVersionCheckResponseJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVersionCheckResponse(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &VersionCheckResponse{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCheckRequestProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCheckRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CheckRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCheckRequestProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCheckRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CheckRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestHealthCheckResponseProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHealthCheckResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &HealthCheckResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestHealthCheckResponseProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHealthCheckResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &HealthCheckResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestVersionCheckResponseProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVersionCheckResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &VersionCheckResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestVersionCheckResponseProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVersionCheckResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &VersionCheckResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCheckRequestSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCheckRequest(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCheckRequestSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*CheckRequest, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCheckRequest(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestHealthCheckResponseSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHealthCheckResponse(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkHealthCheckResponseSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*HealthCheckResponse, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedHealthCheckResponse(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestVersionCheckResponseSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVersionCheckResponse(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkVersionCheckResponseSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*VersionCheckResponse, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedVersionCheckResponse(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestCheckRequestStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCheckRequest(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestHealthCheckResponseStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedHealthCheckResponse(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestVersionCheckResponseStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedVersionCheckResponse(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/src/runtime/virtcontainers/pkg/agent/protocols/grpc/oci.pb.go b/src/runtime/virtcontainers/pkg/agent/protocols/grpc/oci.pb.go index d8dd74e6fe..f905bbb332 100644 --- a/src/runtime/virtcontainers/pkg/agent/protocols/grpc/oci.pb.go +++ b/src/runtime/virtcontainers/pkg/agent/protocols/grpc/oci.pb.go @@ -4,9 +4,7 @@ package grpc import ( - bytes "bytes" fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" io "io" @@ -1439,7 +1437,6 @@ var xxx_messageInfo_LinuxSyscall proto.InternalMessageInfo type isLinuxSyscall_ErrnoRet interface { isLinuxSyscall_ErrnoRet() - Equal(interface{}) bool MarshalTo([]byte) (int, error) Size() int } @@ -1551,1533 +1548,140 @@ func init() { func init() { proto.RegisterFile("oci.proto", fileDescriptor_ec5cd479a36aec97) } var fileDescriptor_ec5cd479a36aec97 = []byte{ - // 2126 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x58, 0x4d, 0x6f, 0x1b, 0xc7, - 0xf9, 0xf7, 0x92, 0x14, 0x45, 0x0e, 0x4d, 0xd9, 0x9e, 0x38, 0xce, 0xfe, 0xfd, 0x37, 0x58, 0x65, - 0x13, 0xa4, 0x4a, 0x93, 0x4a, 0xad, 0x9c, 0x06, 0xe9, 0x2b, 0x4a, 0x51, 0xb6, 0x45, 0x44, 0x32, -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 0xb9, 0x6a, 0x05, 0xff, 0xb8, 0x6a, 0x05, 0x9f, 0x7c, 0x3a, 0xe6, 0x7a, - 0x32, 0x3b, 0xdd, 0x8e, 0xc5, 0x74, 0xe7, 0x8c, 0x6a, 0xfa, 0xcd, 0x38, 0x1f, 0x2b, 0xd5, 0x0a, - 0xad, 0x64, 0xbc, 0x23, 0x6d, 0x3b, 0xdb, 0x39, 0xe7, 0x52, 0x7b, 0xac, 0xec, 0x6c, 0xbc, 0x43, - 0xc7, 0x2c, 0xd5, 0xf6, 0xf7, 0x67, 0x2c, 0x12, 0xb5, 0x03, 0x77, 0x3c, 0xad, 0x1a, 0xfa, 0xe1, - 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0xd5, 0x43, 0x54, 0x5a, 0x2d, 0x15, 0x00, 0x00, + // 2087 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x58, 0x5b, 0x6f, 0x1b, 0xc7, + 0x15, 0x36, 0x2f, 0xa2, 0xc8, 0x43, 0x53, 0xb6, 0x27, 0x8e, 0xb2, 0x75, 0x0d, 0x55, 0xd9, 0x04, + 0xa9, 0xd2, 0xa4, 0x52, 0x2b, 0xa7, 0x41, 0x7a, 0x45, 0x29, 0xca, 0xb6, 0x88, 0x48, 0x26, 0x33, + 0x94, 0xe2, 0x22, 0x0f, 0x01, 0x46, 0xcb, 0x11, 0x39, 0xd1, 0x72, 0x67, 0x31, 0x3b, 0xd4, 0xa5, + 0x4f, 0xed, 0x4f, 0xc8, 0x0f, 0x28, 0xd0, 0x3e, 0xf5, 0xad, 0xff, 0xa1, 0x6f, 0x41, 0x5f, 0x5a, + 0xa0, 0x2f, 0x05, 0xfa, 0xd2, 0xf8, 0x97, 0x14, 0x67, 0x66, 0x76, 0x39, 0x24, 0xe5, 0xb8, 0x97, + 0xb7, 0x39, 0xdf, 0xb9, 0xcc, 0xe5, 0x5c, 0x77, 0xa1, 0x21, 0x23, 0xb1, 0x9d, 0x2a, 0xa9, 0x25, + 0xa9, 0x8e, 0x54, 0x1a, 0x85, 0x7f, 0xae, 0x40, 0x75, 0x90, 0xf2, 0x88, 0x04, 0xb0, 0xfa, 0x29, + 0x57, 0x99, 0x90, 0x49, 0x50, 0xda, 0x2c, 0x6d, 0x35, 0x68, 0x4e, 0x92, 0xef, 0xc2, 0x6a, 0x5f, + 0xc9, 0x88, 0x67, 0x59, 0x50, 0xde, 0x2c, 0x6d, 0x35, 0x77, 0x5b, 0xdb, 0xa8, 0xba, 0xed, 0x40, + 0x9a, 0x73, 0xc9, 0x06, 0x54, 0xa9, 0x94, 0x3a, 0xa8, 0x18, 0x29, 0xb0, 0x52, 0x88, 0x50, 0x83, + 0x93, 0x07, 0x50, 0x3f, 0x90, 0x99, 0x4e, 0xd8, 0x84, 0x07, 0x55, 0xb3, 0x47, 0x41, 0x93, 0xb7, + 0xa0, 0x76, 0x24, 0xa7, 0x89, 0xce, 0x82, 0x95, 0xcd, 0xca, 0x56, 0x73, 0xb7, 0x69, 0xb5, 0x0d, + 0x46, 0x1d, 0x8b, 0xbc, 0x09, 0x2b, 0x07, 0x52, 0x9e, 0x67, 0x41, 0xcd, 0xec, 0xe0, 0x64, 0x0c, + 0x44, 0x2d, 0x87, 0xfc, 0x1c, 0x9a, 0xed, 0x24, 0x91, 0x9a, 0x69, 0x21, 0x93, 0x2c, 0x58, 0x35, + 0xc6, 0xbe, 0x6d, 0x05, 0xf1, 0x9e, 0xdb, 0x1e, 0xf7, 0x71, 0xa2, 0xd5, 0x35, 0xf5, 0xe5, 0x71, + 0x87, 0x43, 0x91, 0x4c, 0xaf, 0x82, 0xba, 0xbf, 0x83, 0x81, 0xa8, 0xe5, 0xe0, 0x73, 0x0c, 0x64, + 0xcc, 0x94, 0xc8, 0x82, 0x86, 0xff, 0x1c, 0x0e, 0xa4, 0x39, 0x17, 0x05, 0x9f, 0x8b, 0x64, 0x28, + 0x2f, 0xb3,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8f, 0x22, 0x39, 0x49, + 0x5d, 0x2b, 0x26, 0x9e, 0xb0, 0xe3, 0xd0, 0x5c, 0x84, 0xbc, 0x0f, 0xf7, 0x30, 0x8b, 0xce, 0xb2, + 0xbe, 0x92, 0x29, 0x1b, 0xd9, 0x9c, 0x6d, 0x98, 0x83, 0x2f, 0x33, 0xf0, 0x82, 0x47, 0x2c, 0x3b, + 0xe7, 0x43, 0xbc, 0x0c, 0x36, 0x67, 0x53, 0x89, 0x3c, 0x88, 0xbc, 0x0d, 0xad, 0x3c, 0xd3, 0xac, + 0x4c, 0xd3, 0xc8, 0xcc, 0x83, 0x64, 0x03, 0xc0, 0x14, 0x0b, 0xbf, 0xd0, 0x7b, 0x08, 0xd9, 0x81, + 0x7a, 0x37, 0xd1, 0x3c, 0xa6, 0x43, 0x1d, 0xb4, 0xcc, 0x25, 0x5e, 0xf3, 0x5d, 0xec, 0x58, 0xb4, + 0x10, 0x7a, 0xf0, 0x63, 0x68, 0x7a, 0x4e, 0xfc, 0xaf, 0x66, 0x80, 0xef, 0x14, 0xc3, 0x06, 0x0a, + 0x0d, 0xa7, 0x93, 0x49, 0xae, 0x68, 0x09, 0x14, 0xc8, 0x07, 0x93, 0x9b, 0x05, 0x3e, 0x87, 0xb5, + 0xf9, 0xd0, 0x33, 0xfd, 0x49, 0x66, 0xba, 0x68, 0x36, 0x8e, 0x32, 0x01, 0x92, 0x27, 0x5a, 0xd1, + 0x77, 0x7c, 0xc8, 0x94, 0x56, 0x1c, 0x31, 0x2a, 0x86, 0x65, 0xd6, 0xe1, 0x47, 0xce, 0x7e, 0x11, + 0x11, 0x2f, 0x2b, 0xd4, 0x26, 0xea, 0xca, 0xb3, 0x7c, 0x0d, 0xff, 0x50, 0x82, 0xa6, 0x17, 0x24, + 0x2f, 0xcb, 0x69, 0x63, 0xab, 0xec, 0xd9, 0xba, 0x0f, 0x2b, 0x47, 0xec, 0x0b, 0x69, 0x67, 0x98, + 0x0a, 0xb5, 0x84, 0x41, 0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0x32, 0xaf, 0xf2, 0x10, 0xea, 0x5c, 0xa9, 0x44, + 0x2a, 0xee, 0x0a, 0xea, 0xc1, 0x2d, 0x5a, 0x20, 0xe4, 0x5d, 0xef, 0xef, 0x4d, 0x73, 0xf7, 0xf5, + 0xe5, 0xd9, 0xba, 0xad, 0x46, 0xf6, 0xcb, 0x68, 0x0f, 0xa0, 0xfe, 0x18, 0xd5, 0x28, 0xd7, 0xe1, + 0x8f, 0xa0, 0x35, 0x37, 0xbb, 0xe2, 0xdb, 0x1f, 0x3e, 0xea, 0xb0, 0x68, 0xcc, 0x07, 0xd1, 0x98, + 0x4f, 0x58, 0xee, 0xa1, 0x39, 0x70, 0xef, 0xea, 0xab, 0xaf, 0x37, 0x6e, 0xfd, 0xe3, 0xeb, 0x8d, + 0x5b, 0xbf, 0x79, 0xb1, 0x51, 0xfa, 0xea, 0xc5, 0x46, 0xe9, 0x6f, 0x2f, 0x36, 0x4a, 0xff, 0x7a, + 0xb1, 0x51, 0xfa, 0xec, 0xf3, 0x91, 0xd0, 0xe3, 0xe9, 0xe9, 0x76, 0x24, 0x27, 0x3b, 0xe7, 0x4c, + 0xb3, 0xef, 0x47, 0xf9, 0x14, 0x99, 0x2d, 0xd1, 0x99, 0x8a, 0x76, 0x94, 0xed, 0x5e, 0x3b, 0x17, + 0x42, 0x69, 0x8f, 0x95, 0x9e, 0x8f, 0x76, 0xd8, 0x88, 0x27, 0x7a, 0xc7, 0xfc, 0xdb, 0x8c, 0x64, + 0x9c, 0xed, 0xe0, 0x95, 0x4e, 0x6b, 0x86, 0x7e, 0xf4, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd6, + 0x54, 0x48, 0x2e, 0xf8, 0x14, 0x00, 0x00, } -func (this *Spec) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Spec) - if !ok { - that2, ok := that.(Spec) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Version != that1.Version { - return false - } - if !this.Process.Equal(that1.Process) { - return false - } - if !this.Root.Equal(that1.Root) { - return false - } - if this.Hostname != that1.Hostname { - return false - } - if len(this.Mounts) != len(that1.Mounts) { - return false - } - for i := range this.Mounts { - if !this.Mounts[i].Equal(that1.Mounts[i]) { - return false - } - } - if !this.Hooks.Equal(that1.Hooks) { - return false - } - if len(this.Annotations) != len(that1.Annotations) { - return false - } - for i := range this.Annotations { - if this.Annotations[i] != that1.Annotations[i] { - return false - } - } - if !this.Linux.Equal(that1.Linux) { - return false - } - if !this.Solaris.Equal(that1.Solaris) { - return false - } - if !this.Windows.Equal(that1.Windows) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Process) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Process) - if !ok { - that2, ok := that.(Process) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Terminal != that1.Terminal { - return false - } - if !this.ConsoleSize.Equal(that1.ConsoleSize) { - return false - } - if !this.User.Equal(that1.User) { - return false - } - if len(this.Args) != len(that1.Args) { - return false - } - for i := range this.Args { - if this.Args[i] != that1.Args[i] { - return false - } - } - if len(this.Env) != len(that1.Env) { - return false - } - for i := range this.Env { - if this.Env[i] != that1.Env[i] { - return false - } - } - if this.Cwd != that1.Cwd { - return false - } - if !this.Capabilities.Equal(that1.Capabilities) { - return false - } - if len(this.Rlimits) != len(that1.Rlimits) { - return false - } - for i := range this.Rlimits { - if !this.Rlimits[i].Equal(that1.Rlimits[i]) { - return false - } - } - if this.NoNewPrivileges != that1.NoNewPrivileges { - return false - } - if this.ApparmorProfile != that1.ApparmorProfile { - return false - } - if this.OOMScoreAdj != that1.OOMScoreAdj { - return false - } - if this.SelinuxLabel != that1.SelinuxLabel { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Box) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Box) - if !ok { - that2, ok := that.(Box) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Height != that1.Height { - return false - } - if this.Width != that1.Width { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *User) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*User) - if !ok { - that2, ok := that.(User) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.UID != that1.UID { - return false - } - if this.GID != that1.GID { - return false - } - if len(this.AdditionalGids) != len(that1.AdditionalGids) { - return false - } - for i := range this.AdditionalGids { - if this.AdditionalGids[i] != that1.AdditionalGids[i] { - return false - } - } - if this.Username != that1.Username { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *LinuxCapabilities) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*LinuxCapabilities) - if !ok { - that2, ok := that.(LinuxCapabilities) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Bounding) != len(that1.Bounding) { - return false - } - for i := range this.Bounding { - if this.Bounding[i] != that1.Bounding[i] { - return false - } - } - if len(this.Effective) != len(that1.Effective) { - return false - } - for i := range this.Effective { - if this.Effective[i] != that1.Effective[i] { - return false - } - } - if len(this.Inheritable) != len(that1.Inheritable) { - return false - } - for i := range this.Inheritable { - if this.Inheritable[i] != that1.Inheritable[i] { - return false - } - } - if len(this.Permitted) != len(that1.Permitted) { - return false - } - for i := range this.Permitted { - if this.Permitted[i] != that1.Permitted[i] { - return false - } - } - if len(this.Ambient) != len(that1.Ambient) { - return false - } - for i := range this.Ambient { - if this.Ambient[i] != that1.Ambient[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *POSIXRlimit) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*POSIXRlimit) - if !ok { - that2, ok := that.(POSIXRlimit) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Type != that1.Type { - return false - } - if this.Hard != that1.Hard { - return false - } - if this.Soft != that1.Soft { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Mount) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Mount) - if !ok { - that2, ok := that.(Mount) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Destination != that1.Destination { - return false - } - if this.Source != that1.Source { - return false - } - if this.Type != that1.Type { - return false - } - if len(this.Options) != len(that1.Options) { - return false - } - for i := range this.Options { - if this.Options[i] != that1.Options[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Root) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Root) - if !ok { - that2, ok := that.(Root) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Path != that1.Path { - return false - } - if this.Readonly != that1.Readonly { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Hooks) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Hooks) - if !ok { - that2, ok := that.(Hooks) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Prestart) != len(that1.Prestart) { - return false - } - for i := range this.Prestart { - if !this.Prestart[i].Equal(that1.Prestart[i]) { - return false - } - } - if len(this.Poststart) != len(that1.Poststart) { - return false - } - for i := range this.Poststart { - if !this.Poststart[i].Equal(that1.Poststart[i]) { - return false - } - } - if len(this.Poststop) != len(that1.Poststop) { - return false - } - for i := range this.Poststop { - if !this.Poststop[i].Equal(that1.Poststop[i]) { - return false - } - } - if len(this.CreateRuntime) != len(that1.CreateRuntime) { - return false - } - for i := range this.CreateRuntime { - if !this.CreateRuntime[i].Equal(that1.CreateRuntime[i]) { - return false - } - } - if len(this.CreateContainer) != len(that1.CreateContainer) { - return false - } - for i := range this.CreateContainer { - if !this.CreateContainer[i].Equal(that1.CreateContainer[i]) { - return false - } - } - if len(this.StartContainer) != len(that1.StartContainer) { - return false - } - for i := range this.StartContainer { - if !this.StartContainer[i].Equal(that1.StartContainer[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Hook) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Hook) - if !ok { - that2, ok := that.(Hook) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Path != that1.Path { - return false - } - if len(this.Args) != len(that1.Args) { - return false - } - for i := range this.Args { - if this.Args[i] != that1.Args[i] { - return false - } - } - if len(this.Env) != len(that1.Env) { - return false - } - for i := range this.Env { - if this.Env[i] != that1.Env[i] { - return false - } - } - if this.Timeout != that1.Timeout { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Linux) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Linux) - if !ok { - that2, ok := that.(Linux) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.UIDMappings) != len(that1.UIDMappings) { - return false - } - for i := range this.UIDMappings { - if !this.UIDMappings[i].Equal(that1.UIDMappings[i]) { - return false - } - } - if len(this.GIDMappings) != len(that1.GIDMappings) { - return false - } - for i := range this.GIDMappings { - if !this.GIDMappings[i].Equal(that1.GIDMappings[i]) { - return false - } - } - if len(this.Sysctl) != len(that1.Sysctl) { - return false - } - for i := range this.Sysctl { - if this.Sysctl[i] != that1.Sysctl[i] { - return false - } - } - if !this.Resources.Equal(that1.Resources) { - return false - } - if this.CgroupsPath != that1.CgroupsPath { - return false - } - if len(this.Namespaces) != len(that1.Namespaces) { - return false - } - for i := range this.Namespaces { - if !this.Namespaces[i].Equal(that1.Namespaces[i]) { - return false - } - } - if len(this.Devices) != len(that1.Devices) { - return false - } - for i := range this.Devices { - if !this.Devices[i].Equal(that1.Devices[i]) { - return false - } - } - if !this.Seccomp.Equal(that1.Seccomp) { - return false - } - if this.RootfsPropagation != that1.RootfsPropagation { - return false - } - if len(this.MaskedPaths) != len(that1.MaskedPaths) { - return false - } - for i := range this.MaskedPaths { - if this.MaskedPaths[i] != that1.MaskedPaths[i] { - return false - } - } - if len(this.ReadonlyPaths) != len(that1.ReadonlyPaths) { - return false - } - for i := range this.ReadonlyPaths { - if this.ReadonlyPaths[i] != that1.ReadonlyPaths[i] { - return false - } - } - if this.MountLabel != that1.MountLabel { - return false - } - if !this.IntelRdt.Equal(that1.IntelRdt) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Windows) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Windows) - if !ok { - that2, ok := that.(Windows) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Dummy != that1.Dummy { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Solaris) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Solaris) - if !ok { - that2, ok := that.(Solaris) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Dummy != that1.Dummy { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *LinuxIDMapping) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*LinuxIDMapping) - if !ok { - that2, ok := that.(LinuxIDMapping) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.HostID != that1.HostID { - return false - } - if this.ContainerID != that1.ContainerID { - return false - } - if this.Size_ != that1.Size_ { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *LinuxNamespace) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*LinuxNamespace) - if !ok { - that2, ok := that.(LinuxNamespace) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Type != that1.Type { - return false - } - if this.Path != that1.Path { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *LinuxDevice) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*LinuxDevice) - if !ok { - that2, ok := that.(LinuxDevice) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Path != that1.Path { - return false - } - if this.Type != that1.Type { - return false - } - if this.Major != that1.Major { - return false - } - if this.Minor != that1.Minor { - return false - } - if this.FileMode != that1.FileMode { - return false - } - if this.UID != that1.UID { - return false - } - if this.GID != that1.GID { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *LinuxResources) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*LinuxResources) - if !ok { - that2, ok := that.(LinuxResources) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Devices) != len(that1.Devices) { - return false - } - for i := range this.Devices { - if !this.Devices[i].Equal(that1.Devices[i]) { - return false - } - } - if !this.Memory.Equal(that1.Memory) { - return false - } - if !this.CPU.Equal(that1.CPU) { - return false - } - if !this.Pids.Equal(that1.Pids) { - return false - } - if !this.BlockIO.Equal(that1.BlockIO) { - return false - } - if len(this.HugepageLimits) != len(that1.HugepageLimits) { - return false - } - for i := range this.HugepageLimits { - if !this.HugepageLimits[i].Equal(that1.HugepageLimits[i]) { - return false - } - } - if !this.Network.Equal(that1.Network) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *LinuxMemory) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*LinuxMemory) - if !ok { - that2, ok := that.(LinuxMemory) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Limit != that1.Limit { - return false - } - if this.Reservation != that1.Reservation { - return false - } - if this.Swap != that1.Swap { - return false - } - if this.Kernel != that1.Kernel { - return false - } - if this.KernelTCP != that1.KernelTCP { - return false - } - if this.Swappiness != that1.Swappiness { - return false - } - if this.DisableOOMKiller != that1.DisableOOMKiller { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *LinuxCPU) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*LinuxCPU) - if !ok { - that2, ok := that.(LinuxCPU) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Shares != that1.Shares { - return false - } - if this.Quota != that1.Quota { - return false - } - if this.Period != that1.Period { - return false - } - if this.RealtimeRuntime != that1.RealtimeRuntime { - return false - } - if this.RealtimePeriod != that1.RealtimePeriod { - return false - } - if this.Cpus != that1.Cpus { - return false - } - if this.Mems != that1.Mems { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *LinuxWeightDevice) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*LinuxWeightDevice) - if !ok { - that2, ok := that.(LinuxWeightDevice) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Major != that1.Major { - return false - } - if this.Minor != that1.Minor { - return false - } - if this.Weight != that1.Weight { - return false - } - if this.LeafWeight != that1.LeafWeight { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *LinuxThrottleDevice) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*LinuxThrottleDevice) - if !ok { - that2, ok := that.(LinuxThrottleDevice) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Major != that1.Major { - return false - } - if this.Minor != that1.Minor { - return false - } - if this.Rate != that1.Rate { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *LinuxBlockIO) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*LinuxBlockIO) - if !ok { - that2, ok := that.(LinuxBlockIO) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Weight != that1.Weight { - return false - } - if this.LeafWeight != that1.LeafWeight { - return false - } - if len(this.WeightDevice) != len(that1.WeightDevice) { - return false - } - for i := range this.WeightDevice { - if !this.WeightDevice[i].Equal(that1.WeightDevice[i]) { - return false - } - } - if len(this.ThrottleReadBpsDevice) != len(that1.ThrottleReadBpsDevice) { - return false - } - for i := range this.ThrottleReadBpsDevice { - if !this.ThrottleReadBpsDevice[i].Equal(that1.ThrottleReadBpsDevice[i]) { - return false - } - } - if len(this.ThrottleWriteBpsDevice) != len(that1.ThrottleWriteBpsDevice) { - return false - } - for i := range this.ThrottleWriteBpsDevice { - if !this.ThrottleWriteBpsDevice[i].Equal(that1.ThrottleWriteBpsDevice[i]) { - return false - } - } - if len(this.ThrottleReadIOPSDevice) != len(that1.ThrottleReadIOPSDevice) { - return false - } - for i := range this.ThrottleReadIOPSDevice { - if !this.ThrottleReadIOPSDevice[i].Equal(that1.ThrottleReadIOPSDevice[i]) { - return false - } - } - if len(this.ThrottleWriteIOPSDevice) != len(that1.ThrottleWriteIOPSDevice) { - return false - } - for i := range this.ThrottleWriteIOPSDevice { - if !this.ThrottleWriteIOPSDevice[i].Equal(that1.ThrottleWriteIOPSDevice[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *LinuxPids) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*LinuxPids) - if !ok { - that2, ok := that.(LinuxPids) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Limit != that1.Limit { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *LinuxDeviceCgroup) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*LinuxDeviceCgroup) - if !ok { - that2, ok := that.(LinuxDeviceCgroup) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Allow != that1.Allow { - return false - } - if this.Type != that1.Type { - return false - } - if this.Major != that1.Major { - return false - } - if this.Minor != that1.Minor { - return false - } - if this.Access != that1.Access { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *LinuxNetwork) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*LinuxNetwork) - if !ok { - that2, ok := that.(LinuxNetwork) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.ClassID != that1.ClassID { - return false - } - if len(this.Priorities) != len(that1.Priorities) { - return false - } - for i := range this.Priorities { - if !this.Priorities[i].Equal(that1.Priorities[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *LinuxHugepageLimit) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*LinuxHugepageLimit) - if !ok { - that2, ok := that.(LinuxHugepageLimit) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Pagesize != that1.Pagesize { - return false - } - if this.Limit != that1.Limit { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *LinuxInterfacePriority) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*LinuxInterfacePriority) - if !ok { - that2, ok := that.(LinuxInterfacePriority) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if this.Priority != that1.Priority { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *LinuxSeccomp) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*LinuxSeccomp) - if !ok { - that2, ok := that.(LinuxSeccomp) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.DefaultAction != that1.DefaultAction { - return false - } - if len(this.Architectures) != len(that1.Architectures) { - return false - } - for i := range this.Architectures { - if this.Architectures[i] != that1.Architectures[i] { - return false - } - } - if len(this.Flags) != len(that1.Flags) { - return false - } - for i := range this.Flags { - if this.Flags[i] != that1.Flags[i] { - return false - } - } - if len(this.Syscalls) != len(that1.Syscalls) { - return false - } - for i := range this.Syscalls { - if !this.Syscalls[i].Equal(that1.Syscalls[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *LinuxSeccompArg) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*LinuxSeccompArg) - if !ok { - that2, ok := that.(LinuxSeccompArg) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Index != that1.Index { - return false - } - if this.Value != that1.Value { - return false - } - if this.ValueTwo != that1.ValueTwo { - return false - } - if this.Op != that1.Op { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *LinuxSyscall) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*LinuxSyscall) - if !ok { - that2, ok := that.(LinuxSyscall) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Names) != len(that1.Names) { - return false - } - for i := range this.Names { - if this.Names[i] != that1.Names[i] { - return false - } - } - if this.Action != that1.Action { - return false - } - if that1.ErrnoRet == nil { - if this.ErrnoRet != nil { - return false - } - } else if this.ErrnoRet == nil { - return false - } else if !this.ErrnoRet.Equal(that1.ErrnoRet) { - return false - } - if len(this.Args) != len(that1.Args) { - return false - } - for i := range this.Args { - if !this.Args[i].Equal(that1.Args[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *LinuxSyscall_Errnoret) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*LinuxSyscall_Errnoret) - if !ok { - that2, ok := that.(LinuxSyscall_Errnoret) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Errnoret != that1.Errnoret { - return false - } - return true -} -func (this *LinuxIntelRdt) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*LinuxIntelRdt) - if !ok { - that2, ok := that.(LinuxIntelRdt) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.L3CacheSchema != that1.L3CacheSchema { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} func (m *Spec) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -5142,770 +3746,6 @@ func encodeVarintOci(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func NewPopulatedSpec(r randyOci, easy bool) *Spec { - this := &Spec{} - this.Version = string(randStringOci(r)) - if r.Intn(5) != 0 { - this.Process = NewPopulatedProcess(r, easy) - } - if r.Intn(5) != 0 { - this.Root = NewPopulatedRoot(r, easy) - } - this.Hostname = string(randStringOci(r)) - if r.Intn(5) != 0 { - v1 := r.Intn(5) - this.Mounts = make([]*Mount, v1) - for i := 0; i < v1; i++ { - this.Mounts[i] = NewPopulatedMount(r, easy) - } - } - if r.Intn(5) != 0 { - this.Hooks = NewPopulatedHooks(r, easy) - } - if r.Intn(5) != 0 { - v2 := r.Intn(10) - this.Annotations = make(map[string]string) - for i := 0; i < v2; i++ { - this.Annotations[randStringOci(r)] = randStringOci(r) - } - } - if r.Intn(5) != 0 { - this.Linux = NewPopulatedLinux(r, easy) - } - if r.Intn(5) != 0 { - this.Solaris = NewPopulatedSolaris(r, easy) - } - if r.Intn(5) != 0 { - this.Windows = NewPopulatedWindows(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOci(r, 11) - } - return this -} - -func NewPopulatedProcess(r randyOci, easy bool) *Process { - this := &Process{} - this.Terminal = bool(bool(r.Intn(2) == 0)) - if r.Intn(5) != 0 { - this.ConsoleSize = NewPopulatedBox(r, easy) - } - if r.Intn(5) != 0 { - this.User = NewPopulatedUser(r, easy) - } - v3 := r.Intn(10) - this.Args = make([]string, v3) - for i := 0; i < v3; i++ { - this.Args[i] = string(randStringOci(r)) - } - v4 := r.Intn(10) - this.Env = make([]string, v4) - for i := 0; i < v4; i++ { - this.Env[i] = string(randStringOci(r)) - } - this.Cwd = string(randStringOci(r)) - if r.Intn(5) != 0 { - this.Capabilities = NewPopulatedLinuxCapabilities(r, easy) - } - if r.Intn(5) != 0 { - v5 := r.Intn(5) - this.Rlimits = make([]*POSIXRlimit, v5) - for i := 0; i < v5; i++ { - this.Rlimits[i] = NewPopulatedPOSIXRlimit(r, easy) - } - } - this.NoNewPrivileges = bool(bool(r.Intn(2) == 0)) - this.ApparmorProfile = string(randStringOci(r)) - this.OOMScoreAdj = int64(r.Int63()) - if r.Intn(2) == 0 { - this.OOMScoreAdj *= -1 - } - this.SelinuxLabel = string(randStringOci(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOci(r, 13) - } - return this -} - -func NewPopulatedBox(r randyOci, easy bool) *Box { - this := &Box{} - this.Height = uint32(r.Uint32()) - this.Width = uint32(r.Uint32()) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOci(r, 3) - } - return this -} - -func NewPopulatedUser(r randyOci, easy bool) *User { - this := &User{} - this.UID = uint32(r.Uint32()) - this.GID = uint32(r.Uint32()) - v6 := r.Intn(10) - this.AdditionalGids = make([]uint32, v6) - for i := 0; i < v6; i++ { - this.AdditionalGids[i] = uint32(r.Uint32()) - } - this.Username = string(randStringOci(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOci(r, 5) - } - return this -} - -func NewPopulatedLinuxCapabilities(r randyOci, easy bool) *LinuxCapabilities { - this := &LinuxCapabilities{} - v7 := r.Intn(10) - this.Bounding = make([]string, v7) - for i := 0; i < v7; i++ { - this.Bounding[i] = string(randStringOci(r)) - } - v8 := r.Intn(10) - this.Effective = make([]string, v8) - for i := 0; i < v8; i++ { - this.Effective[i] = string(randStringOci(r)) - } - v9 := r.Intn(10) - this.Inheritable = make([]string, v9) - for i := 0; i < v9; i++ { - this.Inheritable[i] = string(randStringOci(r)) - } - v10 := r.Intn(10) - this.Permitted = make([]string, v10) - for i := 0; i < v10; i++ { - this.Permitted[i] = string(randStringOci(r)) - } - v11 := r.Intn(10) - this.Ambient = make([]string, v11) - for i := 0; i < v11; i++ { - this.Ambient[i] = string(randStringOci(r)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOci(r, 6) - } - return this -} - -func NewPopulatedPOSIXRlimit(r randyOci, easy bool) *POSIXRlimit { - this := &POSIXRlimit{} - this.Type = string(randStringOci(r)) - this.Hard = uint64(uint64(r.Uint32())) - this.Soft = uint64(uint64(r.Uint32())) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOci(r, 4) - } - return this -} - -func NewPopulatedMount(r randyOci, easy bool) *Mount { - this := &Mount{} - this.Destination = string(randStringOci(r)) - this.Source = string(randStringOci(r)) - this.Type = string(randStringOci(r)) - v12 := r.Intn(10) - this.Options = make([]string, v12) - for i := 0; i < v12; i++ { - this.Options[i] = string(randStringOci(r)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOci(r, 5) - } - return this -} - -func NewPopulatedRoot(r randyOci, easy bool) *Root { - this := &Root{} - this.Path = string(randStringOci(r)) - this.Readonly = bool(bool(r.Intn(2) == 0)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOci(r, 3) - } - return this -} - -func NewPopulatedHooks(r randyOci, easy bool) *Hooks { - this := &Hooks{} - if r.Intn(5) != 0 { - v13 := r.Intn(5) - this.Prestart = make([]*Hook, v13) - for i := 0; i < v13; i++ { - this.Prestart[i] = NewPopulatedHook(r, easy) - } - } - if r.Intn(5) != 0 { - v14 := r.Intn(5) - this.Poststart = make([]*Hook, v14) - for i := 0; i < v14; i++ { - this.Poststart[i] = NewPopulatedHook(r, easy) - } - } - if r.Intn(5) != 0 { - v15 := r.Intn(5) - this.Poststop = make([]*Hook, v15) - for i := 0; i < v15; i++ { - this.Poststop[i] = NewPopulatedHook(r, easy) - } - } - if r.Intn(5) != 0 { - v16 := r.Intn(5) - this.CreateRuntime = make([]*Hook, v16) - for i := 0; i < v16; i++ { - this.CreateRuntime[i] = NewPopulatedHook(r, easy) - } - } - if r.Intn(5) != 0 { - v17 := r.Intn(5) - this.CreateContainer = make([]*Hook, v17) - for i := 0; i < v17; i++ { - this.CreateContainer[i] = NewPopulatedHook(r, easy) - } - } - if r.Intn(5) != 0 { - v18 := r.Intn(5) - this.StartContainer = make([]*Hook, v18) - for i := 0; i < v18; i++ { - this.StartContainer[i] = NewPopulatedHook(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOci(r, 7) - } - return this -} - -func NewPopulatedHook(r randyOci, easy bool) *Hook { - this := &Hook{} - this.Path = string(randStringOci(r)) - v19 := r.Intn(10) - this.Args = make([]string, v19) - for i := 0; i < v19; i++ { - this.Args[i] = string(randStringOci(r)) - } - v20 := r.Intn(10) - this.Env = make([]string, v20) - for i := 0; i < v20; i++ { - this.Env[i] = string(randStringOci(r)) - } - this.Timeout = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Timeout *= -1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOci(r, 5) - } - return this -} - -func NewPopulatedLinux(r randyOci, easy bool) *Linux { - this := &Linux{} - if r.Intn(5) != 0 { - v21 := r.Intn(5) - this.UIDMappings = make([]*LinuxIDMapping, v21) - for i := 0; i < v21; i++ { - this.UIDMappings[i] = NewPopulatedLinuxIDMapping(r, easy) - } - } - if r.Intn(5) != 0 { - v22 := r.Intn(5) - this.GIDMappings = make([]*LinuxIDMapping, v22) - for i := 0; i < v22; i++ { - this.GIDMappings[i] = NewPopulatedLinuxIDMapping(r, easy) - } - } - if r.Intn(5) != 0 { - v23 := r.Intn(10) - this.Sysctl = make(map[string]string) - for i := 0; i < v23; i++ { - this.Sysctl[randStringOci(r)] = randStringOci(r) - } - } - if r.Intn(5) != 0 { - this.Resources = NewPopulatedLinuxResources(r, easy) - } - this.CgroupsPath = string(randStringOci(r)) - if r.Intn(5) != 0 { - v24 := r.Intn(5) - this.Namespaces = make([]*LinuxNamespace, v24) - for i := 0; i < v24; i++ { - this.Namespaces[i] = NewPopulatedLinuxNamespace(r, easy) - } - } - if r.Intn(5) != 0 { - v25 := r.Intn(5) - this.Devices = make([]*LinuxDevice, v25) - for i := 0; i < v25; i++ { - this.Devices[i] = NewPopulatedLinuxDevice(r, easy) - } - } - if r.Intn(5) != 0 { - this.Seccomp = NewPopulatedLinuxSeccomp(r, easy) - } - this.RootfsPropagation = string(randStringOci(r)) - v26 := r.Intn(10) - this.MaskedPaths = make([]string, v26) - for i := 0; i < v26; i++ { - this.MaskedPaths[i] = string(randStringOci(r)) - } - v27 := r.Intn(10) - this.ReadonlyPaths = make([]string, v27) - for i := 0; i < v27; i++ { - this.ReadonlyPaths[i] = string(randStringOci(r)) - } - this.MountLabel = string(randStringOci(r)) - if r.Intn(5) != 0 { - this.IntelRdt = NewPopulatedLinuxIntelRdt(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOci(r, 14) - } - return this -} - -func NewPopulatedWindows(r randyOci, easy bool) *Windows { - this := &Windows{} - this.Dummy = string(randStringOci(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOci(r, 2) - } - return this -} - -func NewPopulatedSolaris(r randyOci, easy bool) *Solaris { - this := &Solaris{} - this.Dummy = string(randStringOci(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOci(r, 2) - } - return this -} - -func NewPopulatedLinuxIDMapping(r randyOci, easy bool) *LinuxIDMapping { - this := &LinuxIDMapping{} - this.HostID = uint32(r.Uint32()) - this.ContainerID = uint32(r.Uint32()) - this.Size_ = uint32(r.Uint32()) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOci(r, 4) - } - return this -} - -func NewPopulatedLinuxNamespace(r randyOci, easy bool) *LinuxNamespace { - this := &LinuxNamespace{} - this.Type = string(randStringOci(r)) - this.Path = string(randStringOci(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOci(r, 3) - } - return this -} - -func NewPopulatedLinuxDevice(r randyOci, easy bool) *LinuxDevice { - this := &LinuxDevice{} - this.Path = string(randStringOci(r)) - this.Type = string(randStringOci(r)) - this.Major = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Major *= -1 - } - this.Minor = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Minor *= -1 - } - this.FileMode = uint32(r.Uint32()) - this.UID = uint32(r.Uint32()) - this.GID = uint32(r.Uint32()) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOci(r, 8) - } - return this -} - -func NewPopulatedLinuxResources(r randyOci, easy bool) *LinuxResources { - this := &LinuxResources{} - if r.Intn(5) != 0 { - v28 := r.Intn(5) - this.Devices = make([]*LinuxDeviceCgroup, v28) - for i := 0; i < v28; i++ { - this.Devices[i] = NewPopulatedLinuxDeviceCgroup(r, easy) - } - } - if r.Intn(5) != 0 { - this.Memory = NewPopulatedLinuxMemory(r, easy) - } - if r.Intn(5) != 0 { - this.CPU = NewPopulatedLinuxCPU(r, easy) - } - if r.Intn(5) != 0 { - this.Pids = NewPopulatedLinuxPids(r, easy) - } - if r.Intn(5) != 0 { - this.BlockIO = NewPopulatedLinuxBlockIO(r, easy) - } - if r.Intn(5) != 0 { - v29 := r.Intn(5) - this.HugepageLimits = make([]*LinuxHugepageLimit, v29) - for i := 0; i < v29; i++ { - this.HugepageLimits[i] = NewPopulatedLinuxHugepageLimit(r, easy) - } - } - if r.Intn(5) != 0 { - this.Network = NewPopulatedLinuxNetwork(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOci(r, 8) - } - return this -} - -func NewPopulatedLinuxMemory(r randyOci, easy bool) *LinuxMemory { - this := &LinuxMemory{} - this.Limit = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Limit *= -1 - } - this.Reservation = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Reservation *= -1 - } - this.Swap = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Swap *= -1 - } - this.Kernel = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Kernel *= -1 - } - this.KernelTCP = int64(r.Int63()) - if r.Intn(2) == 0 { - this.KernelTCP *= -1 - } - this.Swappiness = uint64(uint64(r.Uint32())) - this.DisableOOMKiller = bool(bool(r.Intn(2) == 0)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOci(r, 8) - } - return this -} - -func NewPopulatedLinuxCPU(r randyOci, easy bool) *LinuxCPU { - this := &LinuxCPU{} - this.Shares = uint64(uint64(r.Uint32())) - this.Quota = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Quota *= -1 - } - this.Period = uint64(uint64(r.Uint32())) - this.RealtimeRuntime = int64(r.Int63()) - if r.Intn(2) == 0 { - this.RealtimeRuntime *= -1 - } - this.RealtimePeriod = uint64(uint64(r.Uint32())) - this.Cpus = string(randStringOci(r)) - this.Mems = string(randStringOci(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOci(r, 8) - } - return this -} - -func NewPopulatedLinuxWeightDevice(r randyOci, easy bool) *LinuxWeightDevice { - this := &LinuxWeightDevice{} - this.Major = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Major *= -1 - } - this.Minor = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Minor *= -1 - } - this.Weight = uint32(r.Uint32()) - this.LeafWeight = uint32(r.Uint32()) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOci(r, 5) - } - return this -} - -func NewPopulatedLinuxThrottleDevice(r randyOci, easy bool) *LinuxThrottleDevice { - this := &LinuxThrottleDevice{} - this.Major = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Major *= -1 - } - this.Minor = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Minor *= -1 - } - this.Rate = uint64(uint64(r.Uint32())) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOci(r, 4) - } - return this -} - -func NewPopulatedLinuxBlockIO(r randyOci, easy bool) *LinuxBlockIO { - this := &LinuxBlockIO{} - this.Weight = uint32(r.Uint32()) - this.LeafWeight = uint32(r.Uint32()) - if r.Intn(5) != 0 { - v30 := r.Intn(5) - this.WeightDevice = make([]*LinuxWeightDevice, v30) - for i := 0; i < v30; i++ { - this.WeightDevice[i] = NewPopulatedLinuxWeightDevice(r, easy) - } - } - if r.Intn(5) != 0 { - v31 := r.Intn(5) - this.ThrottleReadBpsDevice = make([]*LinuxThrottleDevice, v31) - for i := 0; i < v31; i++ { - this.ThrottleReadBpsDevice[i] = NewPopulatedLinuxThrottleDevice(r, easy) - } - } - if r.Intn(5) != 0 { - v32 := r.Intn(5) - this.ThrottleWriteBpsDevice = make([]*LinuxThrottleDevice, v32) - for i := 0; i < v32; i++ { - this.ThrottleWriteBpsDevice[i] = NewPopulatedLinuxThrottleDevice(r, easy) - } - } - if r.Intn(5) != 0 { - v33 := r.Intn(5) - this.ThrottleReadIOPSDevice = make([]*LinuxThrottleDevice, v33) - for i := 0; i < v33; i++ { - this.ThrottleReadIOPSDevice[i] = NewPopulatedLinuxThrottleDevice(r, easy) - } - } - if r.Intn(5) != 0 { - v34 := r.Intn(5) - this.ThrottleWriteIOPSDevice = make([]*LinuxThrottleDevice, v34) - for i := 0; i < v34; i++ { - this.ThrottleWriteIOPSDevice[i] = NewPopulatedLinuxThrottleDevice(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOci(r, 8) - } - return this -} - -func NewPopulatedLinuxPids(r randyOci, easy bool) *LinuxPids { - this := &LinuxPids{} - this.Limit = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Limit *= -1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOci(r, 2) - } - return this -} - -func NewPopulatedLinuxDeviceCgroup(r randyOci, easy bool) *LinuxDeviceCgroup { - this := &LinuxDeviceCgroup{} - this.Allow = bool(bool(r.Intn(2) == 0)) - this.Type = string(randStringOci(r)) - this.Major = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Major *= -1 - } - this.Minor = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Minor *= -1 - } - this.Access = string(randStringOci(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOci(r, 6) - } - return this -} - -func NewPopulatedLinuxNetwork(r randyOci, easy bool) *LinuxNetwork { - this := &LinuxNetwork{} - this.ClassID = uint32(r.Uint32()) - if r.Intn(5) != 0 { - v35 := r.Intn(5) - this.Priorities = make([]*LinuxInterfacePriority, v35) - for i := 0; i < v35; i++ { - this.Priorities[i] = NewPopulatedLinuxInterfacePriority(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOci(r, 3) - } - return this -} - -func NewPopulatedLinuxHugepageLimit(r randyOci, easy bool) *LinuxHugepageLimit { - this := &LinuxHugepageLimit{} - this.Pagesize = string(randStringOci(r)) - this.Limit = uint64(uint64(r.Uint32())) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOci(r, 3) - } - return this -} - -func NewPopulatedLinuxInterfacePriority(r randyOci, easy bool) *LinuxInterfacePriority { - this := &LinuxInterfacePriority{} - this.Name = string(randStringOci(r)) - this.Priority = uint32(r.Uint32()) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOci(r, 3) - } - return this -} - -func NewPopulatedLinuxSeccomp(r randyOci, easy bool) *LinuxSeccomp { - this := &LinuxSeccomp{} - this.DefaultAction = string(randStringOci(r)) - v36 := r.Intn(10) - this.Architectures = make([]string, v36) - for i := 0; i < v36; i++ { - this.Architectures[i] = string(randStringOci(r)) - } - v37 := r.Intn(10) - this.Flags = make([]string, v37) - for i := 0; i < v37; i++ { - this.Flags[i] = string(randStringOci(r)) - } - if r.Intn(5) != 0 { - v38 := r.Intn(5) - this.Syscalls = make([]*LinuxSyscall, v38) - for i := 0; i < v38; i++ { - this.Syscalls[i] = NewPopulatedLinuxSyscall(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOci(r, 5) - } - return this -} - -func NewPopulatedLinuxSeccompArg(r randyOci, easy bool) *LinuxSeccompArg { - this := &LinuxSeccompArg{} - this.Index = uint64(uint64(r.Uint32())) - this.Value = uint64(uint64(r.Uint32())) - this.ValueTwo = uint64(uint64(r.Uint32())) - this.Op = string(randStringOci(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOci(r, 5) - } - return this -} - -func NewPopulatedLinuxSyscall(r randyOci, easy bool) *LinuxSyscall { - this := &LinuxSyscall{} - v39 := r.Intn(10) - this.Names = make([]string, v39) - for i := 0; i < v39; i++ { - this.Names[i] = string(randStringOci(r)) - } - this.Action = string(randStringOci(r)) - oneofNumber_ErrnoRet := []int32{3}[r.Intn(1)] - switch oneofNumber_ErrnoRet { - case 3: - this.ErrnoRet = NewPopulatedLinuxSyscall_Errnoret(r, easy) - } - if r.Intn(5) != 0 { - v40 := r.Intn(5) - this.Args = make([]*LinuxSeccompArg, v40) - for i := 0; i < v40; i++ { - this.Args[i] = NewPopulatedLinuxSeccompArg(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOci(r, 5) - } - return this -} - -func NewPopulatedLinuxSyscall_Errnoret(r randyOci, easy bool) *LinuxSyscall_Errnoret { - this := &LinuxSyscall_Errnoret{} - this.Errnoret = uint32(r.Uint32()) - return this -} -func NewPopulatedLinuxIntelRdt(r randyOci, easy bool) *LinuxIntelRdt { - this := &LinuxIntelRdt{} - this.L3CacheSchema = string(randStringOci(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedOci(r, 2) - } - return this -} - -type randyOci interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneOci(r randyOci) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringOci(r randyOci) string { - v41 := r.Intn(100) - tmps := make([]rune, v41) - for i := 0; i < v41; i++ { - tmps[i] = randUTF8RuneOci(r) - } - return string(tmps) -} -func randUnrecognizedOci(r randyOci, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldOci(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldOci(dAtA []byte, r randyOci, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateOci(dAtA, uint64(key)) - v42 := r.Int63() - if r.Intn(2) == 0 { - v42 *= -1 - } - dAtA = encodeVarintPopulateOci(dAtA, uint64(v42)) - case 1: - dAtA = encodeVarintPopulateOci(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateOci(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateOci(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateOci(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateOci(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} func (m *Spec) Size() (n int) { if m == nil { return 0 diff --git a/src/runtime/virtcontainers/pkg/agent/protocols/grpc/ocipb_test.go b/src/runtime/virtcontainers/pkg/agent/protocols/grpc/ocipb_test.go deleted file mode 100644 index 5aa4de2adf..0000000000 --- a/src/runtime/virtcontainers/pkg/agent/protocols/grpc/ocipb_test.go +++ /dev/null @@ -1,5821 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: oci.proto - -package grpc - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - proto "github.com/gogo/protobuf/proto" - math "math" - math_rand "math/rand" - testing "testing" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestSpecProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSpec(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Spec{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSpecMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSpec(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Spec{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkSpecProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Spec, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedSpec(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkSpecProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedSpec(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &Spec{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestProcessProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedProcess(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Process{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestProcessMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedProcess(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Process{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkProcessProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Process, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedProcess(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkProcessProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedProcess(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &Process{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestBoxProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBox(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Box{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestBoxMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBox(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Box{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkBoxProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Box, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedBox(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkBoxProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedBox(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &Box{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUserProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUser(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &User{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUserMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUser(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &User{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUserProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*User, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUser(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUserProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUser(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &User{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxCapabilitiesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxCapabilities(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxCapabilities{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestLinuxCapabilitiesMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxCapabilities(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxCapabilities{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkLinuxCapabilitiesProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*LinuxCapabilities, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedLinuxCapabilities(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkLinuxCapabilitiesProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLinuxCapabilities(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &LinuxCapabilities{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestPOSIXRlimitProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPOSIXRlimit(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &POSIXRlimit{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestPOSIXRlimitMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPOSIXRlimit(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &POSIXRlimit{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkPOSIXRlimitProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*POSIXRlimit, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedPOSIXRlimit(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkPOSIXRlimitProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedPOSIXRlimit(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &POSIXRlimit{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMountProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMount(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Mount{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMountMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMount(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Mount{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkMountProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Mount, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMount(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMountProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMount(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &Mount{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestRootProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRoot(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Root{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestRootMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRoot(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Root{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkRootProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Root, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedRoot(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkRootProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRoot(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &Root{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestHooksProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHooks(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Hooks{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestHooksMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHooks(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Hooks{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkHooksProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Hooks, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedHooks(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkHooksProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedHooks(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &Hooks{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestHookProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHook(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Hook{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestHookMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHook(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Hook{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkHookProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Hook, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedHook(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkHookProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedHook(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &Hook{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinux(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Linux{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestLinuxMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinux(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Linux{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkLinuxProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Linux, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedLinux(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkLinuxProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLinux(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &Linux{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestWindowsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWindows(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Windows{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestWindowsMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWindows(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Windows{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkWindowsProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Windows, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedWindows(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkWindowsProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWindows(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &Windows{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestSolarisProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSolaris(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Solaris{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSolarisMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSolaris(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Solaris{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkSolarisProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Solaris, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedSolaris(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkSolarisProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedSolaris(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &Solaris{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxIDMappingProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxIDMapping(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxIDMapping{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestLinuxIDMappingMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxIDMapping(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxIDMapping{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkLinuxIDMappingProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*LinuxIDMapping, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedLinuxIDMapping(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkLinuxIDMappingProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLinuxIDMapping(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &LinuxIDMapping{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxNamespaceProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxNamespace(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxNamespace{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestLinuxNamespaceMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxNamespace(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxNamespace{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkLinuxNamespaceProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*LinuxNamespace, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedLinuxNamespace(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkLinuxNamespaceProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLinuxNamespace(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &LinuxNamespace{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxDeviceProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxDevice(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxDevice{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestLinuxDeviceMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxDevice(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxDevice{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkLinuxDeviceProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*LinuxDevice, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedLinuxDevice(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkLinuxDeviceProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLinuxDevice(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &LinuxDevice{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxResourcesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxResources(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxResources{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestLinuxResourcesMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxResources(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxResources{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkLinuxResourcesProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*LinuxResources, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedLinuxResources(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkLinuxResourcesProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLinuxResources(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &LinuxResources{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxMemoryProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxMemory(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxMemory{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestLinuxMemoryMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxMemory(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxMemory{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkLinuxMemoryProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*LinuxMemory, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedLinuxMemory(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkLinuxMemoryProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLinuxMemory(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &LinuxMemory{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxCPUProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxCPU(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxCPU{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestLinuxCPUMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxCPU(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxCPU{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkLinuxCPUProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*LinuxCPU, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedLinuxCPU(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkLinuxCPUProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLinuxCPU(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &LinuxCPU{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxWeightDeviceProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxWeightDevice(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxWeightDevice{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestLinuxWeightDeviceMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxWeightDevice(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxWeightDevice{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkLinuxWeightDeviceProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*LinuxWeightDevice, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedLinuxWeightDevice(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkLinuxWeightDeviceProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLinuxWeightDevice(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &LinuxWeightDevice{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxThrottleDeviceProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxThrottleDevice(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxThrottleDevice{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestLinuxThrottleDeviceMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxThrottleDevice(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxThrottleDevice{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkLinuxThrottleDeviceProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*LinuxThrottleDevice, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedLinuxThrottleDevice(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkLinuxThrottleDeviceProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLinuxThrottleDevice(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &LinuxThrottleDevice{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxBlockIOProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxBlockIO(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxBlockIO{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestLinuxBlockIOMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxBlockIO(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxBlockIO{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkLinuxBlockIOProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*LinuxBlockIO, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedLinuxBlockIO(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkLinuxBlockIOProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLinuxBlockIO(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &LinuxBlockIO{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxPidsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxPids(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxPids{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestLinuxPidsMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxPids(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxPids{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkLinuxPidsProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*LinuxPids, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedLinuxPids(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkLinuxPidsProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLinuxPids(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &LinuxPids{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxDeviceCgroupProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxDeviceCgroup(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxDeviceCgroup{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestLinuxDeviceCgroupMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxDeviceCgroup(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxDeviceCgroup{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkLinuxDeviceCgroupProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*LinuxDeviceCgroup, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedLinuxDeviceCgroup(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkLinuxDeviceCgroupProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLinuxDeviceCgroup(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &LinuxDeviceCgroup{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxNetworkProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxNetwork(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxNetwork{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestLinuxNetworkMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxNetwork(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxNetwork{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkLinuxNetworkProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*LinuxNetwork, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedLinuxNetwork(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkLinuxNetworkProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLinuxNetwork(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &LinuxNetwork{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxHugepageLimitProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxHugepageLimit(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxHugepageLimit{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestLinuxHugepageLimitMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxHugepageLimit(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxHugepageLimit{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkLinuxHugepageLimitProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*LinuxHugepageLimit, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedLinuxHugepageLimit(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkLinuxHugepageLimitProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLinuxHugepageLimit(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &LinuxHugepageLimit{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxInterfacePriorityProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxInterfacePriority(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxInterfacePriority{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestLinuxInterfacePriorityMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxInterfacePriority(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxInterfacePriority{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkLinuxInterfacePriorityProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*LinuxInterfacePriority, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedLinuxInterfacePriority(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkLinuxInterfacePriorityProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLinuxInterfacePriority(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &LinuxInterfacePriority{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxSeccompProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxSeccomp(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxSeccomp{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestLinuxSeccompMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxSeccomp(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxSeccomp{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkLinuxSeccompProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*LinuxSeccomp, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedLinuxSeccomp(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkLinuxSeccompProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLinuxSeccomp(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &LinuxSeccomp{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxSeccompArgProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxSeccompArg(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxSeccompArg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestLinuxSeccompArgMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxSeccompArg(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxSeccompArg{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkLinuxSeccompArgProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*LinuxSeccompArg, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedLinuxSeccompArg(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkLinuxSeccompArgProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLinuxSeccompArg(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &LinuxSeccompArg{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxSyscallProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxSyscall(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxSyscall{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestLinuxSyscallMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxSyscall(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxSyscall{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkLinuxSyscallProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*LinuxSyscall, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedLinuxSyscall(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkLinuxSyscallProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLinuxSyscall(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &LinuxSyscall{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxIntelRdtProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxIntelRdt(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxIntelRdt{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestLinuxIntelRdtMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxIntelRdt(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxIntelRdt{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkLinuxIntelRdtProtoMarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*LinuxIntelRdt, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedLinuxIntelRdt(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkLinuxIntelRdtProtoUnmarshal(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLinuxIntelRdt(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &LinuxIntelRdt{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestSpecJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSpec(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Spec{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestProcessJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedProcess(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Process{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestBoxJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBox(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Box{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUserJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUser(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &User{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestLinuxCapabilitiesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxCapabilities(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxCapabilities{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestPOSIXRlimitJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPOSIXRlimit(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &POSIXRlimit{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMountJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMount(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Mount{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestRootJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRoot(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Root{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestHooksJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHooks(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Hooks{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestHookJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHook(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Hook{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestLinuxJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinux(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Linux{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestWindowsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWindows(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Windows{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSolarisJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSolaris(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Solaris{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestLinuxIDMappingJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxIDMapping(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxIDMapping{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestLinuxNamespaceJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxNamespace(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxNamespace{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestLinuxDeviceJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxDevice(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxDevice{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestLinuxResourcesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxResources(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxResources{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestLinuxMemoryJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxMemory(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxMemory{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestLinuxCPUJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxCPU(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxCPU{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestLinuxWeightDeviceJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxWeightDevice(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxWeightDevice{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestLinuxThrottleDeviceJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxThrottleDevice(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxThrottleDevice{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestLinuxBlockIOJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxBlockIO(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxBlockIO{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestLinuxPidsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxPids(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxPids{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestLinuxDeviceCgroupJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxDeviceCgroup(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxDeviceCgroup{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestLinuxNetworkJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxNetwork(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxNetwork{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestLinuxHugepageLimitJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxHugepageLimit(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxHugepageLimit{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestLinuxInterfacePriorityJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxInterfacePriority(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxInterfacePriority{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestLinuxSeccompJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxSeccomp(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxSeccomp{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestLinuxSeccompArgJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxSeccompArg(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxSeccompArg{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestLinuxSyscallJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxSyscall(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxSyscall{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestLinuxIntelRdtJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxIntelRdt(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &LinuxIntelRdt{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSpecProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSpec(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Spec{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSpecProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSpec(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Spec{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestProcessProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedProcess(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Process{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestProcessProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedProcess(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Process{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBoxProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBox(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Box{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBoxProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBox(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Box{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUserProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUser(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &User{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUserProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUser(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &User{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxCapabilitiesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxCapabilities(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &LinuxCapabilities{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxCapabilitiesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxCapabilities(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &LinuxCapabilities{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestPOSIXRlimitProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPOSIXRlimit(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &POSIXRlimit{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestPOSIXRlimitProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPOSIXRlimit(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &POSIXRlimit{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMountProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMount(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Mount{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMountProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMount(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Mount{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRootProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRoot(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Root{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRootProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRoot(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Root{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestHooksProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHooks(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Hooks{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestHooksProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHooks(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Hooks{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestHookProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHook(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Hook{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestHookProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHook(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Hook{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinux(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Linux{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinux(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Linux{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWindowsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWindows(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Windows{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestWindowsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWindows(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Windows{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSolarisProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSolaris(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Solaris{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSolarisProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSolaris(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Solaris{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxIDMappingProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxIDMapping(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &LinuxIDMapping{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxIDMappingProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxIDMapping(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &LinuxIDMapping{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxNamespaceProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxNamespace(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &LinuxNamespace{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxNamespaceProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxNamespace(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &LinuxNamespace{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxDeviceProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxDevice(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &LinuxDevice{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxDeviceProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxDevice(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &LinuxDevice{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxResourcesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxResources(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &LinuxResources{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxResourcesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxResources(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &LinuxResources{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxMemoryProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxMemory(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &LinuxMemory{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxMemoryProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxMemory(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &LinuxMemory{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxCPUProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxCPU(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &LinuxCPU{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxCPUProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxCPU(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &LinuxCPU{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxWeightDeviceProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxWeightDevice(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &LinuxWeightDevice{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxWeightDeviceProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxWeightDevice(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &LinuxWeightDevice{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxThrottleDeviceProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxThrottleDevice(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &LinuxThrottleDevice{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxThrottleDeviceProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxThrottleDevice(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &LinuxThrottleDevice{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxBlockIOProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxBlockIO(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &LinuxBlockIO{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxBlockIOProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxBlockIO(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &LinuxBlockIO{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxPidsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxPids(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &LinuxPids{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxPidsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxPids(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &LinuxPids{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxDeviceCgroupProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxDeviceCgroup(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &LinuxDeviceCgroup{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxDeviceCgroupProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxDeviceCgroup(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &LinuxDeviceCgroup{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxNetworkProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxNetwork(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &LinuxNetwork{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxNetworkProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxNetwork(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &LinuxNetwork{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxHugepageLimitProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxHugepageLimit(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &LinuxHugepageLimit{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxHugepageLimitProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxHugepageLimit(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &LinuxHugepageLimit{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxInterfacePriorityProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxInterfacePriority(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &LinuxInterfacePriority{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxInterfacePriorityProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxInterfacePriority(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &LinuxInterfacePriority{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxSeccompProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxSeccomp(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &LinuxSeccomp{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxSeccompProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxSeccomp(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &LinuxSeccomp{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxSeccompArgProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxSeccompArg(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &LinuxSeccompArg{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxSeccompArgProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxSeccompArg(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &LinuxSeccompArg{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxSyscallProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxSyscall(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &LinuxSyscall{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxSyscallProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxSyscall(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &LinuxSyscall{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxIntelRdtProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxIntelRdt(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &LinuxIntelRdt{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestLinuxIntelRdtProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxIntelRdt(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &LinuxIntelRdt{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSpecSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSpec(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkSpecSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Spec, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedSpec(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestProcessSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedProcess(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkProcessSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Process, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedProcess(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestBoxSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBox(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkBoxSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Box, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedBox(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestUserSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUser(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUserSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*User, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUser(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxCapabilitiesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxCapabilities(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkLinuxCapabilitiesSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*LinuxCapabilities, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedLinuxCapabilities(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestPOSIXRlimitSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPOSIXRlimit(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkPOSIXRlimitSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*POSIXRlimit, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedPOSIXRlimit(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMountSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMount(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMountSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Mount, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMount(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestRootSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRoot(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkRootSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Root, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedRoot(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestHooksSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHooks(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkHooksSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Hooks, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedHooks(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestHookSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHook(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkHookSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Hook, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedHook(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinux(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkLinuxSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Linux, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedLinux(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestWindowsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedWindows(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkWindowsSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Windows, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedWindows(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestSolarisSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSolaris(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkSolarisSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*Solaris, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedSolaris(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxIDMappingSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxIDMapping(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkLinuxIDMappingSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*LinuxIDMapping, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedLinuxIDMapping(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxNamespaceSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxNamespace(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkLinuxNamespaceSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*LinuxNamespace, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedLinuxNamespace(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxDeviceSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxDevice(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkLinuxDeviceSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*LinuxDevice, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedLinuxDevice(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxResourcesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxResources(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkLinuxResourcesSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*LinuxResources, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedLinuxResources(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxMemorySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxMemory(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkLinuxMemorySize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*LinuxMemory, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedLinuxMemory(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxCPUSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxCPU(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkLinuxCPUSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*LinuxCPU, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedLinuxCPU(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxWeightDeviceSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxWeightDevice(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkLinuxWeightDeviceSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*LinuxWeightDevice, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedLinuxWeightDevice(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxThrottleDeviceSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxThrottleDevice(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkLinuxThrottleDeviceSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*LinuxThrottleDevice, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedLinuxThrottleDevice(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxBlockIOSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxBlockIO(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkLinuxBlockIOSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*LinuxBlockIO, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedLinuxBlockIO(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxPidsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxPids(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkLinuxPidsSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*LinuxPids, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedLinuxPids(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxDeviceCgroupSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxDeviceCgroup(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkLinuxDeviceCgroupSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*LinuxDeviceCgroup, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedLinuxDeviceCgroup(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxNetworkSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxNetwork(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkLinuxNetworkSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*LinuxNetwork, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedLinuxNetwork(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxHugepageLimitSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxHugepageLimit(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkLinuxHugepageLimitSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*LinuxHugepageLimit, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedLinuxHugepageLimit(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxInterfacePrioritySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxInterfacePriority(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkLinuxInterfacePrioritySize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*LinuxInterfacePriority, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedLinuxInterfacePriority(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxSeccompSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxSeccomp(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkLinuxSeccompSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*LinuxSeccomp, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedLinuxSeccomp(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxSeccompArgSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxSeccompArg(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkLinuxSeccompArgSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*LinuxSeccompArg, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedLinuxSeccompArg(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxSyscallSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxSyscall(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkLinuxSyscallSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*LinuxSyscall, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedLinuxSyscall(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestLinuxIntelRdtSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxIntelRdt(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkLinuxIntelRdtSize(b *testing.B) { - popr := math_rand.New(math_rand.NewSource(616)) - total := 0 - pops := make([]*LinuxIntelRdt, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedLinuxIntelRdt(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestSpecStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSpec(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestProcessStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedProcess(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestBoxStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedBox(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUserStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUser(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestLinuxCapabilitiesStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLinuxCapabilities(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestPOSIXRlimitStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedPOSIXRlimit(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestMountStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMount(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestRootStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRoot(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestHooksStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedHooks(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestHookStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedHook(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestLinuxStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLinux(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestWindowsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWindows(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestSolarisStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSolaris(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestLinuxIDMappingStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLinuxIDMapping(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestLinuxNamespaceStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLinuxNamespace(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestLinuxDeviceStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLinuxDevice(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestLinuxResourcesStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLinuxResources(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestLinuxMemoryStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLinuxMemory(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestLinuxCPUStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLinuxCPU(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestLinuxWeightDeviceStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLinuxWeightDevice(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestLinuxThrottleDeviceStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLinuxThrottleDevice(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestLinuxBlockIOStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLinuxBlockIO(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestLinuxPidsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLinuxPids(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestLinuxDeviceCgroupStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLinuxDeviceCgroup(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestLinuxNetworkStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLinuxNetwork(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestLinuxHugepageLimitStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLinuxHugepageLimit(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestLinuxInterfacePriorityStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLinuxInterfacePriority(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestLinuxSeccompStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLinuxSeccomp(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestLinuxSeccompArgStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLinuxSeccompArg(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestLinuxSyscallStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLinuxSyscall(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestLinuxIntelRdtStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLinuxIntelRdt(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen