diff options
Diffstat (limited to 'prog/minimization_test.go')
| -rw-r--r-- | prog/minimization_test.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/prog/minimization_test.go b/prog/minimization_test.go index 032b2b080..cf499b7f1 100644 --- a/prog/minimization_test.go +++ b/prog/minimization_test.go @@ -171,6 +171,28 @@ func TestMinimize(t *testing.T) { "pipe2(0x0, 0x0) (fail_nth: 5)\n", -1, }, + // Clear unneeded async flag. + { + "linux", "amd64", + "pipe2(0x0, 0x0) (async)\n", + -1, + func(p *Prog, callIndex int) bool { + return len(p.Calls) == 1 && p.Calls[0].Meta.Name == "pipe2" + }, + "pipe2(0x0, 0x0)\n", + -1, + }, + // Keep important async flag. + { + "linux", "amd64", + "pipe2(0x0, 0x0) (async)\n", + -1, + func(p *Prog, callIndex int) bool { + return len(p.Calls) == 1 && p.Calls[0].Meta.Name == "pipe2" && p.Calls[0].Props.Async + }, + "pipe2(0x0, 0x0) (async)\n", + -1, + }, } t.Parallel() for ti, test := range tests { |
