Hello community,

here is the log from the commit of package libserf for openSUSE:Factory checked 
in at 2014-10-31 18:27:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libserf (Old)
 and      /work/SRC/openSUSE:Factory/.libserf.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libserf"

Changes:
--------
--- /work/SRC/openSUSE:Factory/libserf/libserf.changes  2014-10-23 
14:21:16.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libserf.new/libserf.changes     2014-10-31 
20:14:55.000000000 +0100
@@ -1,0 +2,7 @@
+Thu Oct 23 19:46:37 UTC 2014 - [email protected]
+
+- enable running test suite:
+  * add libserf-1.3.x-fix-comment-style.patch to fix compile error
+  * add libserf-1.3.x-fix-deflate-buckets-test.patch to fix crash
+
+-------------------------------------------------------------------

New:
----
  libserf-1.3.x-fix-comment-style.patch
  libserf-1.3.x-fix-deflate-buckets-test.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libserf.spec ++++++
--- /var/tmp/diff_new_pack.tQa5mD/_old  2014-10-31 20:14:56.000000000 +0100
+++ /var/tmp/diff_new_pack.tQa5mD/_new  2014-10-31 20:14:56.000000000 +0100
@@ -30,6 +30,8 @@
 Group:          System/Libraries
 Url:            https://serf.googlecode.com
 Source:         
https://serf.googlecode.com/svn/src_releases/serf-%{version}.tar.bz2
+Patch1:         libserf-1.3.x-fix-comment-style.patch
+Patch2:         libserf-1.3.x-fix-deflate-buckets-test.patch
 BuildRequires:  gcc
 BuildRequires:  glibc-devel
 BuildRequires:  libapr-util1-devel >= %{minimum_apr_version}
@@ -83,6 +85,8 @@
 
 %prep
 %setup -q -n "serf-%{version}"
+%patch1 -p1
+%patch2 -p1
 
 %build
 scons \
@@ -104,16 +108,12 @@
 rm -f "%{buildroot}%{_libdir}"/lib*.a
 
 %check
-# test failing due to memory leak
-# https://groups.google.com/d/msg/serf-dev/qoTK8BfRfrI/EJL7xj4PmT4J
-%if 0
 %if 0%{?suse_version} > 1210
 scons \
        CFLAGS="%{optflags}" \
        check \
        %{?_smp_mflags}
 %endif
-%endif
 
 %post   -n libserf-%{major}-%{major} -p /sbin/ldconfig
 

++++++ libserf-1.3.x-fix-comment-style.patch ++++++
From: Andreas Stieger <[email protected]>
Date: 2014-10-21 22:42:56 +0100
Subject: Correct comment style
Upstream: Committed
References: https://code.google.com/p/serf/source/detail?r=2443

Fixes error:
test/test_buckets.c: In function 'deflate_compress':
test/test_buckets.c:1237:1: error: expected expression before '/' token
 //    buf_size = orig_len + (orig_len / 1000) + 12;
 ^

------------------------------------------------------------------------
r2443 | [email protected] | 2014-10-21 22:42:56 +0100 (Tue, 21 Oct 2014) | 
7 lines
Changed paths:
   M /trunk/test/test_buckets.c

Follow-up to r2419: Correct comment style

* test/test_buckets.c
  (deflate_compress): Correct comment style not supported by strict
  compilers, fails on /branches/1.3.x


