r46024 - in /desktop/unstable/gdk-pixbuf/debian: changelog control patches/0001-Skip-tests-when-we-can-t-run-them-due-to-lack-of-mem.patch patches/series patches/skip-large-file-tests-instead-of-ooming
laney at users.alioth.debian.org
laney at users.alioth.debian.org
Tue Sep 22 15:13:53 UTC 2015
Author: laney
Date: Tue Sep 22 15:13:53 2015
New Revision: 46024
URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=46024
Log:
* New upstream release 2.32.0
* debian/patches/0001-Skip-tests-when-we-can-t-run-them-due-to-lack-of-mem.patch:
Cherry-pick patch from upstream. If we can't run some of the new large
tests due to a lack of memory then skip them. (Closes: #799239)
* debian/patches/skip-large-file-tests-instead-of-ooming: Drop - this was a
previous version of the above patch, which has now been sent upstream.
Added:
desktop/unstable/gdk-pixbuf/debian/patches/0001-Skip-tests-when-we-can-t-run-them-due-to-lack-of-mem.patch
Removed:
desktop/unstable/gdk-pixbuf/debian/patches/skip-large-file-tests-instead-of-ooming
Modified:
desktop/unstable/gdk-pixbuf/debian/changelog
desktop/unstable/gdk-pixbuf/debian/control
desktop/unstable/gdk-pixbuf/debian/patches/series
Modified: desktop/unstable/gdk-pixbuf/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gdk-pixbuf/debian/changelog?rev=46024&op=diff
==============================================================================
--- desktop/unstable/gdk-pixbuf/debian/changelog [utf-8] (original)
+++ desktop/unstable/gdk-pixbuf/debian/changelog [utf-8] Tue Sep 22 15:13:53 2015
@@ -1,3 +1,14 @@
+gdk-pixbuf (2.32.0-1) UNRELEASED; urgency=medium
+
+ * New upstream release 2.32.0
+ * debian/patches/0001-Skip-tests-when-we-can-t-run-them-due-to-lack-of-mem.patch:
+ Cherry-pick patch from upstream. If we can't run some of the new large
+ tests due to a lack of memory then skip them. (Closes: #799239)
+ * debian/patches/skip-large-file-tests-instead-of-ooming: Drop - this was a
+ previous version of the above patch, which has now been sent upstream.
+
+ -- Iain Lane <laney at debian.org> Tue, 22 Sep 2015 14:55:52 +0100
+
gdk-pixbuf (2.31.7-3) experimental; urgency=medium
* debian/patches/skip-large-file-tests-instead-of-ooming: This didn't catch
Modified: desktop/unstable/gdk-pixbuf/debian/control
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gdk-pixbuf/debian/control?rev=46024&op=diff
==============================================================================
--- desktop/unstable/gdk-pixbuf/debian/control [utf-8] (original)
+++ desktop/unstable/gdk-pixbuf/debian/control [utf-8] Tue Sep 22 15:13:53 2015
@@ -6,7 +6,7 @@
Section: libs
Priority: optional
Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers at lists.alioth.debian.org>
-Uploaders: Iain Lane <laney at debian.org>, Laurent Bigonville <bigon at debian.org>, Michael Biebl <biebl at debian.org>
+Uploaders: Iain Lane <laney at debian.org>, Michael Biebl <biebl at debian.org>
Build-Depends: cdbs (>= 0.4.93),
debhelper (>= 9),
dh-autoreconf,
Added: desktop/unstable/gdk-pixbuf/debian/patches/0001-Skip-tests-when-we-can-t-run-them-due-to-lack-of-mem.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gdk-pixbuf/debian/patches/0001-Skip-tests-when-we-can-t-run-them-due-to-lack-of-mem.patch?rev=46024&op=file
==============================================================================
--- desktop/unstable/gdk-pixbuf/debian/patches/0001-Skip-tests-when-we-can-t-run-them-due-to-lack-of-mem.patch (added)
+++ desktop/unstable/gdk-pixbuf/debian/patches/0001-Skip-tests-when-we-can-t-run-them-due-to-lack-of-mem.patch [utf-8] Tue Sep 22 15:13:53 2015
@@ -0,0 +1,148 @@
+From e7f940102d40997f2e23a0589247cfb189dfaa98 Mon Sep 17 00:00:00 2001
+From: Iain Lane <iain at orangesquash.org.uk>
+Date: Sun, 20 Sep 2015 13:24:21 +0100
+Subject: [PATCH] Skip tests when we can't run them due to lack of memory
+
+Check if we have failed due to insufficient memory and skip if
+so.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=754387
+---
+ tests/Makefile.am | 2 ++
+ tests/cve-2015-4491.c | 4 ++++
+ tests/pixbuf-scale.c | 25 ++++++++++++++++++++++---
+ tests/test-common.c | 14 ++++++++++++++
+ tests/test-common.h | 1 +
+ 5 files changed, 43 insertions(+), 3 deletions(-)
+
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index d5dca44..1f09711 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -65,6 +65,8 @@ dist_installed_test_data = \
+
+ cve_2015_4491_SOURCES = \
+ cve-2015-4491.c \
++ test-common.c \
++ test-common.h \
+ resources.h \
+ resources.c \
+ $(NULL)
+diff --git a/tests/cve-2015-4491.c b/tests/cve-2015-4491.c
+index 34ba94f..988cb49 100644
+--- a/tests/cve-2015-4491.c
++++ b/tests/cve-2015-4491.c
+@@ -20,6 +20,8 @@
+
+ #include <gdk-pixbuf.h>
+
++#include "test-common.h"
++
+ static void
+ test_original (void)
+ {
+@@ -28,6 +30,8 @@ test_original (void)
+ GError* err = NULL;
+
+ buf = gdk_pixbuf_new_from_resource_at_scale ("/test/resource/cve-2015-4491.bmp", size, size, FALSE, &err);
++ if (skip_if_insufficient_memory (&err))
++ return;
+
+ g_assert_no_error (err);
+
+diff --git a/tests/pixbuf-scale.c b/tests/pixbuf-scale.c
+index e2be5f5..60d0a20 100644
+--- a/tests/pixbuf-scale.c
++++ b/tests/pixbuf-scale.c
+@@ -83,6 +83,9 @@ test_scale_down (gconstpointer data)
+
+ path = g_test_get_filename (G_TEST_DIST, filename, NULL);
+ ref = gdk_pixbuf_new_from_file (path, &error);
++
++ if (skip_if_insufficient_memory (&error))
++ return;
+ g_assert_no_error (error);
+
+ width = gdk_pixbuf_get_width (ref);
+@@ -111,10 +114,20 @@ test_add_alpha (gconstpointer data)
+
+ path = g_test_get_filename (G_TEST_DIST, filename, NULL);
+ ref = gdk_pixbuf_new_from_file (path, &error);
++
++ if (skip_if_insufficient_memory (&error))
++ return;
+ g_assert_no_error (error);
+
+ pixbuf = gdk_pixbuf_add_alpha (ref, FALSE, 0, 0, 0);
+- g_assert (pixbuf != NULL);
++
++ if (pixbuf == NULL)
++ {
++ g_test_skip ("Couldn't add alpha to the image - your system probably lacks sufficient memory.");
++ g_object_unref (ref);
++ return;
++ }
++
+ g_object_unref (pixbuf);
+
+ pixbuf = gdk_pixbuf_add_alpha (ref, TRUE, 0, 0, 255);
+@@ -141,11 +154,17 @@ test_rotate (gconstpointer data)
+
+ path = g_test_get_filename (G_TEST_DIST, filename, NULL);
+ ref = gdk_pixbuf_new_from_file (path, &error);
++
++ if (skip_if_insufficient_memory (&error))
++ return;
+ g_assert_no_error (error);
+
+ pixbuf = gdk_pixbuf_rotate_simple (ref, GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE);
+- g_assert (pixbuf != NULL);
+- g_object_unref (pixbuf);
++
++ if (pixbuf == NULL)
++ g_test_skip ("Couldn't rotate the image - your system probably lacks sufficient memory.");
++ else
++ g_object_unref (pixbuf);
+
+ g_object_unref (ref);
+ }
+diff --git a/tests/test-common.c b/tests/test-common.c
+index 7071d4c..0f70a8b 100644
+--- a/tests/test-common.c
++++ b/tests/test-common.c
+@@ -65,6 +65,20 @@ format_supported (const gchar *filename)
+ }
+
+ gboolean
++skip_if_insufficient_memory (GError **err)
++{
++ if (*err && g_error_matches (*err, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY))
++ {
++ g_test_skip ((*err)->message);
++ g_error_free (*err);
++ *err = NULL;
++ return TRUE;
++ }
++
++ return FALSE;
++}
++
++gboolean
+ pixdata_equal (GdkPixbuf *p1, GdkPixbuf *p2, GError **error)
+ {
+ if (gdk_pixbuf_get_colorspace (p1) != gdk_pixbuf_get_colorspace (p2)) {
+diff --git a/tests/test-common.h b/tests/test-common.h
+index 56e4418..0514cd7 100644
+--- a/tests/test-common.h
++++ b/tests/test-common.h
+@@ -28,6 +28,7 @@
+ G_BEGIN_DECLS
+
+ gboolean format_supported (const gchar *filename);
++gboolean skip_if_insufficient_memory (GError **err);
+ gboolean pixdata_equal (GdkPixbuf *p1, GdkPixbuf *p2, GError **error);
+
+ G_END_DECLS
+--
+2.5.0
+
Modified: desktop/unstable/gdk-pixbuf/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gdk-pixbuf/debian/patches/series?rev=46024&op=diff
==============================================================================
--- desktop/unstable/gdk-pixbuf/debian/patches/series [utf-8] (original)
+++ desktop/unstable/gdk-pixbuf/debian/patches/series [utf-8] Tue Sep 22 15:13:53 2015
@@ -1 +1 @@
-skip-large-file-tests-instead-of-ooming
+0001-Skip-tests-when-we-can-t-run-them-due-to-lack-of-mem.patch
More information about the pkg-gnome-commits
mailing list