aboutsummaryrefslogtreecommitdiffstats
path: root/prog/encodingexec_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'prog/encodingexec_test.go')
-rw-r--r--prog/encodingexec_test.go13
1 files changed, 8 insertions, 5 deletions
diff --git a/prog/encodingexec_test.go b/prog/encodingexec_test.go
index 37bfe04c0..9a2dd1d1e 100644
--- a/prog/encodingexec_test.go
+++ b/prog/encodingexec_test.go
@@ -1,7 +1,7 @@
// 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
+package prog_test
import (
"bytes"
@@ -9,13 +9,12 @@ import (
"fmt"
"testing"
- . "github.com/google/syzkaller/sys"
+ . "github.com/google/syzkaller/prog"
+ _ "github.com/google/syzkaller/sys"
)
-const ptrSize = 8
-
func TestSerializeForExecRandom(t *testing.T) {
- rs, iters := initTest(t)
+ rs, iters := InitTest(t)
buf := make([]byte, ExecBufferSize)
for i := 0; i < iters; i++ {
p := Generate(rs, 10, nil)
@@ -46,6 +45,10 @@ func TestSerializeForExec(t *testing.T) {
argResult = uint64(ExecArgResult)
argData = uint64(ExecArgData)
)
+ var (
+ dataOffset = DataOffset()
+ ptrSize = PtrSize()
+ )
callID := func(name string) uint64 {
c := SyscallMap[name]
if c == nil {