Merge lp:~pedronis/ubuntu-push/murmur3-official-seed into lp:ubuntu-push/automatic

Proposed by Samuele Pedroni
Status: Merged
Approved by: Samuele Pedroni
Approved revision: 193
Merged at revision: 191
Proposed branch: lp:~pedronis/ubuntu-push/murmur3-official-seed
Merge into: lp:ubuntu-push/automatic
Diff against target: 123 lines (+18/-12)
7 files modified
client/gethosts/gethost_test.go (+1/-1)
debian/changelog (+1/-0)
external/README (+2/-1)
external/murmur3/murmur128.go (+2/-2)
external/murmur3/murmur32.go (+2/-2)
external/murmur3/murmur64.go (+1/-1)
external/murmur3/murmur_test.go (+9/-5)
To merge this branch: bzr merge lp:~pedronis/ubuntu-push/murmur3-official-seed
Reviewer Review Type Date Requested Status
John Lenton (community) Approve
Review via email: mp+223958@code.launchpad.net

Commit message

merge upstream switching of murmur3 to use 0 as seed as done by other impls

Description of the change

merge upstream switching of murmur3 to use 0 as seed as done by other impls, at least that was the intention upstream, needed extra fix

To post a comment you must log in.
Revision history for this message
John Lenton (chipaca) wrote :

Ma la volpe, col suo balzo, ha raggiunto il quieto Fido.

review: Approve
193. By Samuele Pedroni

