[Pkg-gnutls-commits] r1732 - in /packages/p11-kit/branches/experimental/debian: changelog patches/murmurtest_bigendian.diff patches/series
ametzler at users.alioth.debian.org
ametzler at users.alioth.debian.org
Tue Mar 26 18:37:40 UTC 2013
Author: ametzler
Date: Tue Mar 26 18:37:39 2013
New Revision: 1732
URL: http://svn.debian.org/wsvn/pkg-gnutls/?sc=1&rev=1732
Log:
p11-kit (0.17.4-2) experimental
murmurtest_bigendian.diff: Fix testsuite error on bigendian systems
Added:
packages/p11-kit/branches/experimental/debian/patches/murmurtest_bigendian.diff
Modified:
packages/p11-kit/branches/experimental/debian/changelog
packages/p11-kit/branches/experimental/debian/patches/series
Modified: packages/p11-kit/branches/experimental/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnutls/packages/p11-kit/branches/experimental/debian/changelog?rev=1732&op=diff
==============================================================================
--- packages/p11-kit/branches/experimental/debian/changelog (original)
+++ packages/p11-kit/branches/experimental/debian/changelog Tue Mar 26 18:37:39 2013
@@ -1,8 +1,8 @@
-p11-kit (0.17.4-2) UNRELEASED; urgency=low
-
- * NOT RELEASED YET
-
- -- Andreas Metzler <ametzler at debian.org> Sun, 24 Mar 2013 16:11:25 +0100
+p11-kit (0.17.4-2) experimental; urgency=low
+
+ * murmurtest_bigendian.diff: Fix testsuite error on bigendian systems.
+
+ -- Andreas Metzler <ametzler at debian.org> Tue, 26 Mar 2013 19:32:44 +0100
p11-kit (0.17.4-1) experimental; urgency=low
Added: packages/p11-kit/branches/experimental/debian/patches/murmurtest_bigendian.diff
URL: http://svn.debian.org/wsvn/pkg-gnutls/packages/p11-kit/branches/experimental/debian/patches/murmurtest_bigendian.diff?rev=1732&op=file
==============================================================================
--- packages/p11-kit/branches/experimental/debian/patches/murmurtest_bigendian.diff (added)
+++ packages/p11-kit/branches/experimental/debian/patches/murmurtest_bigendian.diff Tue Mar 26 18:37:39 2013
@@ -1,0 +1,87 @@
+From b0e44f8e1e589726c95506da5121e95a54269fd7 Mon Sep 17 00:00:00 2001
+From: Stef Walter <stefw at gnome.org>
+Date: Mon, 25 Mar 2013 21:16:28 +0100
+Subject: [PATCH] Fix testing of murmur hash on bigendian systems
+
+The murmur hash produces different output depending on the architecture
+
+https://bugzilla.redhat.com/show_bug.cgi?id=927394
+---
+ common/tests/test-hash.c | 60 ++++++++++++++++++----------------------------
+ 1 file changed, 23 insertions(+), 37 deletions(-)
+
+diff --git a/common/tests/test-hash.c b/common/tests/test-hash.c
+index c8694e1..a1cb917 100644
+--- a/common/tests/test-hash.c
++++ b/common/tests/test-hash.c
+@@ -135,44 +135,30 @@ test_md5 (CuTest *cu)
+ static void
+ test_murmur2 (CuTest *cu)
+ {
+- struct {
+- const char *input;
+- const char *input2;
+- int hash;
+- } fixtures[] = {
+- { "one", NULL, 1910179066 },
+- { "two", NULL, 396151652 },
+- { "four", NULL, -2034170174 },
+- { "seven", NULL, -588341181 },
+- /* Note that these are identical output */
+- { "eleven", NULL, -37856894 },
+- { "ele", "ven", -37856894 },
+- { NULL },
+- };
+-
+- uint32_t first;
+- uint32_t second;
+- int i;
++ uint32_t one, two, four, seven, eleven, split;
+
+- assert (sizeof (first) == P11_HASH_MURMUR2_LEN);
+- for (i = 0; fixtures[i].input != NULL; i++) {
+- p11_hash_murmur2 ((unsigned char *)&first,
+- fixtures[i].input,
+- strlen (fixtures[i].input),
+- fixtures[i].input2,
+- fixtures[i].input2 ? strlen (fixtures[i].input2) : 0,
+- NULL);
+-
+- p11_hash_murmur2 ((unsigned char *)&second,
+- fixtures[i].input,
+- strlen (fixtures[i].input),
+- fixtures[i].input2,
+- fixtures[i].input2 ? strlen (fixtures[i].input2) : 0,
+- NULL);
+-
+- CuAssertIntEquals (cu, fixtures[i].hash, first);
+- CuAssertIntEquals (cu, fixtures[i].hash, second);
+- }
++ assert (sizeof (one) == P11_HASH_MURMUR2_LEN);
++
++ p11_hash_murmur2 ((unsigned char *)&one, "one", 3, NULL);
++ p11_hash_murmur2 ((unsigned char *)&two, "two", 3, NULL);
++ p11_hash_murmur2 ((unsigned char *)&four, "four", 4, NULL);
++ p11_hash_murmur2 ((unsigned char *)&seven, "seven", 5, NULL);
++ p11_hash_murmur2 ((unsigned char *)&eleven, "eleven", 6, NULL);
++ p11_hash_murmur2 ((unsigned char *)&split, "ele", 3, "ven", 3, NULL);
++
++ CuAssertTrue (cu, one != two);
++ CuAssertTrue (cu, one != four);
++ CuAssertTrue (cu, one != seven);
++ CuAssertTrue (cu, one != eleven);
++
++ CuAssertTrue (cu, two != four);
++ CuAssertTrue (cu, two != seven);
++ CuAssertTrue (cu, two != eleven);
++
++ CuAssertTrue (cu, four != seven);
++ CuAssertTrue (cu, four != eleven);
++
++ CuAssertTrue (cu, split == eleven);
+ }
+
+ static void
+--
+1.7.10.4
+
Modified: packages/p11-kit/branches/experimental/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnutls/packages/p11-kit/branches/experimental/debian/patches/series?rev=1732&op=diff
==============================================================================
--- packages/p11-kit/branches/experimental/debian/patches/series (original)
+++ packages/p11-kit/branches/experimental/debian/patches/series Tue Mar 26 18:37:39 2013
@@ -1,1 +1,2 @@
enable_locale.diff
+murmurtest_bigendian.diff
More information about the Pkg-gnutls-commits
mailing list