r30883 - in /desktop/experimental/gobject-introspection/debian: changelog patches/ patches/00git-account_for_padding_in_struct_size_check.patch patches/series

mpitt at users.alioth.debian.org mpitt at users.alioth.debian.org
Fri Oct 21 07:08:10 UTC 2011


Author: mpitt
Date: Fri Oct 21 07:08:09 2011
New Revision: 30883

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=30883
Log:
Add 00git-account_for_padding_in_struct_size_check.patch: Fix test suite
failure on armel, powerpc, and potentially other architectures. Taken from
upstream git head.

Added:
    desktop/experimental/gobject-introspection/debian/patches/
    desktop/experimental/gobject-introspection/debian/patches/00git-account_for_padding_in_struct_size_check.patch
    desktop/experimental/gobject-introspection/debian/patches/series
Modified:
    desktop/experimental/gobject-introspection/debian/changelog

Modified: desktop/experimental/gobject-introspection/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gobject-introspection/debian/changelog?rev=30883&op=diff
==============================================================================
--- desktop/experimental/gobject-introspection/debian/changelog [utf-8] (original)
+++ desktop/experimental/gobject-introspection/debian/changelog [utf-8] Fri Oct 21 07:08:09 2011
@@ -10,6 +10,9 @@
   * debian//libgirepository-1.0-1.symbols: Update for new version.
   * debian/control.in: Fix Vcs-* URL.
   * debian/control.in: Update Vcs-* for experimental branch.
+  * Add 00git-account_for_padding_in_struct_size_check.patch: Fix test suite
+    failure on armel, powerpc, and potentially other architectures. Taken from
+    upstream git head.
 
   [ Josselin Mouette ]
   * Small policy clarification.

Added: desktop/experimental/gobject-introspection/debian/patches/00git-account_for_padding_in_struct_size_check.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gobject-introspection/debian/patches/00git-account_for_padding_in_struct_size_check.patch?rev=30883&op=file
==============================================================================
--- desktop/experimental/gobject-introspection/debian/patches/00git-account_for_padding_in_struct_size_check.patch (added)
+++ desktop/experimental/gobject-introspection/debian/patches/00git-account_for_padding_in_struct_size_check.patch [utf-8] Fri Oct 21 07:08:09 2011
@@ -1,0 +1,39 @@
+From 768664ea995a133a43e8a82cd6c925da3ddfe55b Mon Sep 17 00:00:00 2001
+From: Martin Pitt <martin.pitt at ubuntu.com>
+Date: Wed, 28 Sep 2011 08:25:26 +0000
+Subject: [PATCH] Bug 660338: Account for padding in struct size check
+
+On some platform like armel or powerpc the compiler adds extra padding to
+structs. Make the test_size_of_struct_with_array_of_anon_unions() check more
+liberal by only requiring that the size of the struct is at least as big as
+expected. Also use g_assert_cmpuint() to make it easier to see the actual diff.
+---
+ tests/repository/gitypelibtest.c |    7 ++++---
+ 1 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/tests/repository/gitypelibtest.c b/tests/repository/gitypelibtest.c
+index de821e0..8356d93 100644
+--- a/tests/repository/gitypelibtest.c
++++ b/tests/repository/gitypelibtest.c
+@@ -120,14 +120,15 @@ test_size_of_struct_with_array_of_anon_unions(GIRepository *repo)
+     struct_info = g_irepository_find_by_name (repo, "Regress", "TestStructE");
+     if (!struct_info)
+         g_error ("Could not find Regress.TestStructE");
+-    g_assert (g_struct_info_get_size (struct_info)
+-                == sizeof (GType) + 2*sizeof (gint64));
++    /* need to use >=, there might be padding */
++    g_assert_cmpuint (g_struct_info_get_size (struct_info),
++                >=, sizeof (GType) + 2*sizeof (gint64));
+     g_base_info_unref (struct_info);
+ 
+     struct_info = g_irepository_find_by_name (repo, "GObject", "Value");
+     if (!struct_info)
+         g_error ("Could not find GObject.Value");
+-    g_assert (g_struct_info_get_size (struct_info) == sizeof (GValue));
++    g_assert_cmpuint (g_struct_info_get_size (struct_info), ==, sizeof (GValue));
+     g_base_info_unref (struct_info);
+ }
+ 
+-- 
+1.7.5.4
+

Added: desktop/experimental/gobject-introspection/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gobject-introspection/debian/patches/series?rev=30883&op=file
==============================================================================
--- desktop/experimental/gobject-introspection/debian/patches/series (added)
+++ desktop/experimental/gobject-introspection/debian/patches/series [utf-8] Fri Oct 21 07:08:09 2011
@@ -1,0 +1,1 @@
+00git-account_for_padding_in_struct_size_check.patch




More information about the pkg-gnome-commits mailing list