mirror of
https://github.com/reactos/syzkaller.git
synced 2025-02-04 02:36:20 +00:00
ac0c70f74a
This commit moves checksum computation to executor. This will allow to embed dynamically generated values (like TCP sequence numbers) into packets.
33 lines
597 B
Go
33 lines
597 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 executor
|
|
|
|
import "testing"
|
|
|
|
func testWrapper(t *testing.T, f func() int) {
|
|
switch res := f(); {
|
|
case res < 0:
|
|
t.Skip()
|
|
case res > 0:
|
|
t.Fail()
|
|
default:
|
|
}
|
|
}
|
|
|
|
func TestCopyin(t *testing.T) {
|
|
testWrapper(t, testCopyin)
|
|
}
|
|
|
|
func TestCsumInet(t *testing.T) {
|
|
testWrapper(t, testCsumInet)
|
|
}
|
|
|
|
func TestCsumInetAcc(t *testing.T) {
|
|
testWrapper(t, testCsumInetAcc)
|
|
}
|
|
|
|
func TestKVM(t *testing.T) {
|
|
testWrapper(t, testKVM)
|
|
}
|