aboutsummaryrefslogtreecommitdiffstats
path: root/prog/prog_test.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2021-12-21 14:23:50 +0100
committerDmitry Vyukov <dvyukov@google.com>2021-12-21 18:52:46 +0100
commitad097c94a04025c865b3956566ea5da7670ed437 (patch)
tree12a7efa8c65fa8fef91f33fb12d34d8f8f2023d7 /prog/prog_test.go
parentc6f13480f3e562921f700b3e4f878ca5d54d958f (diff)
pkg/testutil: add package
Add package with RaceEnabled const that can be used in test to skip long tests in race mode. Switch existing tests to use the new package. Update #2886
Diffstat (limited to 'prog/prog_test.go')
-rw-r--r--prog/prog_test.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/prog/prog_test.go b/prog/prog_test.go
index 6586d1a1d..a21c464a0 100644
--- a/prog/prog_test.go
+++ b/prog/prog_test.go
@@ -9,6 +9,8 @@ import (
"math/rand"
"strings"
"testing"
+
+ "github.com/google/syzkaller/pkg/testutil"
)
func TestGeneration(t *testing.T) {
@@ -142,7 +144,7 @@ func TestVmaType(t *testing.T) {
// deserialized for another arch. This happens when managers exchange
// programs via hub.
func TestCrossTarget(t *testing.T) {
- if raceEnabled {
+ if testutil.RaceEnabled {
t.Skip("skipping in race mode, too slow")
}
t.Parallel()