diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2024-08-07 16:11:32 +0200 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2024-08-07 18:47:26 +0000 |
| commit | 0f953f8412252770b055ec18242ea8d9b6cb0034 (patch) | |
| tree | db0beef8e72b496bd34c91a5e14e96e061ce7cd3 /prog/minimization_test.go | |
| parent | 7013cb0d7d7b78bb0160c45d13a8d7d472835513 (diff) | |
prog: don't minimize int/resource for corpus
It makes little sense to minimize int's for corpus.
Also replacing resource with a default value does not make sense as well.
For corpus we are only interesting in reducing total number of args
that will be considered for mutation.
Add CrashSnapshot mode, mainly to keep the minimization code "alive" for now.
Diffstat (limited to 'prog/minimization_test.go')
| -rw-r--r-- | prog/minimization_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/prog/minimization_test.go b/prog/minimization_test.go index 7862bcc01..6a3fb4e4e 100644 --- a/prog/minimization_test.go +++ b/prog/minimization_test.go @@ -52,7 +52,7 @@ func TestMinimize(t *testing.T) { // Aim at removal of sched_yield. return len(p.Calls) == 2 && p.Calls[0].Meta.Name == "mmap" && p.Calls[1].Meta.Name == "pipe2" }, - "mmap(&(0x7f0000000000/0x1000)=nil, 0x1000, 0x0, 0x10, 0xffffffffffffffff, 0x0)\n" + + "mmap(&(0x7f0000000000/0x1000)=nil, 0x1000, 0x3, 0x32, 0xffffffffffffffff, 0x0)\n" + "pipe2(0x0, 0x0)\n", 1, }, @@ -87,7 +87,7 @@ func TestMinimize(t *testing.T) { func(p *Prog, callIndex int) bool { return p.String() == "mmap-write-sched_yield" }, - "mmap(&(0x7f0000000000/0x1000)=nil, 0x1000, 0x0, 0x10, 0xffffffffffffffff, 0x0)\n" + + "mmap(&(0x7f0000000000/0x1000)=nil, 0x1000, 0x3, 0x32, 0xffffffffffffffff, 0x0)\n" + "write(0xffffffffffffffff, 0x0, 0x0)\n" + "sched_yield()\n", 2, @@ -103,7 +103,7 @@ func TestMinimize(t *testing.T) { func(p *Prog, callIndex int) bool { return p.String() == "mmap-write-sched_yield" }, - "mmap(&(0x7f0000000000/0x1000)=nil, 0x1000, 0x0, 0x10, 0xffffffffffffffff, 0x0)\n" + + "mmap(&(0x7f0000000000/0x1000)=nil, 0x1000, 0x3, 0x32, 0xffffffffffffffff, 0x0)\n" + "write(0xffffffffffffffff, 0x0, 0x0)\n" + "sched_yield()\n", -1, @@ -148,7 +148,7 @@ func TestMinimize(t *testing.T) { "minimize$0(0x1, 0x1)\n", -1, func(p *Prog, callIndex int) bool { return len(p.Calls) == 1 }, - "minimize$0(0x1, 0xffffffffffffffff)\n", + "minimize$0(0x1, 0x1)\n", -1, }, // Clear unneeded fault injection. |
