Subject: bug#27710: closed (Re: [bug#27710] [PATCH] gnu: [email-masked]: Fix test failure.)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 15 Jul 2017 20:17:02 +0000

Your bug report

#27710: [PATCH] gnu: [email-masked]: Fix test failure.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
27710: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=27710
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#27710] [PATCH] gnu: [email-masked]: Fix test failure.
From: Leo Famulari <[email-masked]>
To: Alex Vong <[email-masked]>
Cc: [email-masked]
Date: Sat, 15 Jul 2017 16:15:42 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

On Sun, Jul 16, 2017 at 12:59:01AM +0800, Alex Vong wrote:
> Tags: fixed-upstream
> Forwarded: https://github.com/golang/go/issues/20007
> 
> Hello,
> 
> This patch fixes the test failure in core-updates. I've tried to
> cherry-pick upstream's commit, but it doesn't work. So I fall back to
> fix it directly instead. The bug has already been fixed upstream, and
> the fix will be in the next release (1.9). See [0] for details.
> 

> From 023f866f8838df457639a38af9c2c733e445435d Mon Sep 17 00:00:00 2001
> From: Alex Vong <[email-masked]>
> Date: Sun, 16 Jul 2017 00:41:17 +0800
> Subject: [PATCH] gnu: [email-masked]: Fix test failure.
> 
> * gnu/packages/golang.scm (go-1.8)[arguments]: Escape braces in test data in
> 'prebuild' phase.

Thanks! Pushed as eaca9ff07e4762c3d33e3090bab999c7cf74c98a.

BTW, I've attached an update to the latest Go, 1.9beta2. I can
successfully build Syncthing with it.
From c607f2857d223d377ad905a6a1f063c6aa6da22e Mon Sep 17 00:00:00 2001
From: Leo Famulari <[email-masked]>
Date: Fri, 14 Jul 2017 14:15:54 -0400
Subject: [PATCH] WIP: go: Update to 1.9beta2.

* gnu/packages/golang.scm (go-1.8): Replace with ...
(go-1.9): ... new variable.
[arguments]: Adjust the pre-build phase accordingly.
---
 gnu/packages/golang.scm | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 70cae6d87..a7facf4ed 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -199,11 +199,11 @@ garbage collection, various safety features and in the style of communicating
 sequential processes (CSP) concurrent programming features added.")
     (license license:bsd-3)))
 
-(define-public go-1.8
+(define-public go-1.9
   (package
     (inherit go-1.4)
     (name "go")
-    (version "1.8.3")
+    (version "1.9beta2")
     (source
      (origin
        (method url-fetch)
@@ -211,7 +211,7 @@ sequential processes (CSP) concurrent programming features added.")
                            name version ".src.tar.gz"))
        (sha256
         (base32
-         "19lzv4lqixj3v2gjaff0fdbbmgsq5r8lrfd61z2zvp778wjflpaz"))))
+         "1hx8vab9qbwpk75lfx1zvj9a6ssalp1hpa1pp0fyzcn3x4lip8ac"))))
     (arguments
      (substitute-keyword-arguments (package-arguments go-1.4)
        ((#:phases phases)
@@ -242,7 +242,7 @@ sequential processes (CSP) concurrent programming features added.")
                  ;; Add libgcc to runpath
                  (substitute* "cmd/link/internal/ld/lib.go"
                    (("!rpath.set") "true"))
-                 (substitute* "cmd/go/build.go"
+                 (substitute* "cmd/go/internal/work/build.go"
                    (("cgoldflags := \\[\\]string\\{\\}")
                     (string-append "cgoldflags := []string{"
                                    "\"-rpath=" gcclib "\""
@@ -265,7 +265,9 @@ sequential processes (CSP) concurrent programming features added.")
                      (substitute* file
                        ((regex all before test_name)
                         (string-append before "Disabled" test_name)))))
-                  '(("net/net_test.go" "(.+)(TestShutdownUnix.+)")
+                  '(;; See https://github.com/golang/go/commit/81ed9ca1d411f0bd8738ea60b3a8045446ad85fc
+                    ("cmd/go/go_test.go" "(.+)(TestExecutableGOROOT.+)")
+                    ("net/net_test.go" "(.+)(TestShutdownUnix.+)")
                     ("net/dial_test.go" "(.+)(TestDialTimeout.+)")
                     ("os/os_test.go" "(.+)(TestHostname.+)")
                     ("time/format_test.go" "(.+)(TestParseInSydney.+)")
@@ -366,4 +368,4 @@ sequential processes (CSP) concurrent programming features added.")
      `(("go" ,go-1.4)
        ,@(package-native-inputs go-1.4)))))
 
-(define-public go go-1.8)
+(define-public go go-1.9)
-- 
2.13.3

Subject: [PATCH] gnu: [email-masked]: Fix test failure.
From: Alex Vong <[email-masked]>
To: [email-masked]
Date: Sun, 16 Jul 2017 00:59:01 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Tags: fixed-upstream
Forwarded: https://github.com/golang/go/issues/20007

Hello,

This patch fixes the test failure in core-updates. I've tried to
cherry-pick upstream's commit, but it doesn't work. So I fall back to
fix it directly instead. The bug has already been fixed upstream, and
the fix will be in the next release (1.9). See [0] for details.

From 023f866f8838df457639a38af9c2c733e445435d Mon Sep 17 00:00:00 2001
From: Alex Vong <[email-masked]>
Date: Sun, 16 Jul 2017 00:41:17 +0800
Subject: [PATCH] gnu: [email-masked]: Fix test failure.

* gnu/packages/golang.scm (go-1.8)[arguments]: Escape braces in test data in
'prebuild' phase.
---
 gnu/packages/golang.scm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 70cae6d87..884a49689 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2016, 2017 Petter <[email-masked]>
 ;;; Copyright © 2016, 2017 Leo Famulari <[email-masked]>
 ;;; Copyright © 2017 Sergei Trofimovich <[email-masked]>
+;;; Copyright © 2017 Alex Vong <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -296,6 +297,12 @@ sequential processes (CSP) concurrent programming features added.")
                  (substitute* "../misc/cgo/testcarchive/carchive_test.go"
                    (("#!/usr/bin/env") (string-append "#!" (which "env"))))
 
+                 ;; escape braces in test data to workaround test failure, see:
+                 ;; https://github.com/golang/go/issues/20007
+                 ;; FIXME: remove this once we upgrade to 1.9
+                 (substitute* "cmd/vet/testdata/copylock_func.go"
+                   (("struct\\{lock sync.Mutex\\}") "struct\\{lock sync.Mutex\\}"))
+
                  (substitute* "net/lookup_unix.go"
                    (("/etc/protocols") (string-append net-base "/etc/protocols")))
                  (substitute* "net/port_unix.go"
-- 
2.13.3

Cheers,
Alex

[0]: https://github.com/golang/go/issues/20007