r45978 - in /desktop/experimental/gdk-pixbuf/debian: changelog control patches/skip-large-file-tests-instead-of-ooming
laney at users.alioth.debian.org
laney at users.alioth.debian.org
Fri Sep 18 21:08:26 UTC 2015
Author: laney
Date: Fri Sep 18 21:08:26 2015
New Revision: 45978
URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=45978
Log:
debian/patches/skip-large-file-tests-instead-of-ooming: This didn't catch
all cases. Run some tests in a subprocess so that we can skip them if they
abort due to malloc failing.
Modified:
desktop/experimental/gdk-pixbuf/debian/changelog
desktop/experimental/gdk-pixbuf/debian/control
desktop/experimental/gdk-pixbuf/debian/patches/skip-large-file-tests-instead-of-ooming
Modified: desktop/experimental/gdk-pixbuf/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gdk-pixbuf/debian/changelog?rev=45978&op=diff
==============================================================================
--- desktop/experimental/gdk-pixbuf/debian/changelog [utf-8] (original)
+++ desktop/experimental/gdk-pixbuf/debian/changelog [utf-8] Fri Sep 18 21:08:26 2015
@@ -1,3 +1,11 @@
+gdk-pixbuf (2.31.7-3) UNRELEASED; urgency=medium
+
+ * debian/patches/skip-large-file-tests-instead-of-ooming: This didn't catch
+ all cases. Run some tests in a subprocess so that we can skip them if they
+ abort due to malloc failing.
+
+ -- Iain Lane <laney at debian.org> Fri, 18 Sep 2015 20:55:23 +0100
+
gdk-pixbuf (2.31.7-2) experimental; urgency=medium
* Run the tests with VERBOSE=1
Modified: desktop/experimental/gdk-pixbuf/debian/control
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gdk-pixbuf/debian/control?rev=45978&op=diff
==============================================================================
--- desktop/experimental/gdk-pixbuf/debian/control [utf-8] (original)
+++ desktop/experimental/gdk-pixbuf/debian/control [utf-8] Fri Sep 18 21:08:26 2015
@@ -6,7 +6,7 @@
Section: libs
Priority: optional
Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers at lists.alioth.debian.org>
-Uploaders: Andreas Henriksson <andreas at fatal.se>, 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>, Laurent Bigonville <bigon at debian.org>, Michael Biebl <biebl at debian.org>
Build-Depends: cdbs (>= 0.4.93),
debhelper (>= 9),
dh-autoreconf,
Modified: desktop/experimental/gdk-pixbuf/debian/patches/skip-large-file-tests-instead-of-ooming
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gdk-pixbuf/debian/patches/skip-large-file-tests-instead-of-ooming?rev=45978&op=diff
==============================================================================
--- desktop/experimental/gdk-pixbuf/debian/patches/skip-large-file-tests-instead-of-ooming [utf-8] (original)
+++ desktop/experimental/gdk-pixbuf/debian/patches/skip-large-file-tests-instead-of-ooming [utf-8] Fri Sep 18 21:08:26 2015
@@ -2,10 +2,10 @@
Author: Iain Lane <laney at debian.org>
Bug-Upstream: https://bugzilla.gnome.org/show_bug.cgi?id=754387
-Index: b/tests/cve-2015-4491.c
-===================================================================
---- a/tests/cve-2015-4491.c
-+++ b/tests/cve-2015-4491.c
+Index: gdk-pixbuf-2.31.7/tests/cve-2015-4491.c
+===================================================================
+--- gdk-pixbuf-2.31.7.orig/tests/cve-2015-4491.c
++++ gdk-pixbuf-2.31.7/tests/cve-2015-4491.c
@@ -19,6 +19,9 @@
*/
@@ -16,7 +16,7 @@
static void
test_original (void)
-@@ -29,7 +32,8 @@
+@@ -29,7 +32,8 @@ test_original (void)
buf = gdk_pixbuf_new_from_resource_at_scale ("/test/resource/cve-2015-4491.bmp", size, size, FALSE, &err);
@@ -26,7 +26,103 @@
g_object_unref (buf);
}
-@@ -76,6 +80,8 @@
+@@ -37,45 +41,80 @@ test_original (void)
+ static void
+ test_scale_overflow (void)
+ {
+- GdkPixbuf *src, *dest;
+-
+- src = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, 1 << 12, 1 << 12);
+- dest = gdk_pixbuf_scale_simple (src, 1, 1, GDK_INTERP_BILINEAR);
+-
+- g_object_unref (dest);
+- g_object_unref (src);
+-
++ if (g_test_subprocess())
++ {
++ GdkPixbuf *src, *dest;
++
++ src = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, 1 << 12, 1 << 12);
++ dest = gdk_pixbuf_scale_simple (src, 1, 1, GDK_INTERP_BILINEAR);
++
++ g_object_unref (dest);
++ g_object_unref (src);
++
++ return;
++ }
++
++ g_test_trap_subprocess (NULL, 0, 0);
++ if (!g_test_trap_has_passed ())
++ {
++ g_test_trap_assert_stderr ("*ERROR*failed to allocate*");
++ g_test_skip ("Not enough memory to scale image");
++ }
+ }
+
+ static void
+ test_scalex_overflow (void)
+ {
+- GdkPixbuf *src, *dest;
+-
+- src = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, (((guint) G_MAXINT) + 1) >> 7, 1);
+- dest = gdk_pixbuf_scale_simple (src, 1, 1, GDK_INTERP_BILINEAR);
+-
+- g_object_unref (dest);
+- g_object_unref (src);
+-
++ if (g_test_subprocess())
++ {
++ GdkPixbuf *src, *dest;
++
++ src = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, (((guint) G_MAXINT) + 1) >> 7, 1);
++ dest = gdk_pixbuf_scale_simple (src, 1, 1, GDK_INTERP_BILINEAR);
++
++ g_object_unref (dest);
++ g_object_unref (src);
++
++ return;
++ }
++
++ g_test_trap_subprocess (NULL, 0, 0);
++ if (!g_test_trap_has_passed ())
++ {
++ g_test_trap_assert_stderr ("*ERROR*failed to allocate*");
++ g_test_skip ("Not enough memory to scale image");
++ }
+ }
+
+ static void
+ test_scaley_overflow (void)
+ {
+- GdkPixbuf *src, *dest;
+-
+- src = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, 1, (((guint) G_MAXINT) + 1) >> 7);
+- dest = gdk_pixbuf_scale_simple (src, 1, 1, GDK_INTERP_BILINEAR);
+-
+- g_object_unref (dest);
+- g_object_unref (src);
+-
++ if (g_test_subprocess())
++ {
++ GdkPixbuf *src, *dest;
++
++ src = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, 1, (((guint) G_MAXINT) + 1) >> 7);
++ dest = gdk_pixbuf_scale_simple (src, 1, 1, GDK_INTERP_BILINEAR);
++
++ g_object_unref (dest);
++ g_object_unref (src);
++
++ return;
++ }
++
++ g_test_trap_subprocess (NULL, 0, 0);
++ if (!g_test_trap_has_passed ())
++ {
++ g_test_trap_assert_stderr ("*ERROR*failed to allocate*");
++ g_test_skip ("Not enough memory to scale image");
++ }
+ }
+
int
main (int argc, char *argv[])
{
@@ -35,11 +131,11 @@
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/pixbuf/cve-2015-4491/original", test_original);
-Index: b/tests/pixbuf-scale.c
-===================================================================
---- a/tests/pixbuf-scale.c
-+++ b/tests/pixbuf-scale.c
-@@ -83,7 +83,9 @@
+Index: gdk-pixbuf-2.31.7/tests/pixbuf-scale.c
+===================================================================
+--- gdk-pixbuf-2.31.7.orig/tests/pixbuf-scale.c
++++ gdk-pixbuf-2.31.7/tests/pixbuf-scale.c
+@@ -83,7 +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);
@@ -50,7 +146,7 @@
width = gdk_pixbuf_get_width (ref);
height = gdk_pixbuf_get_height (ref);
-@@ -111,10 +113,18 @@
+@@ -111,10 +113,18 @@ test_add_alpha (gconstpointer data)
path = g_test_get_filename (G_TEST_DIST, filename, NULL);
ref = gdk_pixbuf_new_from_file (path, &error);
@@ -71,7 +167,7 @@
g_object_unref (pixbuf);
pixbuf = gdk_pixbuf_add_alpha (ref, TRUE, 0, 0, 255);
-@@ -141,10 +151,18 @@
+@@ -141,10 +151,18 @@ test_rotate (gconstpointer data)
path = g_test_get_filename (G_TEST_DIST, filename, NULL);
ref = gdk_pixbuf_new_from_file (path, &error);
@@ -92,11 +188,11 @@
g_object_unref (pixbuf);
g_object_unref (ref);
-Index: b/tests/test-common.c
-===================================================================
---- a/tests/test-common.c
-+++ b/tests/test-common.c
-@@ -65,6 +65,19 @@
+Index: gdk-pixbuf-2.31.7/tests/test-common.c
+===================================================================
+--- gdk-pixbuf-2.31.7.orig/tests/test-common.c
++++ gdk-pixbuf-2.31.7/tests/test-common.c
+@@ -65,6 +65,19 @@ format_supported (const gchar *filename)
}
gboolean
@@ -116,10 +212,10 @@
pixdata_equal (GdkPixbuf *p1, GdkPixbuf *p2, GError **error)
{
if (gdk_pixbuf_get_colorspace (p1) != gdk_pixbuf_get_colorspace (p2)) {
-Index: b/tests/test-common.h
-===================================================================
---- a/tests/test-common.h
-+++ b/tests/test-common.h
+Index: gdk-pixbuf-2.31.7/tests/test-common.h
+===================================================================
+--- gdk-pixbuf-2.31.7.orig/tests/test-common.h
++++ gdk-pixbuf-2.31.7/tests/test-common.h
@@ -28,6 +28,7 @@
G_BEGIN_DECLS
@@ -128,11 +224,11 @@
gboolean pixdata_equal (GdkPixbuf *p1, GdkPixbuf *p2, GError **error);
G_END_DECLS
-Index: b/tests/Makefile.am
-===================================================================
---- a/tests/Makefile.am
-+++ b/tests/Makefile.am
-@@ -60,6 +60,8 @@
+Index: gdk-pixbuf-2.31.7/tests/Makefile.am
+===================================================================
+--- gdk-pixbuf-2.31.7.orig/tests/Makefile.am
++++ gdk-pixbuf-2.31.7/tests/Makefile.am
+@@ -60,6 +60,8 @@ dist_installed_test_data = \
cve_2015_4491_SOURCES = \
cve-2015-4491.c \
More information about the pkg-gnome-commits
mailing list