diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2018-01-31 20:21:01 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-02-01 15:20:12 +0100 |
| commit | d973f28294d93cf54de9b2b87d4cc8524bb8a28a (patch) | |
| tree | a88c26c1e1de0afa0340e7213b2738f81f40bb22 /prog/mutation_test.go | |
| parent | a84dec47f0bdc461828c2903429e669fc0fa5e10 (diff) | |
prog: don't serialize default arguments
This reduces size of a corpus in half.
We store corpus on manager and on hub,
so this will reduce their memory consumption.
But also makes large programs more readable.
Diffstat (limited to 'prog/mutation_test.go')
| -rw-r--r-- | prog/mutation_test.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/prog/mutation_test.go b/prog/mutation_test.go index 144b48d11..72f0e3cac 100644 --- a/prog/mutation_test.go +++ b/prog/mutation_test.go @@ -31,8 +31,8 @@ func TestMutateRandom(t *testing.T) { data0 := p.Serialize() p1 := p.Clone() // There is a chance that mutation will produce the same program. - // So we check that at least 1 out of 10 mutations actually change the program. - for try := 0; try < 10; try++ { + // So we check that at least 1 out of 20 mutations actually change the program. + for try := 0; try < 20; try++ { p1.Mutate(rs, 10, nil, nil) data := p.Serialize() if !bytes.Equal(data0, data) { @@ -212,7 +212,7 @@ func TestMinimize(t *testing.T) { }, "mmap(&(0x7f0000000000/0x1000)=nil, 0x1000, 0x3, 0x32, 0xffffffffffffffff, 0x0)\n" + "sched_yield()\n" + - "pipe2(&(0x7f0000000000)={0x0, 0x0}, 0x0)\n", + "pipe2(&(0x7f0000000000), 0x0)\n", 2, }, // Remove a call. @@ -259,7 +259,7 @@ func TestMinimize(t *testing.T) { return p.String() == "mmap-write-sched_yield" }, "mmap(&(0x7f0000000000/0x1000)=nil, 0x1000, 0x0, 0x0, 0xffffffffffffffff, 0x0)\n" + - "write(0xffffffffffffffff, &(0x7f0000000000)=\"\", 0x0)\n" + + "write(0xffffffffffffffff, &(0x7f0000000000), 0x0)\n" + "sched_yield()\n", 2, }, @@ -274,7 +274,7 @@ func TestMinimize(t *testing.T) { return p.String() == "mmap-write-sched_yield" }, "mmap(&(0x7f0000000000/0x1000)=nil, 0x1000, 0x0, 0x0, 0xffffffffffffffff, 0x0)\n" + - "write(0xffffffffffffffff, &(0x7f0000000000)=\"\", 0x0)\n" + + "write(0xffffffffffffffff, &(0x7f0000000000), 0x0)\n" + "sched_yield()\n", -1, }, |
