Test fix for s390x

This commit is contained in:
Jakub Čajka 2021-02-01 13:49:42 +01:00
parent 5d5ddbae21
commit 92b3f872c9
No known key found for this signature in database
GPG Key ID: 48DAAF91F61E4F5D
2 changed files with 50 additions and 1 deletions

45
CL288278.patch Normal file
View File

@ -0,0 +1,45 @@
From 297b61305501fc9fa434551664f69f3b48351924 Mon Sep 17 00:00:00 2001
From: Tom Thorogood <me+google@tomthorogood.co.uk>
Date: Mon, 01 Feb 2021 13:32:18 +1030
Subject: [PATCH] test: fix incorrectly laid out instructions in issue11656.go
CL 279423 introduced a regression in this test as it incorrectly laid
out various instructions. In the case of arm, the second instruction
was overwriting the first. In the case of 386, amd64 and s390x, the
instructions were being appended to the end of the slice after 64
zero bytes.
This was causing test failures on "linux/s390x on z13".
Fixes #44028
Change-Id: Id136212dabdae27db7e91904b0df6a3a9d2f4af4
---
diff --git a/test/fixedbugs/issue11656.go b/test/fixedbugs/issue11656.go
index acd3f4f..85fe720 100644
--- a/test/fixedbugs/issue11656.go
+++ b/test/fixedbugs/issue11656.go
@@ -59,10 +59,10 @@
ill := make([]byte, 64)
switch runtime.GOARCH {
case "386", "amd64":
- ill = append(ill, 0x89, 0x04, 0x25, 0x00, 0x00, 0x00, 0x00) // MOVL AX, 0
+ ill = append(ill[:0], 0x89, 0x04, 0x25, 0x00, 0x00, 0x00, 0x00) // MOVL AX, 0
case "arm":
- binary.LittleEndian.PutUint32(ill, 0xe3a00000) // MOVW $0, R0
- binary.LittleEndian.PutUint32(ill, 0xe5800000) // MOVW R0, (R0)
+ binary.LittleEndian.PutUint32(ill[0:4], 0xe3a00000) // MOVW $0, R0
+ binary.LittleEndian.PutUint32(ill[4:8], 0xe5800000) // MOVW R0, (R0)
case "arm64":
binary.LittleEndian.PutUint32(ill, 0xf90003ff) // MOVD ZR, (ZR)
case "ppc64":
@@ -74,7 +74,7 @@
case "mipsle", "mips64le":
binary.LittleEndian.PutUint32(ill, 0xfc000000) // MOVV R0, (R0)
case "s390x":
- ill = append(ill, 0xa7, 0x09, 0x00, 0x00) // MOVD $0, R0
+ ill = append(ill[:0], 0xa7, 0x09, 0x00, 0x00) // MOVD $0, R0
ill = append(ill, 0xe3, 0x00, 0x00, 0x00, 0x00, 0x24) // MOVD R0, (R0)
case "riscv64":
binary.LittleEndian.PutUint32(ill, 0x00003023) // MOV X0, (X0)

View File

@ -244,6 +244,9 @@ Requires: go-srpm-macros
Patch1: 0001-Don-t-use-the-bundled-tzdata-at-runtime-except-for-t.patch
Patch2: 0002-syscall-expose-IfInfomsg.X__ifi_pad-on-s390x.patch
Patch3: 0003-cmd-go-disable-Google-s-proxy-and-sumdb.patch
# CL https://go-review.googlesource.com/c/go/+/288278
# Fixes bug in the test on s390x and other arches
Patch4: CL288278.patch
# Having documentation separate was broken
Obsoletes: %{name}-docs < 1.1-4
@ -536,7 +539,7 @@ export GO_LDFLAGS="-linkmode internal"
export CGO_ENABLED=0
%endif
# workaround for https://github.com/golang/go/issues/39466 until it gests fixed
# Commented until the patch is ready, this work around suggested in the link avobe
# Commented until the patch is ready, this workaround suggested in the link above
# doesn't work properly
#ifarch aarch64
#export CGO_CFLAGS="-mno-outline-atomics"
@ -618,6 +621,7 @@ fi
* Sun Jan 31 2021 Neal Gompa <ngompa13@gmail.com> - 1.16-0.rc1.1
- Update to go1.16rc1
- Related: BZ#1913835
- Resolves: BZ#1922617
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.16-0.beta1.1.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild