mirror of
https://github.com/reactos/syzkaller.git
synced 2024-11-23 19:39:40 +00:00
ffe7e17368
Large overhaul moves syscalls and arg types from sys to prog. Sys package now depends on prog and contains only generated descriptions of syscalls. Introduce prog.Target type that encapsulates all targer properties, like syscall list, ptr/page size, etc. Also moves OS-dependent pieces like mmap call generation from prog to sys. Update #191
28 lines
629 B
Go
28 lines
629 B
Go
// Copyright 2016 syzkaller project authors. All rights reserved.
|
|
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
|
|
|
package prog_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
. "github.com/google/syzkaller/prog"
|
|
_ "github.com/google/syzkaller/sys"
|
|
)
|
|
|
|
func TestChecksumCalcRandom(t *testing.T) {
|
|
rs, iters := InitTest(t)
|
|
for i := 0; i < iters; i++ {
|
|
p := Generate(rs, 10, nil)
|
|
for _, call := range p.Calls {
|
|
CalcChecksumsCall(call, i%32)
|
|
}
|
|
for try := 0; try <= 10; try++ {
|
|
p.Mutate(rs, 10, nil, nil)
|
|
for _, call := range p.Calls {
|
|
CalcChecksumsCall(call, i%32)
|
|
}
|
|
}
|
|
}
|
|
}
|