fix & changelog

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'client/gethosts/gethost_test.go'
2--- client/gethosts/gethost_test.go 2014-05-02 10:42:16 +0000
3+++ client/gethosts/gethost_test.go 2014-06-20 16:31:48 +0000
4@@ -59,7 +59,7 @@
5 res, err := gh.Get()
6 c.Assert(err, IsNil)
7 c.Check(*res, DeepEquals,
8- Host{Domain: "example.com", Hosts: []string{"http://c1130408a700afe0"}})
9+ Host{Domain: "example.com", Hosts: []string{"http://bdd2ae7116c85a45"}})
10 }
11
12 func (s *getHostsSuite) TestGetTimeout(c *C) {
13
14=== modified file 'debian/changelog'
15--- debian/changelog 2014-06-20 15:01:11 +0000
16+++ debian/changelog 2014-06-20 16:31:48 +0000
17@@ -5,6 +5,7 @@
18 * Register script and scripts unicast support
19 * Update http13client from the actual go1.3 release
20 * Avoid late pings in the face of nop exchanges
21+ * murmur3 upstream change of seed to 0
22
23 [ Roberto Alsina ]
24 * Make signing-helper generate a HTTP header instead of a querystring,
25
26=== modified file 'external/README'
27--- external/README 2014-03-24 15:37:36 +0000
28+++ external/README 2014-06-20 16:31:48 +0000
29@@ -1,3 +1,4 @@
30 Directly included vendorized small packages.
31
32-* murmor3 comes from import at lp:~ubuntu-push-hackers/ubuntu-push/murmur at revno 10
33+* murmur3 comes from import at lp:~ubuntu-push-hackers/ubuntu-push/murmur at revno 11
34+* with https://github.com/pedronis/murmur3/commit/7f4e0cfce80cd853301f3ccf799699a1891b583
35
36=== modified file 'external/murmur3/murmur128.go'
37--- external/murmur3/murmur128.go 2014-03-24 15:31:42 +0000
38+++ external/murmur3/murmur128.go 2014-06-20 16:31:48 +0000
39@@ -40,7 +40,7 @@
40
41 func (d *digest128) Size() int { return 16 }
42
43-func (d *digest128) reset() { d.h1, d.h2 = 1, 1 }
44+func (d *digest128) reset() { d.h1, d.h2 = 0, 0 }
45
46 func (d *digest128) Sum(b []byte) []byte {
47 h1, h2 := d.h1, d.h2
48@@ -182,7 +182,7 @@
49 // hasher.Write(data)
50 // return hasher.Sum128()
51 func Sum128(data []byte) (h1 uint64, h2 uint64) {
52- d := &digest128{h1: 1, h2: 1}
53+ d := &digest128{h1: 0, h2: 0}
54 d.tail = d.bmix(data)
55 d.clen = len(data)
56 return d.Sum128()
57
58=== modified file 'external/murmur3/murmur32.go'
59--- external/murmur3/murmur32.go 2014-03-24 15:31:42 +0000
60+++ external/murmur3/murmur32.go 2014-06-20 16:31:48 +0000
61@@ -33,7 +33,7 @@
62
63 func (d *digest32) Size() int { return 4 }
64
65-func (d *digest32) reset() { d.h1 = 1 }
66+func (d *digest32) reset() { d.h1 = 0 }
67
68 func (d *digest32) Sum(b []byte) []byte {
69 h := d.h1
70@@ -104,7 +104,7 @@
71 // return hasher.Sum32()
72 func Sum32(data []byte) uint32 {
73
74- var h1 uint32 = 1
75+ var h1 uint32 = 0
76
77 nblocks := len(data) / 4
78 var p uintptr
79
80=== modified file 'external/murmur3/murmur64.go'
81--- external/murmur3/murmur64.go 2014-03-24 15:31:42 +0000
82+++ external/murmur3/murmur64.go 2014-06-20 16:31:48 +0000
83@@ -37,7 +37,7 @@
84 // hasher.Write(data)
85 // return hasher.Sum64()
86 func Sum64(data []byte) uint64 {
87- d := &digest128{h1: 1, h2: 1}
88+ d := &digest128{h1: 0, h2: 0}
89 d.tail = d.bmix(data)
90 d.clen = len(data)
91 h1, _ := d.Sum128()
92
93=== modified file 'external/murmur3/murmur_test.go'
94--- external/murmur3/murmur_test.go 2014-03-24 15:31:42 +0000
95+++ external/murmur3/murmur_test.go 2014-06-20 16:31:48 +0000
96@@ -11,11 +11,11 @@
97 h64_2 uint64
98 s string
99 }{
100- {0x514e28b7, 0x4610abe56eff5cb5, 0x51622daa78f83583, ""},
101- {0xbb4abcad, 0xa78ddff5adae8d10, 0x128900ef20900135, "hello"},
102- {0x6f5cb2e9, 0x8b95f808840725c6, 0x1597ed5422bd493b, "hello, world"},
103- {0xf50e1f30, 0x2a929de9c8f97b2f, 0x56a41d99af43a2db, "19 Jan 2038 at 3:14:07 AM"},
104- {0x846f6a36, 0xfb3325171f9744da, 0xaaf8b92a5f722952, "The quick brown fox jumps over the lazy dog."},
105+ {0x00000000, 0x0000000000000000, 0x0000000000000000, ""},
106+ {0x248bfa47, 0xcbd8a7b341bd9b02, 0x5b1e906a48ae1d19, "hello"},
107+ {0x149bbb7f, 0x342fac623a5ebc8e, 0x4cdcbc079642414d, "hello, world"},
108+ {0xe31e8a70, 0xb89e5988b737affc, 0x664fc2950231b2cb, "19 Jan 2038 at 3:14:07 AM"},
109+ {0xd5c48bfc, 0xcd99481f9ee902c9, 0x695da1a38987b6e7, "The quick brown fox jumps over the lazy dog."},
110 }
111
112 func TestRef(t *testing.T) {
113@@ -37,6 +37,10 @@
114 t.Errorf("'%s': 0x%x (want 0x%x)", elem.s, v, elem.h64_1)
115 }
116
117+ if v := Sum64([]byte(elem.s)); v != elem.h64_1 {
118+ t.Errorf("'%s': 0x%x (want 0x%x)", elem.s, v, elem.h64_1)
119+ }
120+
121 var h128 Hash128 = New128()
122 h128.Write([]byte(elem.s))
123 if v1, v2 := h128.Sum128(); v1 != elem.h64_1 || v2 != elem.h64_2 {

Subscribers

People subscribed via source and target branches