Skip to content

Commit d76c5ec

Browse files
committed
Add patches for TestLoadFixed issue for 1.4-1.7
See: golang/go#17276 Granted, gvm doesn't normally run the tests, but I like to run them to ensure a build is healthy: $ gvm install <some-version> $ gvm use <some-version> $ go tool dist test -no-rebuild (Hey, maybe this test step could become a future `gvm install` option?) Also per golang/go#18163, test fixes may eventually be permitted for security point releases, at which point patches like these can possibly go away (since the fix would then be to use a later point release on affected platforms).
1 parent bc973db commit d76c5ec

File tree

4 files changed

+103
-1
lines changed

4 files changed

+103
-1
lines changed

patches/go1.4/TestLoadFixed-fix.patch

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
See: https://github.com/golang/go/issues/17276
2+
3+
commit c5434f2973a87acff76bac359236e690d632ce95
4+
Author: Alberto Donizetti <[email protected]>
5+
Date: Thu Sep 29 13:59:10 2016 +0200
6+
7+
time: update test for tzdata-2016g
8+
9+
Fixes #17276
10+
11+
Change-Id: I0188cf9bc5fdb48c71ad929cc54206d03e0b96e4
12+
Reviewed-on: https://go-review.googlesource.com/29995
13+
Reviewed-by: Brad Fitzpatrick <[email protected]>
14+
Run-TryBot: Brad Fitzpatrick <[email protected]>
15+
TryBot-Result: Gobot Gobot <[email protected]>
16+
17+
diff --git a/src/time/time_test.go b/src/time/time_test.go
18+
index 68236fd64d..2e47d0819d 100644
19+
--- a/src/time/time_test.go
20+
+++ b/src/time/time_test.go
21+
@@ -925,8 +925,11 @@ func TestLoadFixed(t *testing.T) {
22+
// but Go and most other systems use "east is positive".
23+
// So GMT+1 corresponds to -3600 in the Go zone, not +3600.
24+
name, offset := Now().In(loc).Zone()
25+
- if name != "GMT+1" || offset != -1*60*60 {
26+
- t.Errorf("Now().In(loc).Zone() = %q, %d, want %q, %d", name, offset, "GMT+1", -1*60*60)
27+
+ // The zone abbreviation is "-01" since tzdata-2016g, and "GMT+1"
28+
+ // on earlier versions; we accept both. (Issue #17276).
29+
+ if !(name == "GMT+1" || name == "-01") || offset != -1*60*60 {
30+
+ t.Errorf("Now().In(loc).Zone() = %q, %d, want %q or %q, %d",
31+
+ name, offset, "GMT+1", "-01", -1*60*60)
32+
}
33+
}
34+

patches/go1.5/TestLoadFixed-fix.patch

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
See: https://github.com/golang/go/issues/17276
2+
3+
commit c5434f2973a87acff76bac359236e690d632ce95
4+
Author: Alberto Donizetti <[email protected]>
5+
Date: Thu Sep 29 13:59:10 2016 +0200
6+
7+
time: update test for tzdata-2016g
8+
9+
Fixes #17276
10+
11+
Change-Id: I0188cf9bc5fdb48c71ad929cc54206d03e0b96e4
12+
Reviewed-on: https://go-review.googlesource.com/29995
13+
Reviewed-by: Brad Fitzpatrick <[email protected]>
14+
Run-TryBot: Brad Fitzpatrick <[email protected]>
15+
TryBot-Result: Gobot Gobot <[email protected]>
16+
17+
diff --git a/src/time/time_test.go b/src/time/time_test.go
18+
index 68236fd64d..2e47d0819d 100644
19+
--- a/src/time/time_test.go
20+
+++ b/src/time/time_test.go
21+
@@ -939,8 +939,11 @@ func TestLoadFixed(t *testing.T) {
22+
// but Go and most other systems use "east is positive".
23+
// So GMT+1 corresponds to -3600 in the Go zone, not +3600.
24+
name, offset := Now().In(loc).Zone()
25+
- if name != "GMT+1" || offset != -1*60*60 {
26+
- t.Errorf("Now().In(loc).Zone() = %q, %d, want %q, %d", name, offset, "GMT+1", -1*60*60)
27+
+ // The zone abbreviation is "-01" since tzdata-2016g, and "GMT+1"
28+
+ // on earlier versions; we accept both. (Issue #17276).
29+
+ if !(name == "GMT+1" || name == "-01") || offset != -1*60*60 {
30+
+ t.Errorf("Now().In(loc).Zone() = %q, %d, want %q or %q, %d",
31+
+ name, offset, "GMT+1", "-01", -1*60*60)
32+
}
33+
}
34+

patches/go1.6/TestLoadFixed-fix.patch

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
See: https://github.com/golang/go/issues/17276
2+
3+
commit c5434f2973a87acff76bac359236e690d632ce95
4+
Author: Alberto Donizetti <[email protected]>
5+
Date: Thu Sep 29 13:59:10 2016 +0200
6+
7+
time: update test for tzdata-2016g
8+
9+
Fixes #17276
10+
11+
Change-Id: I0188cf9bc5fdb48c71ad929cc54206d03e0b96e4
12+
Reviewed-on: https://go-review.googlesource.com/29995
13+
Reviewed-by: Brad Fitzpatrick <[email protected]>
14+
Run-TryBot: Brad Fitzpatrick <[email protected]>
15+
TryBot-Result: Gobot Gobot <[email protected]>
16+
17+
diff --git a/src/time/time_test.go b/src/time/time_test.go
18+
index 68236fd64d..2e47d0819d 100644
19+
--- a/src/time/time_test.go
20+
+++ b/src/time/time_test.go
21+
@@ -939,8 +939,11 @@ func TestLoadFixed(t *testing.T) {
22+
// but Go and most other systems use "east is positive".
23+
// So GMT+1 corresponds to -3600 in the Go zone, not +3600.
24+
name, offset := Now().In(loc).Zone()
25+
- if name != "GMT+1" || offset != -1*60*60 {
26+
- t.Errorf("Now().In(loc).Zone() = %q, %d, want %q, %d", name, offset, "GMT+1", -1*60*60)
27+
+ // The zone abbreviation is "-01" since tzdata-2016g, and "GMT+1"
28+
+ // on earlier versions; we accept both. (Issue #17276).
29+
+ if !(name == "GMT+1" || name == "-01") || offset != -1*60*60 {
30+
+ t.Errorf("Now().In(loc).Zone() = %q, %d, want %q or %q, %d",
31+
+ name, offset, "GMT+1", "-01", -1*60*60)
32+
}
33+
}
34+

patches/go1.7/TestLoadFixed-fix.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ diff --git a/src/time/time_test.go b/src/time/time_test.go
1818
index 68236fd64d..2e47d0819d 100644
1919
--- a/src/time/time_test.go
2020
+++ b/src/time/time_test.go
21-
@@ -943,8 +943,11 @@ func TestLoadFixed(t *testing.T) {
21+
@@ -939,8 +939,11 @@ func TestLoadFixed(t *testing.T) {
2222
// but Go and most other systems use "east is positive".
2323
// So GMT+1 corresponds to -3600 in the Go zone, not +3600.
2424
name, offset := Now().In(loc).Zone()

0 commit comments

Comments
 (0)