xref: /aosp_15_r20/external/toolchain-utils/go/patch/go-1.10.3/go6.patch (revision 760c253c1ed00ce9abd48f8546f08516e57485fe)
1*760c253cSXin Lidiff --git src/encoding/gob/encoder_test.go src/encoding/gob/encoder_test.go
2*760c253cSXin Liindex a1ca252ccd..c66e623499 100644
3*760c253cSXin Li--- src/encoding/gob/encoder_test.go
4*760c253cSXin Li+++ src/encoding/gob/encoder_test.go
5*760c253cSXin Li@@ -1130,10 +1130,7 @@ func TestBadData(t *testing.T) {
6*760c253cSXin Li
7*760c253cSXin Li // TestHugeWriteFails tests that enormous messages trigger an error.
8*760c253cSXin Li func TestHugeWriteFails(t *testing.T) {
9*760c253cSXin Li-	if testing.Short() {
10*760c253cSXin Li-		// Requires allocating a monster, so don't do this from all.bash.
11*760c253cSXin Li-		t.Skip("skipping huge allocation in short mode")
12*760c253cSXin Li-	}
13*760c253cSXin Li+	t.Skip("skipping test due to huge memory requirement")
14*760c253cSXin Li 	huge := make([]byte, tooBig)
15*760c253cSXin Li 	huge[0] = 7 // Make sure it's not all zeros.
16*760c253cSXin Li 	buf := new(bytes.Buffer)
17*760c253cSXin Lidiff --git src/runtime/crash_cgo_test.go src/runtime/crash_cgo_test.go
18*760c253cSXin Liindex 998055972a..60fe2a52d2 100644
19*760c253cSXin Li--- src/runtime/crash_cgo_test.old
20*760c253cSXin Li+++ src/runtime/crash_cgo_test.go
21*760c253cSXin Li@@ -251,10 +251,7 @@ func TestCgoCCodeSIGPROF(t *testing.T) {
22*760c253cSXin Li }
23*760c253cSXin Li
24*760c253cSXin Li func TestCgoCrashTraceback(t *testing.T) {
25*760c253cSXin Li-	t.Parallel()
26*760c253cSXin Li-	if runtime.GOOS != "linux" || (runtime.GOARCH != "amd64" && runtime.GOARCH != "ppc64le") {
27*760c253cSXin Li-		t.Skipf("not yet supported on %s/%s", runtime.GOOS, runtime.GOARCH)
28*760c253cSXin Li-	}
29*760c253cSXin Li+	t.Skipf("skip running remotely")
30*760c253cSXin Li 	got := runTestProg(t, "testprogcgo", "CrashTraceback")
31*760c253cSXin Li 	for i := 1; i <= 3; i++ {
32*760c253cSXin Li 		if !strings.Contains(got, fmt.Sprintf("cgo symbolizer:%d", i)) {
33*760c253cSXin Li@@ -273,10 +270,7 @@ func TestCgoTracebackContext(t *testing.T) {
34*760c253cSXin Li }
35*760c253cSXin Li
36*760c253cSXin Li func testCgoPprof(t *testing.T, buildArg, runArg string) {
37*760c253cSXin Li-	t.Parallel()
38*760c253cSXin Li-	if runtime.GOOS != "linux" || (runtime.GOARCH != "amd64" && runtime.GOARCH != "ppc64le") {
39*760c253cSXin Li-		t.Skipf("not yet supported on %s/%s", runtime.GOOS, runtime.GOARCH)
40*760c253cSXin Li-	}
41*760c253cSXin Li+	t.Skipf("skip pprof test")
42*760c253cSXin Li 	testenv.MustHaveGoRun(t)
43*760c253cSXin Li
44*760c253cSXin Li 	exe, err := buildTestProg(t, "testprogcgo", buildArg)
45*760c253cSXin Lidiff --git src/runtime/crash_test.go src/runtime/crash_test.go
46*760c253cSXin Liindex 3607992788..e53ffb6a81 100644
47*760c253cSXin Li--- src/runtime/crash_test.go
48*760c253cSXin Li+++ src/runtime/crash_test.go
49*760c253cSXin Li@@ -481,6 +481,7 @@ func TestPanicLoop(t *testing.T) {
50*760c253cSXin Li }
51*760c253cSXin Li
52*760c253cSXin Li func TestMemPprof(t *testing.T) {
53*760c253cSXin Li+	t.Skipf("skip pprof test")
54*760c253cSXin Li 	testenv.MustHaveGoRun(t)
55*760c253cSXin Li
56*760c253cSXin Li 	exe, err := buildTestProg(t, "testprog")
57*760c253cSXin Lidiff --git src/runtime/crash_unix_test.go src/runtime/crash_unix_test.go
58*760c253cSXin Liindex 02891ec1ad..fd2723f16e 100644
59*760c253cSXin Li--- src/runtime/crash_unix_test.go
60*760c253cSXin Li+++ src/runtime/crash_unix_test.go
61*760c253cSXin Li@@ -174,9 +174,7 @@ func TestPanicSystemstack(t *testing.T) {
62*760c253cSXin Li 	// The GOTRACEBACK=crash handler takes 0.1 seconds even if
63*760c253cSXin Li 	// it's not writing a core file and potentially much longer if
64*760c253cSXin Li 	// it is. Skip in short mode.
65*760c253cSXin Li-	if testing.Short() {
66*760c253cSXin Li-		t.Skip("Skipping in short mode (GOTRACEBACK=crash is slow)")
67*760c253cSXin Li-	}
68*760c253cSXin Li+	t.Skip("Skipping (GOTRACEBACK=crash hangs on arm)")
69*760c253cSXin Li
70*760c253cSXin Li 	if runtime.Sigisblocked(int(syscall.SIGQUIT)) {
71*760c253cSXin Li 		t.Skip("skipping; SIGQUIT is blocked, see golang.org/issue/19196")
72*760c253cSXin Li@@ -244,6 +242,7 @@ func testPanicSystemstackInternal() {
73*760c253cSXin Li }
74*760c253cSXin Li
75*760c253cSXin Li func TestSignalExitStatus(t *testing.T) {
76*760c253cSXin Li+        t.Skipf("skip running remotely")
77*760c253cSXin Li 	testenv.MustHaveGoBuild(t)
78*760c253cSXin Li 	exe, err := buildTestProg(t, "testprog")
79*760c253cSXin Li 	if err != nil {
80*760c253cSXin Lidiff --git src/runtime/fastlog2_test.go src/runtime/fastlog2_test.go
81*760c253cSXin Liindex ae0f40b2bb..a93933d7ac 100644
82*760c253cSXin Li--- src/runtime/fastlog2_test.go
83*760c253cSXin Li+++ src/runtime/fastlog2_test.go
84*760c253cSXin Li@@ -16,11 +16,7 @@ func TestFastLog2(t *testing.T) {
85*760c253cSXin Li 	const randomBitCount = 26
86*760c253cSXin Li 	var e float64
87*760c253cSXin Li
88*760c253cSXin Li-	inc := 1
89*760c253cSXin Li-	if testing.Short() {
90*760c253cSXin Li-		// Check 1K total values, down from 64M.
91*760c253cSXin Li-		inc = 1 << 16
92*760c253cSXin Li-	}
93*760c253cSXin Li+	inc := 1 << 16
94*760c253cSXin Li 	for i := 1; i < 1<<randomBitCount; i += inc {
95*760c253cSXin Li 		l, fl := math.Log2(float64(i)), runtime.Fastlog2(float64(i))
96*760c253cSXin Li 		d := l - fl
97*760c253cSXin Lidiff --git src/runtime/hash_test.go src/runtime/hash_test.go
98*760c253cSXin Liindex 1400579cda..4c5de7fbef 100644
99*760c253cSXin Li--- src/runtime/hash_test.go
100*760c253cSXin Li+++ src/runtime/hash_test.go
101*760c253cSXin Li@@ -161,9 +161,7 @@ func TestSmhasherZeros(t *testing.T) {
102*760c253cSXin Li
103*760c253cSXin Li // Strings with up to two nonzero bytes all have distinct hashes.
104*760c253cSXin Li func TestSmhasherTwoNonzero(t *testing.T) {
105*760c253cSXin Li-	if testing.Short() {
106*760c253cSXin Li-		t.Skip("Skipping in short mode")
107*760c253cSXin Li-	}
108*760c253cSXin Li+	t.Skip("skipping test due to huge memory requirement")
109*760c253cSXin Li 	h := newHashSet()
110*760c253cSXin Li 	for n := 2; n <= 16; n++ {
111*760c253cSXin Li 		twoNonZero(h, n)
112*760c253cSXin Li@@ -264,9 +262,7 @@ func setbits(h *HashSet, b []byte, i int, k int) {
113*760c253cSXin Li // Test all possible combinations of n blocks from the set s.
114*760c253cSXin Li // "permutation" is a bad name here, but it is what Smhasher uses.
115*760c253cSXin Li func TestSmhasherPermutation(t *testing.T) {
116*760c253cSXin Li-	if testing.Short() {
117*760c253cSXin Li-		t.Skip("Skipping in short mode")
118*760c253cSXin Li-	}
119*760c253cSXin Li+	t.Skip("skipping test due to huge memory requirement")
120*760c253cSXin Li 	permutation(t, []uint32{0, 1, 2, 3, 4, 5, 6, 7}, 8)
121*760c253cSXin Li 	permutation(t, []uint32{0, 1 << 29, 2 << 29, 3 << 29, 4 << 29, 5 << 29, 6 << 29, 7 << 29}, 8)
122*760c253cSXin Li 	permutation(t, []uint32{0, 1}, 20)
123*760c253cSXin Lidiff --git src/runtime/pprof/pprof_test.go src/runtime/pprof/pprof_test.go
124*760c253cSXin Liindex 44d514393e..f46f00894c 100644
125*760c253cSXin Li--- src/runtime/pprof/pprof_test.go
126*760c253cSXin Li+++ src/runtime/pprof/pprof_test.go
127*760c253cSXin Li@@ -283,14 +283,7 @@ func profileOk(t *testing.T, need []string, prof bytes.Buffer, duration time.Dur
128*760c253cSXin Li func TestCPUProfileWithFork(t *testing.T) {
129*760c253cSXin Li 	testenv.MustHaveExec(t)
130*760c253cSXin Li
131*760c253cSXin Li-	heap := 1 << 30
132*760c253cSXin Li-	if runtime.GOOS == "android" {
133*760c253cSXin Li-		// Use smaller size for Android to avoid crash.
134*760c253cSXin Li-		heap = 100 << 20
135*760c253cSXin Li-	}
136*760c253cSXin Li-	if testing.Short() {
137*760c253cSXin Li-		heap = 100 << 20
138*760c253cSXin Li-	}
139*760c253cSXin Li+	heap = 100 << 20
140*760c253cSXin Li 	// This makes fork slower.
141*760c253cSXin Li 	garbage := make([]byte, heap)
142*760c253cSXin Li 	// Need to touch the slice, otherwise it won't be paged in.
143