You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2013/11/14 05:17:02 UTC
svn commit: r1541807 - in /subversion/branches/1.8.x: ./ STATUS
subversion/tests/libsvn_subr/checksum-test.c
subversion/tests/libsvn_subr/zlib.deflated
Author: breser
Date: Thu Nov 14 04:17:02 2013
New Revision: 1541807
URL: http://svn.apache.org/r1541807
Log:
Revert r1541801 which merged the ZLib tests. Breaks the build.
Removed:
subversion/branches/1.8.x/subversion/tests/libsvn_subr/zlib.deflated
Modified:
subversion/branches/1.8.x/ (props changed)
subversion/branches/1.8.x/STATUS
subversion/branches/1.8.x/subversion/tests/libsvn_subr/checksum-test.c
Propchange: subversion/branches/1.8.x/
------------------------------------------------------------------------------
Reverse-merged /subversion/trunk:r1537193,1537221,1540428
Modified: subversion/branches/1.8.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/STATUS?rev=1541807&r1=1541806&r2=1541807&view=diff
==============================================================================
--- subversion/branches/1.8.x/STATUS (original)
+++ subversion/branches/1.8.x/STATUS Thu Nov 14 04:17:02 2013
@@ -186,3 +186,18 @@ Veto-blocked changes:
Approved changes:
=================
+
+ * r1537193, r1537221, r1540428
+ Add test to verify if the used ZLib is affected by some block size bugs that
+ affect our usage of serf.
+ Justification:
+ Most Windows binaries were affected by this bug and we should verify
+ that we don't accidentally reintroduce this problem.
+ Notes:
+ This patch needs the source directory for obtaining its test data. The
+ backport branch contains portions of r1537147 and r1537190 to enable
+ this test.
+ Branch: ^/subversion/branches/1.8.x-r1537193/
+ Votes:
+ +1: stefan2, rhuijben, ivan
+ +1 (without r1540428): brane
Modified: subversion/branches/1.8.x/subversion/tests/libsvn_subr/checksum-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/tests/libsvn_subr/checksum-test.c?rev=1541807&r1=1541806&r2=1541807&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/tests/libsvn_subr/checksum-test.c (original)
+++ subversion/branches/1.8.x/subversion/tests/libsvn_subr/checksum-test.c Thu Nov 14 04:17:02 2013
@@ -23,10 +23,7 @@
#include <apr_pools.h>
-#include <zlib.h>
-
#include "svn_error.h"
-#include "svn_io.h"
#include "private/svn_pseudo_md5.h"
#include "../svn_test.h"
@@ -158,87 +155,6 @@ zero_match(apr_pool_t *pool)
return SVN_NO_ERROR;
}
-static svn_error_t *
-zlib_expansion_test(const svn_test_opts_t *opts,
- apr_pool_t *pool)
-{
- const char *data_path;
- svn_stringbuf_t *deflated;
- Byte dst_buffer[256 * 1024];
- Byte *src_buffer;
- apr_size_t sz;
-
- data_path = svn_dirent_join(opts->srcdir, "zlib.deflated", pool);
-
- SVN_ERR(svn_stringbuf_from_file2(&deflated, data_path, pool));
- src_buffer = (Byte*)deflated->data;
-
- /* Try to decompress the same data with different blocksizes */
- for (sz = 1; sz < 256; sz++)
- {
- z_stream stream;
- memset(&stream, 0, sizeof(stream));
- inflateInit2(&stream, -15 /* DEFLATE_WINDOW_SIZE */);
-
- stream.avail_in = sz;
- stream.next_in = src_buffer;
- stream.avail_out = sizeof(dst_buffer);
- stream.next_out = dst_buffer;
-
- do
- {
- int zr = inflate(&stream, Z_NO_FLUSH);
-
- if (zr != Z_OK && zr != Z_STREAM_END)
- {
- return svn_error_createf(
- SVN_ERR_TEST_FAILED, NULL,
- "Failure decompressing with blocksize %d", (int)sz);
- }
- stream.avail_in += sz;
- } while (stream.next_in + stream.avail_in < src_buffer + deflated->len);
-
- stream.avail_in = (src_buffer + deflated->len) - stream.next_in;
-
- {
- int zr = inflate(&stream, Z_NO_FLUSH);
-
- if (zr != Z_STREAM_END)
- {
- return svn_error_createf(
- SVN_ERR_TEST_FAILED, NULL,
- "Final flush failed with blocksize %d", (int)sz);
- }
-
- zr = inflateEnd(&stream);
-
- if (zr != Z_OK)
- {
- return svn_error_createf(
- SVN_ERR_TEST_FAILED, NULL,
- "End of stream handling failed with blocksize %d",
- (int)sz);
- }
- }
-
- {
- apr_uint32_t crc = crc32(0, dst_buffer, stream.total_out);
-
- if (stream.total_out != 242014 || crc != 0x8f03d934)
- {
- return svn_error_createf(
- SVN_ERR_TEST_FAILED, NULL,
- "Decompressed data doesn't match expected size or crc with "
- "blocksize %d: Found crc32=0x%08x, size=%d.\n"
- "Verify your ZLib installation, as this should never happen",
- (int)sz, (unsigned)crc, (int)stream.total_out);
- }
- }
- }
-
- return SVN_NO_ERROR;
-}
-
/* An array of all test functions */
struct svn_test_descriptor_t test_funcs[] =
{
@@ -251,7 +167,5 @@ struct svn_test_descriptor_t test_funcs[
"pseudo-md5 compatibility"),
SVN_TEST_PASS2(zero_match,
"zero checksum matching"),
- SVN_TEST_OPTS_PASS(zlib_expansion_test,
- "zlib expansion test (zlib regression)"),
SVN_TEST_NULL
};