• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1all: disable some tests that have trouble running remotely.
2
3--- src/encoding/gob/encoder_test.go
4+++ src/encoding/gob/encoder_test.go
5@@ -1125,20 +1125,17 @@ func TestBadData(t *testing.T) {
6 		if !strings.Contains(err.Error(), test.error) {
7 			t.Errorf("#%d: decode: expected %q error, got %s", i, test.error, err.Error())
8 		}
9 	}
10 }
11
12 // TestHugeWriteFails tests that enormous messages trigger an error.
13 func TestHugeWriteFails(t *testing.T) {
14-	if testing.Short() {
15-		// Requires allocating a monster, so don't do this from all.bash.
16-		t.Skip("skipping huge allocation in short mode")
17-	}
18+	t.Skip("skipping test due to huge memory requirement")
19 	huge := make([]byte, tooBig)
20 	huge[0] = 7 // Make sure it's not all zeros.
21 	buf := new(bytes.Buffer)
22 	err := NewEncoder(buf).Encode(huge)
23 	if err == nil {
24 		t.Fatalf("expected error for huge slice")
25 	}
26 	if !strings.Contains(err.Error(), "message too big") {
27--- src/runtime/crash_cgo_test.go
28+++ src/runtime/crash_cgo_test.go
29@@ -246,20 +246,17 @@ func TestCgoCCodeSIGPROF(t *testing.T) {
30 	got := runTestProg(t, "testprogcgo", "CgoCCodeSIGPROF")
31 	want := "OK\n"
32 	if got != want {
33 		t.Errorf("expected %q got %v", want, got)
34 	}
35 }
36
37 func TestCgoCrashTraceback(t *testing.T) {
38-	t.Parallel()
39-	if runtime.GOOS != "linux" || (runtime.GOARCH != "amd64" && runtime.GOARCH != "ppc64le") {
40-		t.Skipf("not yet supported on %s/%s", runtime.GOOS, runtime.GOARCH)
41-	}
42+	t.Skipf("skip running remotely")
43 	got := runTestProg(t, "testprogcgo", "CrashTraceback")
44 	for i := 1; i <= 3; i++ {
45 		if !strings.Contains(got, fmt.Sprintf("cgo symbolizer:%d", i)) {
46 			t.Errorf("missing cgo symbolizer:%d", i)
47 		}
48 	}
49 }
50
51@@ -268,20 +265,17 @@ func TestCgoTracebackContext(t *testing.T) {
52 	got := runTestProg(t, "testprogcgo", "TracebackContext")
53 	want := "OK\n"
54 	if got != want {
55 		t.Errorf("expected %q got %v", want, got)
56 	}
57 }
58
59 func testCgoPprof(t *testing.T, buildArg, runArg string) {
60-	t.Parallel()
61-	if runtime.GOOS != "linux" || (runtime.GOARCH != "amd64" && runtime.GOARCH != "ppc64le") {
62-		t.Skipf("not yet supported on %s/%s", runtime.GOOS, runtime.GOARCH)
63-	}
64+	t.Skipf("skip pprof test")
65 	testenv.MustHaveGoRun(t)
66
67 	exe, err := buildTestProg(t, "testprogcgo", buildArg)
68 	if err != nil {
69 		t.Fatal(err)
70 	}
71
72 	got, err := testenv.CleanCmdEnv(goExecCmd(exe, runArg)).CombinedOutput()
73--- src/runtime/crash_test.go
74+++ src/runtime/crash_test.go
75@@ -476,16 +476,17 @@ func TestPanicDeadlockSyscall(t *testing.T) {
76 func TestPanicLoop(t *testing.T) {
77 	output := runTestProg(t, "testprog", "PanicLoop")
78 	if want := "panic while printing panic value"; !strings.Contains(output, want) {
79 		t.Errorf("output does not contain %q:\n%s", want, output)
80 	}
81 }
82
83 func TestMemPprof(t *testing.T) {
84+	t.Skipf("skip pprof test")
85 	testenv.MustHaveGoRun(t)
86
87 	exe, err := buildTestProg(t, "testprog")
88 	if err != nil {
89 		t.Fatal(err)
90 	}
91
92 	got, err := testenv.CleanCmdEnv(goExecCmd(exe, "MemProf")).CombinedOutput()
93--- src/runtime/crash_unix_test.go
94+++ src/runtime/crash_unix_test.go
95@@ -169,19 +169,17 @@ func loop(i int, c chan bool) {
96
97 func TestPanicSystemstack(t *testing.T) {
98 	// Test that GOTRACEBACK=crash prints both the system and user
99 	// stack of other threads.
100
101 	// The GOTRACEBACK=crash handler takes 0.1 seconds even if
102 	// it's not writing a core file and potentially much longer if
103 	// it is. Skip in short mode.
104-	if testing.Short() {
105-		t.Skip("Skipping in short mode (GOTRACEBACK=crash is slow)")
106-	}
107+	t.Skip("Skipping (GOTRACEBACK=crash hangs on arm)")
108
109 	if runtime.Sigisblocked(int(syscall.SIGQUIT)) {
110 		t.Skip("skipping; SIGQUIT is blocked, see golang.org/issue/19196")
111 	}
112
113 	t.Parallel()
114 	cmd := exec.Command(os.Args[0], "testPanicSystemstackInternal")
115 	cmd = testenv.CleanCmdEnv(cmd)
116@@ -239,16 +237,17 @@ func init() {
117 }
118
119 func testPanicSystemstackInternal() {
120 	runtime.BlockOnSystemStack()
121 	os.Exit(1) // Should be unreachable.
122 }
123
124 func TestSignalExitStatus(t *testing.T) {
125+	t.Skipf("skip running remotely")
126 	testenv.MustHaveGoBuild(t)
127 	exe, err := buildTestProg(t, "testprog")
128 	if err != nil {
129 		t.Fatal(err)
130 	}
131 	err = testenv.CleanCmdEnv(goExecCmd(exe, "SignalExitStatus")).Run()
132 	if err == nil {
133 		t.Error("test program succeeded unexpectedly")
134--- src/runtime/fastlog2_test.go
135+++ src/runtime/fastlog2_test.go
136@@ -11,21 +11,17 @@ import (
137 )
138
139 func TestFastLog2(t *testing.T) {
140 	// Compute the euclidean distance between math.Log2 and the FastLog2
141 	// implementation over the range of interest for heap sampling.
142 	const randomBitCount = 26
143 	var e float64
144
145-	inc := 1
146-	if testing.Short() {
147-		// Check 1K total values, down from 64M.
148-		inc = 1 << 16
149-	}
150+	inc := 1 << 16
151 	for i := 1; i < 1<<randomBitCount; i += inc {
152 		l, fl := math.Log2(float64(i)), runtime.Fastlog2(float64(i))
153 		d := l - fl
154 		e += d * d
155 	}
156 	e = math.Sqrt(e)
157
158 	if e > 1.0 {
159--- src/runtime/hash_test.go
160+++ src/runtime/hash_test.go
161@@ -156,19 +156,17 @@ func TestSmhasherZeros(t *testing.T) {
162 	for i := 0; i <= N; i++ {
163 		h.addB(b[:i])
164 	}
165 	h.check(t)
166 }
167
168 // Strings with up to two nonzero bytes all have distinct hashes.
169 func TestSmhasherTwoNonzero(t *testing.T) {
170-	if testing.Short() {
171-		t.Skip("Skipping in short mode")
172-	}
173+	t.Skip("skipping test due to huge memory requirement")
174 	h := newHashSet()
175 	for n := 2; n <= 16; n++ {
176 		twoNonZero(h, n)
177 	}
178 	h.check(t)
179 }
180 func twoNonZero(h *HashSet, n int) {
181 	b := make([]byte, n)
182@@ -259,19 +257,17 @@ func setbits(h *HashSet, b []byte, i int, k int) {
183 		setbits(h, b, j+1, k-1)
184 		b[j/8] &= byte(^(1 << uint(j&7)))
185 	}
186 }
187
188 // Test all possible combinations of n blocks from the set s.
189 // "permutation" is a bad name here, but it is what Smhasher uses.
190 func TestSmhasherPermutation(t *testing.T) {
191-	if testing.Short() {
192-		t.Skip("Skipping in short mode")
193-	}
194+	t.Skip("skipping test due to huge memory requirement")
195 	permutation(t, []uint32{0, 1, 2, 3, 4, 5, 6, 7}, 8)
196 	permutation(t, []uint32{0, 1 << 29, 2 << 29, 3 << 29, 4 << 29, 5 << 29, 6 << 29, 7 << 29}, 8)
197 	permutation(t, []uint32{0, 1}, 20)
198 	permutation(t, []uint32{0, 1 << 31}, 20)
199 	permutation(t, []uint32{0, 1, 2, 3, 4, 5, 6, 7, 1 << 29, 2 << 29, 3 << 29, 4 << 29, 5 << 29, 6 << 29, 7 << 29}, 6)
200 }
201 func permutation(t *testing.T, s []uint32, n int) {
202 	b := make([]byte, n*4)
203--- src/runtime/pprof/pprof_test.go
204+++ src/runtime/pprof/pprof_test.go
205@@ -278,24 +278,17 @@ func profileOk(t *testing.T, need []string, prof bytes.Buffer, duration time.Dur
206 	return ok
207 }
208
209 // Fork can hang if preempted with signals frequently enough (see issue 5517).
210 // Ensure that we do not do this.
211 func TestCPUProfileWithFork(t *testing.T) {
212 	testenv.MustHaveExec(t)
213
214-	heap := 1 << 30
215-	if runtime.GOOS == "android" {
216-		// Use smaller size for Android to avoid crash.
217-		heap = 100 << 20
218-	}
219-	if testing.Short() {
220-		heap = 100 << 20
221-	}
222+	heap := 100 << 20
223 	// This makes fork slower.
224 	garbage := make([]byte, heap)
225 	// Need to touch the slice, otherwise it won't be paged in.
226 	done := make(chan bool)
227 	go func() {
228 		for i := range garbage {
229 			garbage[i] = 42
230 		}
231