diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2018-05-05 15:40:10 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-05-05 15:40:10 +0200 |
| commit | 31ea20ce83aa7ca21b4d0ef28d8375a058292a5a (patch) | |
| tree | 4df7407aa0bca0fd4caeb65808e899f0c6558e21 /sys/test | |
| parent | 08a0ef9cb0622002a2f9b0aabeab678bee4e0dbf (diff) | |
sys: move generate files to separate packages
Move generated files to gen subdir. This allows to:
1. Rebuild init.go without rebuilding generated code.
2. Excluding generated files from gometalinter checking.
This makes faster and consume less memory.
Update #538
Diffstat (limited to 'sys/test')
| -rw-r--r-- | sys/test/gen/32.go (renamed from sys/test/32.go) | 8 | ||||
| -rw-r--r-- | sys/test/gen/64.go (renamed from sys/test/64.go) | 8 | ||||
| -rw-r--r-- | sys/test/init.go | 6 |
3 files changed, 12 insertions, 10 deletions
diff --git a/sys/test/32.go b/sys/test/gen/32.go index db97935e1..28a8fd380 100644 --- a/sys/test/32.go +++ b/sys/test/gen/32.go @@ -1,12 +1,10 @@ // AUTOGENERATED FILE -package test +package gen import . "github.com/google/syzkaller/prog" -func init() { - RegisterTarget(&Target{OS: "test", Arch: "32", Revision: revision_32, PtrSize: 4, PageSize: 8192, NumPages: 2048, DataOffset: 536870912, Syscalls: syscalls_32, Resources: resources_32, Structs: structDescs_32, Consts: consts_32}, initTarget) -} +var Target_32 = &Target{OS: "test", Arch: "32", Revision: revision_32, PtrSize: 4, PageSize: 8192, NumPages: 2048, DataOffset: 536870912, Syscalls: syscalls_32, Resources: resources_32, Structs: structDescs_32, Consts: consts_32} var resources_32 = []*ResourceDesc{ {Name: "anyres32", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"anyres32"}, Values: []uint64{0}}, @@ -824,4 +822,4 @@ var consts_32 = []ConstValue{ {Name: "ONLY_32BITS_CONST", Value: 1}, } -const revision_32 = "328d9ffcbca65ffa7b21b9705dc57aeed48d21e4" +const revision_32 = "e64e7aa2b83bf3882517a64e4d760868ce7e378f" diff --git a/sys/test/64.go b/sys/test/gen/64.go index 5664a1ba7..232927c6d 100644 --- a/sys/test/64.go +++ b/sys/test/gen/64.go @@ -1,12 +1,10 @@ // AUTOGENERATED FILE -package test +package gen import . "github.com/google/syzkaller/prog" -func init() { - RegisterTarget(&Target{OS: "test", Arch: "64", Revision: revision_64, PtrSize: 8, PageSize: 4096, NumPages: 4096, DataOffset: 536870912, Syscalls: syscalls_64, Resources: resources_64, Structs: structDescs_64, Consts: consts_64}, initTarget) -} +var Target_64 = &Target{OS: "test", Arch: "64", Revision: revision_64, PtrSize: 8, PageSize: 4096, NumPages: 4096, DataOffset: 536870912, Syscalls: syscalls_64, Resources: resources_64, Structs: structDescs_64, Consts: consts_64} var resources_64 = []*ResourceDesc{ {Name: "anyres32", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"anyres32"}, Values: []uint64{0}}, @@ -822,4 +820,4 @@ var consts_64 = []ConstValue{ {Name: "IPPROTO_UDP", Value: 17}, } -const revision_64 = "379749ecc3394eab3b4d1ae617f394a30fc0a285" +const revision_64 = "d9251ec1f9c31ffae40648c5410d8d7624136f72" diff --git a/sys/test/init.go b/sys/test/init.go index 5df5ba0b4..3bc7cd2e0 100644 --- a/sys/test/init.go +++ b/sys/test/init.go @@ -5,8 +5,14 @@ package test import ( "github.com/google/syzkaller/prog" + "github.com/google/syzkaller/sys/test/gen" ) +func init() { + prog.RegisterTarget(gen.Target_32, initTarget) + prog.RegisterTarget(gen.Target_64, initTarget) +} + func initTarget(target *prog.Target) { arch := &arch{ mmapSyscall: target.SyscallMap["mmap"], |
