aboutsummaryrefslogtreecommitdiffstats
path: root/prog/encoding_test.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-07-20 20:26:05 +0200
committerDmitry Vyukov <dvyukov@google.com>2018-07-24 12:04:27 +0200
commit9fe4bdc5f1037a409e82299f36117030114c7b94 (patch)
treed3d73c1f69ded8152436be47684a07baa0e7f6ec /prog/encoding_test.go
parentdb7957bc09bf5715d33e4c56b8614579aa94000a (diff)
executor: overhaul
Make as much code as possible shared between all OSes. In particular main is now common across all OSes. Make more code shared between executor and csource (in particular, loop function and threaded execution logic). Also make loop and threaded logic shared across all OSes. Make more posix/unix code shared across OSes (e.g. signal handling, pthread creation, etc). Plus other changes along similar lines. Also support test OS in executor (based on portable posix) and add 4 arches that cover all execution modes (fork server/no fork server, shmem/no shmem). This change paves way for testing of executor code and allows to preserve consistency across OSes and executor/csource.
Diffstat (limited to 'prog/encoding_test.go')
-rw-r--r--prog/encoding_test.go68
1 files changed, 34 insertions, 34 deletions
diff --git a/prog/encoding_test.go b/prog/encoding_test.go
index 9870b91f6..c641fd5e6 100644
--- a/prog/encoding_test.go
+++ b/prog/encoding_test.go
@@ -131,80 +131,80 @@ func TestDeserialize(t *testing.T) {
err *regexp.Regexp
}{
{
- input: `syz_test$struct(&(0x7f0000000000)={0x0, {0x0}})`,
+ input: `test$struct(&(0x7f0000000000)={0x0, {0x0}})`,
},
{
- input: `syz_test$struct(&(0x7f0000000000)=0x0)`,
- output: `syz_test$struct(&(0x7f0000000000))`,
+ input: `test$struct(&(0x7f0000000000)=0x0)`,
+ output: `test$struct(&(0x7f0000000000))`,
},
{
- input: `syz_test$regression1(&(0x7f0000000000)=[{"000000"}, {"0000000000"}])`,
+ input: `test$regression1(&(0x7f0000000000)=[{"000000"}, {"0000000000"}])`,
},
{
- input: `syz_test$regression2(&(0x7f0000000000)=[0x1, 0x2, 0x3, 0x4, 0x5, 0x6])`,
+ input: `test$regression2(&(0x7f0000000000)=[0x1, 0x2, 0x3, 0x4, 0x5, 0x6])`,
},
{
- input: `syz_test$excessive_args1(0x0, 0x1, {0x1, &(0x7f0000000000)=[0x1, 0x2]})`,
+ input: `test$excessive_args1(0x0, 0x1, {0x1, &(0x7f0000000000)=[0x1, 0x2]})`,
},
{
- input: `syz_test$excessive_args2(0x0, 0x1, {0x1, &(0x7f0000000000)={0x1, 0x2}})`,
+ input: `test$excessive_args2(0x0, 0x1, {0x1, &(0x7f0000000000)={0x1, 0x2}})`,
},
{
- input: `syz_test$excessive_args2(0x0, 0x1, {0x1, &(0x7f0000000000)=nil})`,
+ input: `test$excessive_args2(0x0, 0x1, {0x1, &(0x7f0000000000)=nil})`,
},
{
- input: `syz_test$excessive_args2(0x0, &(0x7f0000000000), 0x0)`,
+ input: `test$excessive_args2(0x0, &(0x7f0000000000), 0x0)`,
},
{
- input: `syz_test$excessive_fields1(&(0x7f0000000000)={0x1, &(0x7f0000000000)=[{0x0}, 0x2]}, {0x1, 0x2, [0x1, 0x2]})`,
+ input: `test$excessive_fields1(&(0x7f0000000000)={0x1, &(0x7f0000000000)=[{0x0}, 0x2]}, {0x1, 0x2, [0x1, 0x2]})`,
},
{
- input: `syz_test$excessive_fields1(0x0)`,
- output: `syz_test$excessive_fields1(&(0x7f0000000000))`,
+ input: `test$excessive_fields1(0x0)`,
+ output: `test$excessive_fields1(&(0x7f0000000000))`,
},
{
- input: `syz_test$excessive_fields1(r0)`,
- output: `syz_test$excessive_fields1(&(0x7f0000000000))`,
+ input: `test$excessive_fields1(r0)`,
+ output: `test$excessive_fields1(&(0x7f0000000000))`,
},
{
- input: `syz_test$excessive_args2(r1)`,
- output: `syz_test$excessive_args2(0x0)`,
+ input: `test$excessive_args2(r1)`,
+ output: `test$excessive_args2(0x0)`,
},
{
- input: `syz_test$excessive_args2({0x0, 0x1})`,
- output: `syz_test$excessive_args2(0x0)`,
+ input: `test$excessive_args2({0x0, 0x1})`,
+ output: `test$excessive_args2(0x0)`,
},
{
- input: `syz_test$excessive_args2([0x0], 0x0)`,
- output: `syz_test$excessive_args2(0x0)`,
+ input: `test$excessive_args2([0x0], 0x0)`,
+ output: `test$excessive_args2(0x0)`,
},
{
- input: `syz_test$excessive_args2(@foo)`,
- output: `syz_test$excessive_args2(0x0)`,
+ input: `test$excessive_args2(@foo)`,
+ output: `test$excessive_args2(0x0)`,
},
{
- input: `syz_test$excessive_args2('foo')`,
- output: `syz_test$excessive_args2(0x0)`,
+ input: `test$excessive_args2('foo')`,
+ output: `test$excessive_args2(0x0)`,
},
{
- input: `syz_test$excessive_args2(&(0x7f0000000000)={0x0, 0x1})`,
- output: `syz_test$excessive_args2(0x0)`,
+ input: `test$excessive_args2(&(0x7f0000000000)={0x0, 0x1})`,
+ output: `test$excessive_args2(0x0)`,
},
{
- input: `syz_test$excessive_args2(nil)`,
- output: `syz_test$excessive_args2(0x0)`,
+ input: `test$excessive_args2(nil)`,
+ output: `test$excessive_args2(0x0)`,
},
{
- input: `syz_test$type_confusion1(&(0x7f0000000000)=@unknown)`,
- output: `syz_test$type_confusion1(&(0x7f0000000000))`,
+ input: `test$type_confusion1(&(0x7f0000000000)=@unknown)`,
+ output: `test$type_confusion1(&(0x7f0000000000))`,
},
{
- input: `syz_test$type_confusion1(&(0x7f0000000000)=@unknown={0x0, 'abc'}, 0x0)`,
- output: `syz_test$type_confusion1(&(0x7f0000000000))`,
+ input: `test$type_confusion1(&(0x7f0000000000)=@unknown={0x0, 'abc'}, 0x0)`,
+ output: `test$type_confusion1(&(0x7f0000000000))`,
},
{
- input: `syz_test$excessive_fields1(&(0x7f0000000000)=0x0)`,
- output: `syz_test$excessive_fields1(&(0x7f0000000000))`,
+ input: `test$excessive_fields1(&(0x7f0000000000)=0x0)`,
+ output: `test$excessive_fields1(&(0x7f0000000000))`,
},
}
buf := make([]byte, ExecBufferSize)