------------------------------------------------------------------------
Index: trunk/test/test_buckets.c
===================================================================
--- trunk/test/test_buckets.c   (revision 2442)
+++ trunk/test/test_buckets.c   (revision 2443)
@@ -1323,9 +1323,9 @@ static apr_status_t deflate_compress(const char **
 
     /* The largest buffer we should need is 0.1% larger than the
        uncompressed data, + 12 bytes. This info comes from zlib.h.
+       buf_size = orig_len + (orig_len / 1000) + 12;
        Note: This isn't sufficient when using Z_NO_FLUSH and extremely 
compressed
        data. Use a buffer bigger than what we need. */
-//    buf_size = orig_len + (orig_len / 1000) + 12;
     buf_size = 100000;
 
     write_buf = apr_palloc(pool, buf_size);
++++++ libserf-1.3.x-fix-deflate-buckets-test.patch ++++++
From: Ivan Zhakov <[email protected]>
Date: 2014-10-23 17:15:22 +0100 
Subject: Reduce memory usage by deflate buckets test.
Upstream: Committed
References: https://code.google.com/p/serf/source/detail?r=2445 
https://groups.google.com/d/msg/serf-dev/qoTK8BfRfrI/EJL7xj4PmT4J

Fixes failing test program by reducing memory usage.

------------------------------------------------------------------------
r2445 | chemodax | 2014-10-23 17:15:22 +0100 (Thu, 23 Oct 2014) | 6 lines
Changed paths:
   M /trunk/test/test_buckets.c

Reduce memory usage by deflate buckets test.

* test/test_buckets.c
  (deflate_buckets): Add POOL argument and use it instead of tb->pool.
  (test_deflate_buckets): Use iterpool for deflate_buckets() call.

------------------------------------------------------------------------
Index: trunk/test/test_buckets.c
===================================================================
--- trunk/test/test_buckets.c   (revision 2444)
+++ trunk/test/test_buckets.c   (revision 2445)
@@ -1400,12 +1400,12 @@ static void read_bucket_and_check_pattern(CuTest *
                           expected_len);
 }
 
-static void deflate_buckets(CuTest *tc, int nr_of_loops)
+static void deflate_buckets(CuTest *tc, int nr_of_loops, apr_pool_t *pool)
 {
     const char *msg = "12345678901234567890123456789012345678901234567890";
 
     test_baton_t *tb = tc->testBaton;
-    serf_bucket_alloc_t *alloc = serf_bucket_allocator_create(tb->pool, NULL,
+    serf_bucket_alloc_t *alloc = serf_bucket_allocator_create(pool, NULL,
                                                               NULL);
     z_stream zdestr;
     int i;
@@ -1424,8 +1424,8 @@ static void read_bucket_and_check_pattern(CuTest *
     {
         serf_config_t *config;
 
-        serf_context_t *ctx = serf_context_create(tb->pool);
-        /* status = */ serf__config_store_get_config(ctx, NULL, &config, 
tb->pool);
+        serf_context_t *ctx = serf_context_create(pool);
+        /* status = */ serf__config_store_get_config(ctx, NULL, &config, pool);
 
         serf_bucket_set_config(defbkt, config);
     }
@@ -1447,11 +1447,11 @@ static void read_bucket_and_check_pattern(CuTest *
         if (i == nr_of_loops - 1) {
             CuAssertIntEquals(tc, APR_SUCCESS,
                               deflate_compress(&data, &len, &zdestr, msg,
-                                               strlen(msg), 1, tb->pool));
+                                               strlen(msg), 1, pool));
         } else {
             CuAssertIntEquals(tc, APR_SUCCESS,
                               deflate_compress(&data, &len, &zdestr, msg,
-                                               strlen(msg), 0, tb->pool));
+                                               strlen(msg), 0, pool));
         }
 
         if (len == 0)
@@ -1469,10 +1469,15 @@ static void read_bucket_and_check_pattern(CuTest *
 static void test_deflate_buckets(CuTest *tc)
 {
     int i;
+    apr_pool_t *iterpool;
+    test_baton_t *tb = tc->testBaton;
 
+    apr_pool_create(&iterpool, tb->pool);
     for (i = 1; i < 1000; i++) {
-        deflate_buckets(tc, i);
+        apr_pool_clear(iterpool);
+        deflate_buckets(tc, i, iterpool);
     }
+    apr_pool_destroy(iterpool);
 }
 
 static apr_status_t discard_data(serf_bucket_t *bkt,
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to