Modified:
subversion/branches/authzperf/subversion/tests/libsvn_repos/dump-load-test.c
URL:
http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/tests/libsvn_repos/dump-load-test.c?rev=1649205&r1=1649204&r2=1649205&view=diff
==============================================================================
---
subversion/branches/authzperf/subversion/tests/libsvn_repos/dump-load-test.c
(original)
+++
subversion/branches/authzperf/subversion/tests/libsvn_repos/dump-load-test.c
Sat Jan 3 14:00:41 2015
@@ -35,7 +35,114 @@
-/* Notification receiver for test_dump_bad_mergeinfo(). This does not
+/* Test dumping in the presence of the property PROP_NAME:PROP_VAL.
+ * Return the dumped data in *DUMP_DATA_P (if DUMP_DATA_P is not null).
+ * REPOS is an empty repository.
+ * See svn_repos_dump_fs3() for START_REV, END_REV, NOTIFY_FUNC, NOTIFY_BATON.
+ */
+static svn_error_t *
+test_dump_bad_props(svn_stringbuf_t **dump_data_p,
+ svn_repos_t *repos,
+ const char *prop_name,
+ const svn_string_t *prop_val,
+ svn_revnum_t start_rev,
+ svn_revnum_t end_rev,
+ svn_repos_notify_func_t notify_func,
+ void *notify_baton,
+ apr_pool_t *pool)
+{
+ const char *test_path = "/bar";
+ svn_fs_t *fs = svn_repos_fs(repos);
+ svn_fs_txn_t *txn;
+ svn_fs_root_t *txn_root;
+ svn_revnum_t youngest_rev = 0;
+ svn_stringbuf_t *dump_data = svn_stringbuf_create_empty(pool);
+ svn_stream_t *stream = svn_stream_from_stringbuf(dump_data, pool);
+ const char *expected_str;
+
+ /* Revision 1: Any commit will do, here */
+ SVN_ERR(svn_fs_begin_txn2(&txn, fs, youngest_rev, 0, pool));
+ SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
+ SVN_ERR(svn_fs_make_dir(txn_root, test_path , pool));
+ SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, pool));
+ SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
+
+ /* Revision 2: Add the bad property */
+ SVN_ERR(svn_fs_begin_txn2(&txn, fs, youngest_rev, 0, pool));
+ SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
+ SVN_ERR(svn_fs_change_node_prop(txn_root, test_path , prop_name, prop_val,
+ pool));
+ SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, pool));
+ SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
+
+ /* Test that a dump completes without error. */
+ SVN_ERR(svn_repos_dump_fs3(repos, stream, start_rev, end_rev,
+ FALSE, FALSE,
+ notify_func, notify_baton,
+ NULL, NULL,
+ pool));
+ svn_stream_close(stream);
+
+ /* Check that the property appears in the dump data */
+ expected_str = apr_psprintf(pool, "K %d\n%s\n"
+ "V %d\n%s\n"
+ "PROPS-END\n",
+ (int)strlen(prop_name), prop_name,
+ (int)prop_val->len, prop_val->data);
+ SVN_TEST_ASSERT(strstr(dump_data->data, expected_str));
+
+ if (dump_data_p)
+ *dump_data_p = dump_data;
+ return SVN_NO_ERROR;
+}
+
+/* Test loading in the presence of the property PROP_NAME:PROP_VAL.
+ * Load data from DUMP_DATA.
+ * REPOS is an empty repository.
+ */
+static svn_error_t *
+test_load_bad_props(svn_stringbuf_t *dump_data,
+ svn_repos_t *repos,
+ const char *prop_name,
+ const svn_string_t *prop_val,
+ const char *parent_fspath,
+ svn_boolean_t validate_props,
+ svn_repos_notify_func_t notify_func,
+ void *notify_baton,
+ apr_pool_t *pool)
+{
+ const char *test_path = apr_psprintf(pool, "%s%s",
+ parent_fspath ? parent_fspath : "",
+ "/bar");
+ svn_stream_t *stream = svn_stream_from_stringbuf(dump_data, pool);
+ svn_fs_t *fs;
+ svn_fs_root_t *rev_root;
+ svn_revnum_t youngest_rev;
+ svn_string_t *loaded_prop_val;
+
+ SVN_ERR(svn_repos_load_fs5(repos, stream,
+ SVN_INVALID_REVNUM, SVN_INVALID_REVNUM,
+ svn_repos_load_uuid_default,
+ parent_fspath,
+ FALSE, FALSE, /*use_*_commit_hook*/
+ validate_props,
+ FALSE /*ignore_dates*/,
+ notify_func, notify_baton,
+ NULL, NULL, /*cancellation*/
+ pool));
+ svn_stream_close(stream);
+
+ /* Check the loaded property */
+ fs = svn_repos_fs(repos);
+ SVN_ERR(svn_fs_youngest_rev(&youngest_rev, fs, pool));
+ SVN_ERR(svn_fs_revision_root(&rev_root, fs, youngest_rev, pool));
+ SVN_ERR(svn_fs_node_prop(&loaded_prop_val,
+ rev_root, test_path, prop_name, pool));
+ SVN_TEST_ASSERT(svn_string_compare(loaded_prop_val, prop_val));
+ return SVN_NO_ERROR;
+}
+
+/* Notification receiver for test_dump_r0_mergeinfo(). This does not
need to do anything, it just needs to exist.
*/
static void
@@ -51,44 +158,115 @@ static svn_error_t *
test_dump_r0_mergeinfo(const svn_test_opts_t *opts,
apr_pool_t *pool)
{
- svn_repos_t *repos;
- svn_fs_t *fs;
- svn_fs_txn_t *txn;
- svn_fs_root_t *txn_root;
- svn_revnum_t youngest_rev = 0;
+ const char *prop_name = "svn:mergeinfo";
const svn_string_t *bad_mergeinfo = svn_string_create("/foo:0", pool);
+ svn_repos_t *repos;
SVN_ERR(svn_test__create_repos(&repos, "test-repo-dump-r0-mergeinfo",
opts, pool));
- fs = svn_repos_fs(repos);
-
- /* Revision 1: Any commit will do, here */
- SVN_ERR(svn_fs_begin_txn2(&txn, fs, youngest_rev, 0, pool));
- SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
- SVN_ERR(svn_fs_make_dir(txn_root, "/bar", pool));
- SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, pool));
- SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
-
- /* Revision 2: Add bad mergeinfo */
- SVN_ERR(svn_fs_begin_txn2(&txn, fs, youngest_rev, 0, pool));
- SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
- SVN_ERR(svn_fs_change_node_prop(txn_root, "/bar", "svn:mergeinfo",
bad_mergeinfo, pool));
- SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, pool));
- SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
-
- /* Test that a dump completes without error. In order to exercise the
+ /* In order to exercise the
functionality under test -- that is, in order for the dump to try to
parse the mergeinfo it is dumping -- the dump must start from a
revision greater than 1 and must take a notification callback. */
+ SVN_ERR(test_dump_bad_props(NULL, repos,
+ prop_name, bad_mergeinfo,
+ 2, SVN_INVALID_REVNUM,
+ dump_r0_mergeinfo_notifier, NULL,
+ pool));
+
+ return SVN_NO_ERROR;
+}
+
+static void
+load_r0_mergeinfo_notifier(void *baton,
+ const svn_repos_notify_t *notify,
+ apr_pool_t *scratch_pool)
+{
+ svn_boolean_t *had_mergeinfo_warning = baton;
+
+ if (notify->action == svn_repos_notify_warning)
+ {
+ if (notify->warning == svn_repos_notify_warning_invalid_mergeinfo)
+ {
+ *had_mergeinfo_warning = TRUE;
+ }
+ }
+}
+
+/* Regression test for the 'load' part of issue #4476 "Mergeinfo
+ * containing r0 makes svnsync and svnadmin dump fail".
+ *
+ * Bad mergeinfo should not prevent loading a backup, at least when we do not
+ * require mergeinfo revision numbers or paths to be adjusted during loading.
+ */
+static svn_error_t *
+test_load_r0_mergeinfo(const svn_test_opts_t *opts,
+ apr_pool_t *pool)
+{
+ const char *prop_name = "svn:mergeinfo";
+ const svn_string_t *prop_val = svn_string_create("/foo:0", pool);
+ svn_stringbuf_t *dump_data = svn_stringbuf_create_empty(pool);
+
+ /* Produce a dump file containing bad mergeinfo */
{
- svn_stringbuf_t *stringbuf = svn_stringbuf_create_empty(pool);
- svn_stream_t *stream = svn_stream_from_stringbuf(stringbuf, pool);
+ svn_repos_t *repos;
+
+ SVN_ERR(svn_test__create_repos(&repos, "test-repo-load-r0-mi-1",
+ opts, pool));
+ SVN_ERR(test_dump_bad_props(&dump_data, repos,
+ prop_name, prop_val,
+ SVN_INVALID_REVNUM, SVN_INVALID_REVNUM,
+ NULL, NULL, pool));
+ }
+
+ /* Test loading without validating properties: should warn and succeed */
+ {
+ svn_repos_t *repos;
+ svn_boolean_t had_mergeinfo_warning = FALSE;
+
+ SVN_ERR(svn_test__create_repos(&repos, "test-repo-load-r0-mi-2",
+ opts, pool));
+
+ /* Without changing revision numbers or paths */
+ SVN_ERR(test_load_bad_props(dump_data, repos,
+ prop_name, prop_val,
+ NULL /*parent_dir*/, FALSE /*validate_props*/,
+ load_r0_mergeinfo_notifier,
&had_mergeinfo_warning,
+ pool));
+ SVN_TEST_ASSERT(had_mergeinfo_warning);
+
+ /* With changing revision numbers and/or paths (by loading the same data
+ again, on top of existing revisions, into subdirectory 'bar') */
+ had_mergeinfo_warning = FALSE;
+ SVN_ERR(test_load_bad_props(dump_data, repos,
+ prop_name, prop_val,
+ "/bar", FALSE /*validate_props*/,
+ load_r0_mergeinfo_notifier,
&had_mergeinfo_warning,
+ pool));
+ SVN_TEST_ASSERT(had_mergeinfo_warning);
+ }
+
+ /* Test loading with validating properties: should return an error */
+ {
+ svn_repos_t *repos;
+
+ SVN_ERR(svn_test__create_repos(&repos, "test-repo-load-r0-mi-3",
+ opts, pool));
- SVN_ERR(svn_repos_dump_fs3(repos, stream, 2, SVN_INVALID_REVNUM,
- FALSE, FALSE,
- dump_r0_mergeinfo_notifier, NULL,
- NULL, NULL,
- pool));
+ /* Without changing revision numbers or paths */
+ SVN_TEST_ASSERT_ANY_ERROR(test_load_bad_props(dump_data, repos,
+ prop_name, prop_val,
+ NULL /*parent_dir*/, TRUE /*validate_props*/,
+ NULL, NULL,
+ pool));
+
+ /* With changing revision numbers and/or paths (by loading the same data
+ again, on top of existing revisions, into subdirectory 'bar') */
+ SVN_TEST_ASSERT_ANY_ERROR(test_load_bad_props(dump_data, repos,
+ prop_name, prop_val,
+ "/bar", TRUE /*validate_props*/,
+ NULL, NULL,
+ pool));
}
return SVN_NO_ERROR;
@@ -103,6 +281,8 @@ static struct svn_test_descriptor_t test
SVN_TEST_NULL,
SVN_TEST_OPTS_PASS(test_dump_r0_mergeinfo,
"test dumping with r0 mergeinfo"),
+ SVN_TEST_OPTS_PASS(test_load_r0_mergeinfo,
+ "test loading with r0 mergeinfo"),
SVN_TEST_NULL
};
Propchange:
subversion/branches/authzperf/subversion/tests/libsvn_subr/bit-array-test.c
------------------------------------------------------------------------------
svn:eol-style = native
Modified:
subversion/branches/authzperf/subversion/tests/libsvn_subr/cache-test.c
URL:
http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/tests/libsvn_subr/cache-test.c?rev=1649205&r1=1649204&r2=1649205&view=diff
==============================================================================
--- subversion/branches/authzperf/subversion/tests/libsvn_subr/cache-test.c
(original)
+++ subversion/branches/authzperf/subversion/tests/libsvn_subr/cache-test.c Sat
Jan 3 14:00:41 2015
@@ -201,6 +201,102 @@ test_membuffer_cache_basic(apr_pool_t *p
return basic_cache_test(cache, FALSE, pool);
}
+/* Implements svn_cache__deserialize_func_t */
+static svn_error_t *
+raise_error_deserialize_func(void **out,
+ void *data,
+ apr_size_t data_len,
+ apr_pool_t *pool)
+{
+ return svn_error_create(APR_EGENERAL, NULL, NULL);
+}
+
+/* Implements svn_cache__partial_getter_func_t */
+static svn_error_t *
+raise_error_partial_getter_func(void **out,
+ const void *data,
+ apr_size_t data_len,
+ void *baton,
+ apr_pool_t *result_pool)
+{
+ return svn_error_create(APR_EGENERAL, NULL, NULL);
+}
+
+/* Implements svn_cache__partial_setter_func_t */
+static svn_error_t *
+raise_error_partial_setter_func(void **data,
+ apr_size_t *data_len,
+ void *baton,
+ apr_pool_t *result_pool)
+{
+ return svn_error_create(APR_EGENERAL, NULL, NULL);
+}
+
+static svn_error_t *
+test_membuffer_serializer_error_handling(apr_pool_t *pool)
+{
+ svn_cache__t *cache;
+ svn_membuffer_t *membuffer;
+ svn_revnum_t twenty = 20;
+ svn_boolean_t found;
+ void *val;
+
+ SVN_ERR(svn_cache__membuffer_cache_create(&membuffer, 10*1024, 1, 0,
+ TRUE, TRUE, pool));
+
+ /* Create a cache with just one entry. */
+ SVN_ERR(svn_cache__create_membuffer_cache(&cache,
+ membuffer,
+ serialize_revnum,
+ raise_error_deserialize_func,
+ APR_HASH_KEY_STRING,
+ "cache:",
+
SVN_CACHE__MEMBUFFER_DEFAULT_PRIORITY,
+ FALSE,
+ pool, pool));
+
+ SVN_ERR(svn_cache__set(cache, "twenty", &twenty, pool));
+
+ /* Test retrieving data from cache using full getter that
+ always raises an error. */
+ SVN_TEST_ASSERT_ERROR(
+ svn_cache__get(&val, &found, cache, "twenty", pool),
+ APR_EGENERAL);
+
+ /* Test retrieving data from cache using partial getter that
+ always raises an error. */
+ SVN_TEST_ASSERT_ERROR(
+ svn_cache__get_partial(&val, &found, cache, "twenty",
+ raise_error_partial_getter_func,
+ NULL, pool),
+ APR_EGENERAL);
+
+ /* Create a new cache. */
+ SVN_ERR(svn_cache__membuffer_cache_create(&membuffer, 10*1024, 1, 0,
+ TRUE, TRUE, pool));
+ SVN_ERR(svn_cache__create_membuffer_cache(&cache,
+ membuffer,
+ serialize_revnum,
+ deserialize_revnum,
+ APR_HASH_KEY_STRING,
+ "cache:",
+
SVN_CACHE__MEMBUFFER_DEFAULT_PRIORITY,
+ FALSE,
+ pool, pool));
+
+ /* Store one entry in cache. */
+ SVN_ERR(svn_cache__set(cache, "twenty", &twenty, pool));
+
+ /* Test setting data in cache using partial setter that
+ always raises an error. */
+ SVN_TEST_ASSERT_ERROR(
+ svn_cache__set_partial(cache, "twenty",
+ raise_error_partial_setter_func,
+ NULL, pool),
+ APR_EGENERAL);
+
+ return SVN_NO_ERROR;
+}
static svn_error_t *
test_memcache_long_key(const svn_test_opts_t *opts,
@@ -274,6 +370,8 @@ static struct svn_test_descriptor_t test
"memcache svn_cache with very long keys"),
SVN_TEST_PASS2(test_membuffer_cache_basic,
"basic membuffer svn_cache test"),
+ SVN_TEST_PASS2(test_membuffer_serializer_error_handling,
+ "test for error handling in membuffer svn_cache"),
SVN_TEST_NULL
};
Modified:
subversion/branches/authzperf/subversion/tests/libsvn_subr/config-test.c
URL:
http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/tests/libsvn_subr/config-test.c?rev=1649205&r1=1649204&r2=1649205&view=diff
==============================================================================
--- subversion/branches/authzperf/subversion/tests/libsvn_subr/config-test.c
(original)
+++ subversion/branches/authzperf/subversion/tests/libsvn_subr/config-test.c
Sat Jan 3 14:00:41 2015
@@ -347,6 +347,29 @@ test_read_only_mode(const svn_test_opts_
return SVN_NO_ERROR;
}
+static svn_error_t *
+test_expand(const svn_test_opts_t *opts,
+ apr_pool_t *pool)
+{
+ svn_config_t *cfg;
+ const char *cfg_file, *val;
+
+ SVN_ERR(get_config_file_path(&cfg_file, opts, pool));
+ SVN_ERR(svn_config_read3(&cfg, cfg_file, TRUE, TRUE, FALSE, pool));
+
+ /* Get expanded "g" which requires expanding "c". */
+ svn_config_get(cfg, &val, "section1", "g", NULL);
+
+ /* Get expanded "c". */
+ svn_config_get(cfg, &val, "section1", "c", NULL);
+
+ /* With pool debugging enabled this ensures that the expanded value
+ of "c" was not created in a temporary pool when expanding "g". */
+ SVN_TEST_STRING_ASSERT(val, "bar");
+
+ return SVN_NO_ERROR;
+}
+
/*
====================================================================
If you add a new test to this file, update this array.
@@ -377,6 +400,8 @@ static struct svn_test_descriptor_t test
"test parsing config file with BOM"),
SVN_TEST_OPTS_PASS(test_read_only_mode,
"test r/o mode"),
+ SVN_TEST_OPTS_PASS(test_expand,
+ "test variable expansion"),
SVN_TEST_NULL
};
Modified: subversion/branches/authzperf/subversion/tests/libsvn_subr/io-test.c
URL:
http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/tests/libsvn_subr/io-test.c?rev=1649205&r1=1649204&r2=1649205&view=diff
==============================================================================
--- subversion/branches/authzperf/subversion/tests/libsvn_subr/io-test.c
(original)
+++ subversion/branches/authzperf/subversion/tests/libsvn_subr/io-test.c Sat
Jan 3 14:00:41 2015
@@ -561,7 +561,7 @@ aligned_seek(apr_file_t *file,
/* we must be at the desired offset */
current = 0;
- SVN_ERR(svn_io_file_seek(file, SEEK_CUR, ¤t, pool));
+ SVN_ERR(svn_io_file_seek(file, APR_CUR, ¤t, pool));
SVN_TEST_ASSERT(current == (apr_off_t)offset);
return SVN_NO_ERROR;
Modified:
subversion/branches/authzperf/subversion/tests/libsvn_subr/mergeinfo-test.c
URL:
http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/tests/libsvn_subr/mergeinfo-test.c?rev=1649205&r1=1649204&r2=1649205&view=diff
==============================================================================
--- subversion/branches/authzperf/subversion/tests/libsvn_subr/mergeinfo-test.c
(original)
+++ subversion/branches/authzperf/subversion/tests/libsvn_subr/mergeinfo-test.c
Sat Jan 3 14:00:41 2015
@@ -114,7 +114,7 @@ verify_mergeinfo_parse(const char *input
}
-#define NBR_MERGEINFO_VALS 24
+#define NBR_MERGEINFO_VALS 25
/* Valid mergeinfo values. */
static const char * const mergeinfo_vals[NBR_MERGEINFO_VALS] =
@@ -148,7 +148,8 @@ static const char * const mergeinfo_vals
"/A/:7-8",
"/A///:7-8",
"/A/.:7-8",
- "/A/./B:7-8"
+ "/A/./B:7-8",
+ ":7-8",
};
/* Paths corresponding to mergeinfo_vals. */
static const char * const mergeinfo_paths[NBR_MERGEINFO_VALS] =
@@ -181,7 +182,8 @@ static const char * const mergeinfo_path
"/A",
"/A",
"/A",
- "/A/B"
+ "/A/B",
+ "/",
};
/* First ranges from the paths identified by mergeinfo_paths. */
static svn_merge_range_t mergeinfo_ranges[NBR_MERGEINFO_VALS][MAX_NBR_RANGES] =
@@ -212,6 +214,7 @@ static svn_merge_range_t mergeinfo_range
{ {6, 8, TRUE} },
{ {6, 8, TRUE} },
{ {6, 8, TRUE} },
+ { {6, 8, TRUE} },
};
static svn_error_t *
@@ -298,7 +301,7 @@ test_parse_combine_rangeinfo(apr_pool_t
}
-#define NBR_BROKEN_MERGEINFO_VALS 27
+#define NBR_BROKEN_MERGEINFO_VALS 26
/* Invalid mergeinfo values. */
static const char * const broken_mergeinfo_vals[NBR_BROKEN_MERGEINFO_VALS] =
{
@@ -330,8 +333,6 @@ static const char * const broken_mergein
"/trunk:",
"/trunk:2-9\n/branch:",
"::",
- /* No path */
- ":1-3",
/* Invalid revisions */
"trunk:a-3",
"branch:3-four",
Modified: subversion/branches/authzperf/subversion/tests/libsvn_subr/skel-test.c
URL:
http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/tests/libsvn_subr/skel-test.c?rev=1649205&r1=1649204&r2=1649205&view=diff
==============================================================================
--- subversion/branches/authzperf/subversion/tests/libsvn_subr/skel-test.c
(original)
+++ subversion/branches/authzperf/subversion/tests/libsvn_subr/skel-test.c Sat
Jan 3 14:00:41 2015
@@ -59,7 +59,7 @@ get_empty_string(apr_pool_t *pool)
{
svn_pool_clear(pool);
- return svn_stringbuf_ncreate(0, 0, pool);
+ return svn_stringbuf_create_empty(pool);
}
/* Parse a skeleton from a Subversion string. */
Modified:
subversion/branches/authzperf/subversion/tests/libsvn_subr/stream-test.c
URL:
http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/tests/libsvn_subr/stream-test.c?rev=1649205&r1=1649204&r2=1649205&view=diff
==============================================================================
--- subversion/branches/authzperf/subversion/tests/libsvn_subr/stream-test.c
(original)
+++ subversion/branches/authzperf/subversion/tests/libsvn_subr/stream-test.c
Sat Jan 3 14:00:41 2015
@@ -771,6 +771,38 @@ test_stringbuf_from_stream(apr_pool_t *p
return SVN_NO_ERROR;
}
+static svn_error_t *
+empty_read_full_fn(void *baton, char *buffer, apr_size_t *len)
+{
+ *len = 0;
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+test_stream_compressed_read_full(apr_pool_t *pool)
+{
+ svn_stream_t *stream, *empty_stream;
+ char buf[1];
+ apr_size_t len;
+
+ /* Reading an empty stream with read_full only support should not error. */
+ empty_stream = svn_stream_create(NULL, pool);
+
+ /* Create stream with only full read support. */
+ svn_stream_set_read2(empty_stream, NULL, empty_read_full_fn);
+
+ stream = svn_stream_compressed(empty_stream, pool);
+ len = sizeof(buf);
+ SVN_ERR(svn_stream_read_full(stream, buf, &len));
+ if (len > 0)
+ return svn_error_create(SVN_ERR_TEST_FAILED, NULL,
+ "Got unexpected result.");
+
+ SVN_ERR(svn_stream_close(stream));
+
+ return SVN_NO_ERROR;
+}
+
/* The test table. */
static int max_threads = 1;
@@ -800,6 +832,8 @@ static struct svn_test_descriptor_t test
"base64 decoding allocation problem"),
SVN_TEST_PASS2(test_stringbuf_from_stream,
"test svn_stringbuf_from_stream"),
+ SVN_TEST_PASS2(test_stream_compressed_read_full,
+ "test compression for streams without partial read"),
SVN_TEST_NULL
};
Modified: subversion/branches/authzperf/subversion/tests/libsvn_wc/wc-test.c
URL:
http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/tests/libsvn_wc/wc-test.c?rev=1649205&r1=1649204&r2=1649205&view=diff
==============================================================================
--- subversion/branches/authzperf/subversion/tests/libsvn_wc/wc-test.c
(original)
+++ subversion/branches/authzperf/subversion/tests/libsvn_wc/wc-test.c Sat Jan
3 14:00:41 2015
@@ -23,6 +23,9 @@
#include <apr_pools.h>
#include <apr_general.h>
+#include <apr_md5.h>
+
+#define SVN_DEPRECATED
#include "svn_types.h"
#include "svn_io.h"
@@ -138,7 +141,6 @@ test_node_get_base(const svn_test_opts_t
NULL,
b->wc_ctx, local_abspath,
TRUE /* ignore_enoent */,
- FALSE /* show_hidden */,
b->pool, b->pool));
SVN_TEST_ASSERT(revision == subtest->base_rev);
if (SVN_IS_VALID_REVNUM(subtest->base_rev))
@@ -305,6 +307,132 @@ test_externals_parse_erratic(apr_pool_t
return SVN_NO_ERROR;
}
+static svn_error_t *
+test_legacy_commit1(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+ svn_test__sandbox_t b;
+ svn_wc_adm_access_t *adm_access;
+ const char *lambda;
+
+ SVN_ERR(svn_test__sandbox_create(&b, "legacy_commit1", opts, pool));
+ SVN_ERR(sbox_add_and_commit_greek_tree(&b));
+
+ SVN_ERR(sbox_wc_copy(&b, "A", "A_copied"));
+
+ lambda = sbox_wc_path(&b, "A_copied/B/lambda");
+
+
+ SVN_ERR(svn_io_remove_file2(lambda, FALSE, pool));
+ SVN_ERR(svn_io_copy_file(sbox_wc_path(&b, "iota"), lambda, FALSE, pool));
+ SVN_ERR(svn_wc_adm_open3(&adm_access, NULL, b.wc_abspath, TRUE, -1,
+ NULL, NULL, pool));
+
+ {
+ svn_wc_status2_t *status;
+
+ SVN_ERR(svn_wc_status2(&status, lambda, adm_access, pool));
+
+ SVN_TEST_ASSERT(status != NULL);
+ SVN_TEST_ASSERT(status->text_status == svn_wc_status_modified);
+ SVN_TEST_ASSERT(status->copied == TRUE);
+ }
+
+ /* Simulate a very old style svn ci . -m "QQQ" on the WC root */
+ SVN_ERR(svn_wc_process_committed4(sbox_wc_path(&b, "A_copied"), adm_access,
+ TRUE, 12, "2014-10-01T19:00:50.966679Z",
+ "me", NULL, TRUE, TRUE,
+ NULL, pool));
+
+ {
+ unsigned char digest[APR_MD5_DIGESTSIZE];
+
+ /* Use the fact that iota has the same checksum to ease committing */
+
+ SVN_ERR(svn_io_file_checksum (digest, lambda, pool));
+
+ SVN_ERR(svn_wc_process_committed4(lambda, adm_access,
+ TRUE, 12, "2014-10-01T19:00:50.966679Z",
+ "me", NULL, TRUE, TRUE,
+ digest, pool));
+ }
+
+ {
+ svn_wc_status2_t *status;
+
+ SVN_ERR(svn_wc_status2(&status, lambda, adm_access, pool));
+
+ /* Node is still modified, as we didn't change the text base! */
+ SVN_TEST_ASSERT(status != NULL);
+ SVN_TEST_ASSERT(status->text_status == svn_wc_status_normal);
+ SVN_TEST_ASSERT(status->copied == FALSE);
+ }
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+test_legacy_commit2(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+ svn_test__sandbox_t b;
+ svn_wc_adm_access_t *adm_access;
+ const char *lambda;
+ svn_wc_committed_queue_t *queue;
+
+ SVN_ERR(svn_test__sandbox_create(&b, "legacy_commit2", opts, pool));
+ SVN_ERR(sbox_add_and_commit_greek_tree(&b));
+
+ SVN_ERR(sbox_wc_copy(&b, "A", "A_copied"));
+
+ lambda = sbox_wc_path(&b, "A_copied/B/lambda");
+
+ SVN_ERR(svn_io_remove_file2(lambda, FALSE, pool));
+ SVN_ERR(svn_io_copy_file(sbox_wc_path(&b, "iota"), lambda, FALSE, pool));
+
+ SVN_ERR(svn_wc_adm_open3(&adm_access, NULL, b.wc_abspath, TRUE, -1,
+ NULL, NULL, pool));
+
+ {
+ svn_wc_status2_t *status;
+
+ SVN_ERR(svn_wc_status2(&status, lambda, adm_access, pool));
+
+ SVN_TEST_ASSERT(status != NULL);
+ SVN_TEST_ASSERT(status->text_status == svn_wc_status_modified);
+ SVN_TEST_ASSERT(status->copied == TRUE);
+ }
+
+ /* Simulate an old style svn ci . -m "QQQ" on the WC root */
+ queue = svn_wc_committed_queue_create(pool);
+ SVN_ERR(svn_wc_queue_committed(&queue, sbox_wc_path(&b, "A_copied"),
adm_access,
+ TRUE, NULL, FALSE, FALSE, NULL, pool));
+ {
+ unsigned char digest[APR_MD5_DIGESTSIZE];
+
+ /* Use the fact that iota has the same checksum to ease committing */
+
+ SVN_ERR(svn_io_file_checksum(digest, lambda, pool));
+
+ SVN_ERR(svn_wc_queue_committed(&queue, lambda, adm_access, FALSE, NULL,
+ FALSE, FALSE, digest, pool));
+ }
+
+ SVN_ERR(svn_wc_process_committed_queue(queue, adm_access,
+ 12, "2014-10-01T19:00:50.966679Z",
+ "me", pool));
+
+ {
+ svn_wc_status2_t *status;
+
+ SVN_ERR(svn_wc_status2(&status, lambda, adm_access, pool));
+
+ /* Node is still modified, as we didn't change the text base! */
+ SVN_TEST_ASSERT(status != NULL);
+ SVN_TEST_ASSERT(status->text_status == svn_wc_status_normal);
+ SVN_TEST_ASSERT(status->copied == FALSE);
+ }
+
+ return SVN_NO_ERROR;
+}
/* ---------------------------------------------------------------------- */
/* The list of test functions */
@@ -322,6 +450,10 @@ static struct svn_test_descriptor_t test
"test svn_wc_parse_externals_description3"),
SVN_TEST_PASS2(test_externals_parse_erratic,
"parse erratic externals definition"),
+ SVN_TEST_OPTS_PASS(test_legacy_commit1,
+ "test legacy commit1"),
+ SVN_TEST_OPTS_PASS(test_legacy_commit2,
+ "test legacy commit2"),
SVN_TEST_NULL
};
Propchange: subversion/branches/authzperf/subversion/tests/manual/README
------------------------------------------------------------------------------
svn:eol-style = native
Modified: subversion/branches/authzperf/subversion/tests/svn_test.h
URL:
http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/tests/svn_test.h?rev=1649205&r1=1649204&r2=1649205&view=diff
==============================================================================
--- subversion/branches/authzperf/subversion/tests/svn_test.h (original)
+++ subversion/branches/authzperf/subversion/tests/svn_test.h Sat Jan 3
14:00:41 2015
@@ -74,6 +74,23 @@ extern "C" {
svn_error_clear(err__); \
} while (0)
+/** Handy macro for testing that an svn_error_t is returned.
+ * The result must be neither SVN_NO_ERROR nor SVN_ERR_ASSERTION_FAIL.
+ * The error returned by EXPR will be cleared.
+ */
+#define SVN_TEST_ASSERT_ANY_ERROR(expr) \
+ do { \
+ svn_error_t *err__ = (expr); \
+ if (err__ == SVN_NO_ERROR || err__->apr_err == SVN_ERR_ASSERTION_FAIL)\
+ return err__ ? svn_error_createf(SVN_ERR_TEST_FAILED, err__, \
+ "Expected error but got %s", \
+ "SVN_ERR_ASSERTION_FAIL") \
+ : svn_error_createf(SVN_ERR_TEST_FAILED, err__, \
+ "Expected error but got %s", \
+ "SVN_NO_ERROR"); \
+ svn_error_clear(err__); \
+ } while (0)
+
/** Handy macro for testing string equality.
*
* EXPR and/or EXPECTED_EXPR may be NULL which compares equal to NULL and
Modified: subversion/branches/authzperf/subversion/tests/svn_test_fs.c
URL:
http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/tests/svn_test_fs.c?rev=1649205&r1=1649204&r2=1649205&view=diff
==============================================================================
--- subversion/branches/authzperf/subversion/tests/svn_test_fs.c (original)
+++ subversion/branches/authzperf/subversion/tests/svn_test_fs.c Sat Jan 3
14:00:41 2015
@@ -104,10 +104,14 @@ create_fs(svn_fs_t **fs_p,
const char *name,
const char *fs_type,
int server_minor_version,
+ apr_hash_t *overlay_fs_config,
apr_pool_t *pool)
{
apr_hash_t *fs_config = make_fs_config(fs_type, server_minor_version, pool);
+ if (overlay_fs_config)
+ fs_config = apr_hash_overlay(pool, overlay_fs_config, fs_config);
+
/* If there's already a repository named NAME, delete it. Doing
things this way means that repositories stick around after a
failure for postmortem analysis, but also that tests can be
@@ -172,20 +176,21 @@ svn_test__create_bdb_fs(svn_fs_t **fs_p,
const svn_test_opts_t *opts,
apr_pool_t *pool)
{
- return create_fs(fs_p, name, "bdb", opts->server_minor_version, pool);
+ return create_fs(fs_p, name, "bdb", opts->server_minor_version, NULL, pool);
}
svn_error_t *
-svn_test__create_fs(svn_fs_t **fs_p,
- const char *name,
- const svn_test_opts_t *opts,
- apr_pool_t *pool)
+svn_test__create_fs2(svn_fs_t **fs_p,
+ const char *name,
+ const svn_test_opts_t *opts,
+ apr_hash_t *fs_config,
+ apr_pool_t *pool)
{
svn_boolean_t must_reopen;
- SVN_ERR(create_fs(fs_p, name, opts->fs_type,
- opts->server_minor_version, pool));
+ SVN_ERR(create_fs(fs_p, name, opts->fs_type, opts->server_minor_version,
+ fs_config, pool));
SVN_ERR(maybe_install_fs_conf(*fs_p, opts, &must_reopen, pool));
if (must_reopen)
@@ -197,6 +202,14 @@ svn_test__create_fs(svn_fs_t **fs_p,
return SVN_NO_ERROR;
}
+svn_error_t *
+svn_test__create_fs(svn_fs_t **fs_p,
+ const char *name,
+ const svn_test_opts_t *opts,
+ apr_pool_t *pool)
+{
+ return svn_test__create_fs2(fs_p, name, opts, NULL, pool);
+}
svn_error_t *
svn_test__create_repos(svn_repos_t **repos_p,
@@ -358,10 +371,19 @@ validate_tree_entry(svn_fs_root_t *root,
{
svn_stream_t *rstream;
svn_stringbuf_t *rstring;
- svn_boolean_t is_dir;
+ svn_node_kind_t kind;
+ svn_boolean_t is_dir, is_file;
- /* Verify that this is the expected type of node */
+ /* Verify that node types are reported consistently. */
+ SVN_ERR(svn_fs_check_path(&kind, root, path, pool));
SVN_ERR(svn_fs_is_dir(&is_dir, root, path, pool));
+ SVN_ERR(svn_fs_is_file(&is_file, root, path, pool));
+
+ SVN_TEST_ASSERT(!is_dir || kind == svn_node_dir);
+ SVN_TEST_ASSERT(!is_file || kind == svn_node_file);
+ SVN_TEST_ASSERT(is_dir || is_file);
+
+ /* Verify that this is the expected type of node */
if ((!is_dir && !contents) || (is_dir && contents))
return svn_error_createf
(SVN_ERR_FS_GENERAL, NULL,
@@ -371,10 +393,17 @@ validate_tree_entry(svn_fs_root_t *root,
/* Verify that the contents are as expected (files only) */
if (! is_dir)
{
+ svn_stringbuf_t *expected = svn_stringbuf_create(contents, pool);
+
+ /* File lengths. */
+ svn_filesize_t length;
+ SVN_ERR(svn_fs_file_length(&length, root, path, pool));
+ SVN_TEST_ASSERT(expected->len == length);
+
+ /* Text contents. */
SVN_ERR(svn_fs_file_contents(&rstream, root, path, pool));
SVN_ERR(svn_test__stream_to_string(&rstring, rstream, pool));
- if (! svn_stringbuf_compare(rstring,
- svn_stringbuf_create(contents, pool)))
+ if (! svn_stringbuf_compare(rstring, expected))
return svn_error_createf
(SVN_ERR_FS_GENERAL, NULL,
"node '%s' in tree had unexpected contents",
@@ -404,6 +433,9 @@ svn_test__validate_tree(svn_fs_root_t *r
apr_hash_index_t *hi;
int i;
+ /* There should be no entry with this name. */
+ const char *na_name = "es-vee-en";
+
/* Create a hash for storing our expected entries */
expected_entries = apr_hash_make(subpool);
@@ -492,6 +524,23 @@ svn_test__validate_tree(svn_fs_root_t *r
svn_stringbuf_appendcstr(extra_entries, "\n");
}
+ /* Test that non-existent paths will not be found.
+ * Skip this test if somebody sneakily added NA_NAME. */
+ if (!svn_hash_gets(expected_entries, na_name))
+ {
+ svn_node_kind_t kind;
+ svn_boolean_t is_dir, is_file;
+
+ /* Verify that the node is reported as "n/a". */
+ SVN_ERR(svn_fs_check_path(&kind, root, na_name, subpool));
+ SVN_ERR(svn_fs_is_dir(&is_dir, root, na_name, subpool));
+ SVN_ERR(svn_fs_is_file(&is_file, root, na_name, subpool));
+
+ SVN_TEST_ASSERT(kind == svn_node_none);
+ SVN_TEST_ASSERT(!is_file);
+ SVN_TEST_ASSERT(!is_dir);
+ }
+
if (missing_entries || extra_entries || corrupt_entries)
{
return svn_error_createf
Modified: subversion/branches/authzperf/subversion/tests/svn_test_fs.h
URL:
http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/tests/svn_test_fs.h?rev=1649205&r1=1649204&r2=1649205&view=diff
==============================================================================
--- subversion/branches/authzperf/subversion/tests/svn_test_fs.h (original)
+++ subversion/branches/authzperf/subversion/tests/svn_test_fs.h Sat Jan 3
14:00:41 2015
@@ -57,7 +57,16 @@ svn_test__create_bdb_fs(svn_fs_t **fs_p,
/* Create a filesystem based on OPTS in a subdir NAME and return a new
- FS object which points to it. */
+ FS object which points to it. Override the default test filesystem
+ config with values from FS_CONFIG. */
+svn_error_t *
+svn_test__create_fs2(svn_fs_t **fs_p,
+ const char *name,
+ const svn_test_opts_t *opts,
+ apr_hash_t *fs_config,
+ apr_pool_t *pool);
+
+/* The same as svn_test__create_fs2() but with FS_CONFIG set to NULL. */
svn_error_t *
svn_test__create_fs(svn_fs_t **fs_p,
const char *name,
Modified:
subversion/branches/authzperf/subversion/tests/templates/greek-fsfs-v6.zip
URL:
http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/tests/templates/greek-fsfs-v6.zip?rev=1649205&r1=1649204&r2=1649205&view=diff
==============================================================================
Binary files - no diff available.
Modified:
subversion/branches/authzperf/tools/buildbot/slaves/svn-sparc-solaris/svnbuild.sh
URL:
http://svn.apache.org/viewvc/subversion/branches/authzperf/tools/buildbot/slaves/svn-sparc-solaris/svnbuild.sh?rev=1649205&r1=1649204&r2=1649205&view=diff
==============================================================================
---
subversion/branches/authzperf/tools/buildbot/slaves/svn-sparc-solaris/svnbuild.sh
(original)
+++
subversion/branches/authzperf/tools/buildbot/slaves/svn-sparc-solaris/svnbuild.sh
Sat Jan 3 14:00:41 2015
@@ -28,9 +28,10 @@ SVN_VER_MINOR=`awk '/define SVN_VER_MINO
cd ../obj
grep obj/subversion/tests /etc/mnttab > /dev/null || mount-tmpfs
-if [ $SVN_VER_MINOR -eq 8 ]; then
- # A bug causes 1.8 --enable-optimize to add -flto which isn't supported
- OPTIONS_1_8='--disable-optimize'
+# --enable-optimize adds -flto which breaks the 1.8 C tests because
+# they link main() from a library.
+if [ $SVN_VER_MINOR -gt 8 ]; then
+ OPTIMIZE_OPTION='--enable-optimize'
fi
echo "============ configure"
@@ -42,7 +43,7 @@ echo "============ configure"
--with-sqlite=/export/home/wandisco/buildbot/sqlite-amalgamation-3071501/sqlite3.c
\
--enable-optimize \
--disable-shared \
- $OPTIONS_1_8 \
+ $OPTIMIZE_OPTION \
|| exit $?
echo "============ make"
Modified:
subversion/branches/authzperf/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd
URL:
http://svn.apache.org/viewvc/subversion/branches/authzperf/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd?rev=1649205&r1=1649204&r2=1649205&view=diff
==============================================================================
---
subversion/branches/authzperf/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd
(original)
+++
subversion/branches/authzperf/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd
Sat Jan 3 14:00:41 2015
@@ -75,7 +75,7 @@ if "%SVN_BRANCH%" GTR "1.9." (
IF ERRORLEVEL 1 (
echo [Perl tests reported error !ERRORLEVEL!] 1>&2
- REM SET result=1
+ SET result=1
) ELSE (
echo Done.
)
Modified: subversion/branches/authzperf/tools/client-side/bash_completion
URL:
http://svn.apache.org/viewvc/subversion/branches/authzperf/tools/client-side/bash_completion?rev=1649205&r1=1649204&r2=1649205&view=diff
==============================================================================
--- subversion/branches/authzperf/tools/client-side/bash_completion (original)
+++ subversion/branches/authzperf/tools/client-side/bash_completion Sat Jan 3
14:00:41 2015
@@ -1038,7 +1038,8 @@ _svnadmin ()
cur=${COMP_WORDS[COMP_CWORD]}
# Possible expansions, without pure-prefix abbreviations such as "h".
- cmds='crashtest create deltify dump freeze help hotcopy info
list-dblogs \
+ cmds='crashtest create delrevprop deltify dump freeze help hotcopy \
+ info list-dblogs \
list-unused-dblogs load lock lslocks lstxns pack recover rmlocks \
rmtxns setlog setrevprop setuuid unlock upgrade verify --version'
@@ -1101,8 +1102,9 @@ _svnadmin ()
setlog)
cmdOpts="-r --revision --bypass-hooks"
;;
- setrevprop)
- cmdOpts="-r --revision --use-pre-revprop-change-hook \
+ setrevprop|delrevprop)
+ cmdOpts="-r --revision -t --transaction \
+ --use-pre-revprop-change-hook \
--use-post-revprop-change-hook"
;;
verify)
@@ -1134,6 +1136,8 @@ _svnadmin ()
--help) cmdOpts=${cmdOpts/ -h / } ;;
-r) cmdOpts=${cmdOpts/ --revision / } ;;
--revision) cmdOpts=${cmdOpts/ -r / } ;;
+ -t) cmdOpts=${cmdOpts/ --transaction / } ;;
+ --transaction) cmdOpts=${cmdOpts/ -t / } ;;
-F) cmdOpts=${cmdOpts/ --file / } ;;
--file) cmdOpts=${cmdOpts/ -F / } ;;
-M) cmdOpts=${cmdOpts/ --memory-cache-size / } ;;
Modified: subversion/branches/authzperf/tools/dev/fsfs-access-map.c
URL:
http://svn.apache.org/viewvc/subversion/branches/authzperf/tools/dev/fsfs-access-map.c?rev=1649205&r1=1649204&r2=1649205&view=diff
==============================================================================
--- subversion/branches/authzperf/tools/dev/fsfs-access-map.c (original)
+++ subversion/branches/authzperf/tools/dev/fsfs-access-map.c Sat Jan 3
14:00:41 2015
@@ -168,7 +168,7 @@ open_file(const char *name, int handle)
if (!file)
{
apr_pool_t *pool = apr_hash_pool_get(files);
- apr_pool_t *sub_pool = svn_pool_create(pool);
+ apr_pool_t *subpool = svn_pool_create(pool);
apr_file_t *apr_file = NULL;
apr_finfo_t finfo = { 0 };
@@ -176,10 +176,10 @@ open_file(const char *name, int handle)
/* determine file size (if file still exists) */
apr_file_open(&apr_file, name,
- APR_READ | APR_BUFFERED, APR_OS_DEFAULT, sub_pool);
+ APR_READ | APR_BUFFERED, APR_OS_DEFAULT, subpool);
if (apr_file)
apr_file_info_get(&finfo, APR_FINFO_SIZE, apr_file);
- svn_pool_destroy(sub_pool);
+ svn_pool_destroy(subpool);
file = apr_pcalloc(pool, sizeof(*file));
file->name = apr_pstrdup(pool, name);
@@ -353,7 +353,7 @@ static void
parse_file(apr_file_t *file)
{
apr_pool_t *pool = svn_pool_create(NULL);
- apr_pool_t *iter_pool = svn_pool_create(pool);
+ apr_pool_t *iterpool = svn_pool_create(pool);
/* limit lines to 4k (usually, we need less than 200 bytes) */
svn_stringbuf_t *line = svn_stringbuf_create_ensure(4096, pool);
@@ -363,13 +363,13 @@ parse_file(apr_file_t *file)
svn_error_t *err = NULL;
line->len = line->blocksize-1;
- err = svn_io_read_length_line(file, line->data, &line->len, iter_pool);
+ err = svn_io_read_length_line(file, line->data, &line->len, iterpool);
svn_error_clear(err);
if (err)
break;
parse_line(line);
- svn_pool_clear(iter_pool);
+ svn_pool_clear(iterpool);
}
while (line->len > 0);
}
Modified: subversion/branches/authzperf/tools/dev/unix-build/Makefile.svn
URL:
http://svn.apache.org/viewvc/subversion/branches/authzperf/tools/dev/unix-build/Makefile.svn?rev=1649205&r1=1649204&r2=1649205&view=diff
==============================================================================
--- subversion/branches/authzperf/tools/dev/unix-build/Makefile.svn (original)
+++ subversion/branches/authzperf/tools/dev/unix-build/Makefile.svn Sat Jan 3
14:00:41 2015
@@ -72,9 +72,9 @@ APR_VER = 1.5.1
APR_ICONV_VER = 1.2.1
GNU_ICONV_VER = 1.14
APR_UTIL_VER = 1.5.3
-HTTPD_VER = 2.2.27
+HTTPD_VER = 2.2.29
NEON_VER = 0.30.0
-SERF_VER = 1.3.7
+SERF_VER = 1.3.8
SERF_OLD_VER = 0.3.1
CYRUS_SASL_VER = 2.1.25
SQLITE_VER = 3080500
@@ -91,7 +91,7 @@ GNU_ICONV_DIST = libiconv-$(GNU_ICONV_VE
NEON_DIST = neon-$(NEON_VER).tar.gz
SQLITE_DIST = sqlite-autoconf-$(SQLITE_VER).tar.gz
CYRUS_SASL_DIST = cyrus-sasl-$(CYRUS_SASL_VER).tar.gz
-HTTPD_DIST = httpd-$(HTTPD_VER).tar.bz2
+HTTPD_DIST = httpd-$(HTTPD_VER).tar.gz
LIBMAGIC_DIST = file-$(LIBMAGIC_VER).tar.gz
RUBY_DIST = ruby-$(RUBY_VER).tar.gz
BZ2_DIST = bzip2-$(BZ2_VER).tar.gz
@@ -102,7 +102,7 @@ GETTEXT_DIST = gettext-$(GETTEXT_VER).ta
SHA256_${BDB_DIST} =
f14fd96dd38915a1d63dcb94a63fbb8092334ceba6b5060760427096f631263e
SHA256_${APR_ICONV_DIST} =
19381959d50c4a5f3b9c84d594a5f9ffb3809786919b3058281f4c87e1f4b245
SHA256_${GNU_ICONV_DIST} =
72b24ded17d687193c3366d0ebe7cde1e6b18f0df8c55438ac95be39e8a30613
-SHA256_${HTTPD_DIST} =
205973ded6ca55c056ce9c84d73ab708f7829f330193bd39b651463b8d4f8147
+SHA256_${HTTPD_DIST} =
cec2878884b758b0d159a1385b2667a2ae0ca21b0bc7bcc8a9a41b5cfa5452ff
SHA256_${NEON_DIST} =
2962cfcb5d30f3272e3d2fa0e473434419770a3801afe3d46e5d1650787990c2
SHA256_${CYRUS_SASL_DIST} =
418c16e6240a4f9b637cbe3d62937b9675627bad27c622191d47de8686fe24fe
SHA256_${SQLITE_DIST} =
98c33abe4106e508e73fda648b2657ac9e969fe24695f543dcde68cc71f3091b
@@ -626,7 +626,7 @@ $(HTTPD_OBJDIR)/.retrieved: $(DISTDIR)/$
$(HTTPD_OBJDIR)/chil-engine.diff
$(call do_check_sha256,$(HTTPD_DIST))
[ -d $(HTTPD_OBJDIR) ] || mkdir -p $(HTTPD_OBJDIR)
- tar -C $(SRCDIR) -jxf $(DISTDIR)/$(HTTPD_DIST)
+ tar -C $(SRCDIR) -zxf $(DISTDIR)/$(HTTPD_DIST)
cd $(HTTPD_SRCDIR) && patch -p0 < $(HTTPD_OBJDIR)/chil-engine.diff
cp $(HTTPD_SRCDIR)/modules/ssl/ssl_toolkit_compat.h \
$(HTTPD_SRCDIR)/modules/ssl/ssl_toolkit_compat.h.orig
@@ -638,6 +638,14 @@ $(HTTPD_OBJDIR)/.retrieved: $(DISTDIR)/$
sed 's/^\(#if (OPENSSL_VERSION_NUMBER >= 0x00908000)\)$$/\1 \&\&
!defined(OPENSSL_NO_COMP)/' \
< $(HTTPD_SRCDIR)/modules/ssl/ssl_engine_vars.c.orig \
> $(HTTPD_SRCDIR)/modules/ssl/ssl_engine_vars.c
+ cp $(HTTPD_SRCDIR)/modules/ssl/ssl_engine_init.c \
+ $(HTTPD_SRCDIR)/modules/ssl/ssl_engine_init.c.orig
+ $(foreach f, ssl_engine_init.c ssl_util_ssl.c ssl_util_ssl.h, \
+ cp $(HTTPD_SRCDIR)/modules/ssl/${f}
$(HTTPD_SRCDIR)/modules/ssl/${f}.orig; \
+ sed
's/SSL_CTX_use_certificate_chain/_SSL_CTX_use_certificate_chain/' \
+ < $(HTTPD_SRCDIR)/modules/ssl/${f}.orig \
+ > $(HTTPD_SRCDIR)/modules/ssl/${f};\
+ )
touch $@
# configure httpd
@@ -1547,6 +1555,9 @@ endif
echo >>[email protected] 'RedirectMatch permanent
^/svn-test-work/repositories/REDIRECT-PERM-(.*)$$
/svn-test-work/repositories/$$1'
echo >>[email protected] 'RedirectMatch
^/svn-test-work/repositories/REDIRECT-TEMP-(.*)$$
/svn-test-work/repositories/$$1'
echo >>[email protected] 'Include "conf/$(SVN_REL_WC)*-custom.conf"'
+ echo >> [email protected] '#SVNInMemoryCacheSize 0'
+ echo >> [email protected] '#SVNCacheTextDeltas Off'
+ echo >> [email protected] '#SVNCacheRevProps Off'
mv -f [email protected] $@
.PHONY: libpath
Modified: subversion/branches/authzperf/tools/dist/release.py
URL:
http://svn.apache.org/viewvc/subversion/branches/authzperf/tools/dist/release.py?rev=1649205&r1=1649204&r2=1649205&view=diff
==============================================================================
--- subversion/branches/authzperf/tools/dist/release.py (original)
+++ subversion/branches/authzperf/tools/dist/release.py Sat Jan 3 14:00:41 2015
@@ -86,22 +86,22 @@ except AttributeError:
tool_versions = {
'trunk' : {
'autoconf' : '2.69',
- 'libtool' : '2.4.2',
+ 'libtool' : '2.4.3',
'swig' : '3.0.0',
},
'1.9' : {
'autoconf' : '2.69',
- 'libtool' : '2.4.2',
+ 'libtool' : '2.4.3',
'swig' : '3.0.0'
},
'1.8' : {
'autoconf' : '2.69',
- 'libtool' : '2.4.2',
+ 'libtool' : '2.4.3',
'swig' : '2.0.9',
},
'1.7' : {
'autoconf' : '2.68',
- 'libtool' : '2.4',
+ 'libtool' : '2.4.3',
'swig' : '2.0.4',
},
'1.6' : {
Modified:
subversion/branches/authzperf/tools/hook-scripts/mailer/tests/mailer-init.sh
URL:
http://svn.apache.org/viewvc/subversion/branches/authzperf/tools/hook-scripts/mailer/tests/mailer-init.sh?rev=1649205&r1=1649204&r2=1649205&view=diff
==============================================================================
---
subversion/branches/authzperf/tools/hook-scripts/mailer/tests/mailer-init.sh
(original)
+++
subversion/branches/authzperf/tools/hook-scripts/mailer/tests/mailer-init.sh
Sat Jan 3 14:00:41 2015
@@ -101,14 +101,14 @@ echo change C6 >> dir6/file4
svn commit -m "copy dir, then make a change"
# add a binary file and set property to binary value
-echo -e "\x00\x01\x02\x03\x04" > file11
+printf "\x00\x01\x02\x03\x04\n" > file11
svn add file11
svn ps svn:mime-type application/octect-stream file11
svn ps prop2 -F file11 file9
svn commit -m "add binary file"
# change the binary file and set property to non binary value
-echo -e "\x20\x01\x02\x20" > file11
+printf "\x20\x01\x02\x20\n" > file11
svn ps prop2 propval2 file9
svn commit -m "change binary file"
Modified: subversion/branches/authzperf/tools/server-side/svnpredumpfilter.py
URL:
http://svn.apache.org/viewvc/subversion/branches/authzperf/tools/server-side/svnpredumpfilter.py?rev=1649205&r1=1649204&r2=1649205&view=diff
==============================================================================
--- subversion/branches/authzperf/tools/server-side/svnpredumpfilter.py
(original)
+++ subversion/branches/authzperf/tools/server-side/svnpredumpfilter.py Sat Jan
3 14:00:41 2015
@@ -38,6 +38,10 @@ Use the default ordering of revisions (t
Return errorcode 0 if there are no additional dependencies found, 1 if
there were; any other errorcode indicates a fatal error.
+Paths in mergeinfo are not considered as additional dependencies so the
+--skip-missing-merge-sources option of 'svndumpfilter' may be required
+for successful filtering with the resulting path list.
+
Options:
--help (-h) Show this usage message and exit.
@@ -68,7 +72,7 @@ def sanitize_path(path):
def subsumes(path, maybe_child):
if path == maybe_child:
return True
- if maybe_child.find(path + '/') == 0:
+ if maybe_child.startswith(path + '/'):
return True
return False
@@ -117,20 +121,35 @@ def log(msg, min_verbosity):
class DependencyTracker:
def __init__(self, include_paths):
- self.include_paths = include_paths[:]
- self.dependent_paths = []
+ self.include_paths = set(include_paths)
+ self.dependent_paths = set()
def path_included(self, path):
- for include_path in self.include_paths + self.dependent_paths:
+ for include_path in self.include_paths | self.dependent_paths:
if subsumes(include_path, path):
return True
return False
- def handle_changes(self, path_copies):
- for path, copyfrom_path in path_copies.items():
- if self.path_included(path) and copyfrom_path:
- if not self.path_included(copyfrom_path):
- self.dependent_paths.append(copyfrom_path)
+ def include_missing_copies(self, path_copies):
+ while True:
+ log("Cross-checking %d included paths with %d copies "
+ "for missing path dependencies..." % (
+ len(self.include_paths) + len(self.dependent_paths),
+ len(path_copies)),
+ 1)
+ included_copies = []
+ for path, copyfrom_path in path_copies:
+ if self.path_included(path):
+ log("Adding copy '%s' -> '%s'" % (copyfrom_path, path), 1)
+ self.dependent_paths.add(copyfrom_path)
+ included_copies.append((path, copyfrom_path))
+ if not included_copies:
+ log("Found all missing path dependencies", 1)
+ break
+ for path, copyfrom_path in included_copies:
+ path_copies.remove((path, copyfrom_path))
+ log("Found %d new copy dependencies, need to re-check for more"
+ % len(included_copies), 1)
def readline(stream):
line = stream.readline()
@@ -151,7 +170,7 @@ def svn_log_stream_get_dependencies(stre
line_buf = None
last_revision = 0
eof = False
- path_copies = {}
+ path_copies = set()
found_changed_path = False
while not eof:
@@ -195,16 +214,15 @@ def svn_log_stream_get_dependencies(stre
except EOFError:
eof = True
break
- match = action_re.search(line)
+ match = copy_action_re.search(line)
if match:
found_changed_path = True
- match = copy_action_re.search(line)
- if match:
- path_copies[sanitize_path(match.group(1))] = \
- sanitize_path(match.group(2))
+ path_copies.add((sanitize_path(match.group(1)),
+ sanitize_path(match.group(2))))
+ elif action_re.search(line):
+ found_changed_path = True
else:
break
- dt.handle_changes(path_copies)
# Finally, skip any log message lines. (If there are none,
# remember the last line we read, because it probably has
@@ -221,6 +239,7 @@ def svn_log_stream_get_dependencies(stre
"'svn log' with the --verbose (-v) option when "
"generating the input to this script?")
+ dt.include_missing_copies(path_copies)
return dt
def analyze_logs(included_paths):
Modified: subversion/branches/authzperf/win-tests.py
URL:
http://svn.apache.org/viewvc/subversion/branches/authzperf/win-tests.py?rev=1649205&r1=1649204&r2=1649205&view=diff
==============================================================================
--- subversion/branches/authzperf/win-tests.py (original)
+++ subversion/branches/authzperf/win-tests.py Sat Jan 3 14:00:41 2015
@@ -866,6 +866,7 @@ elif test_swig == 'perl':
perl_exe = 'perl.exe'
print('-- Running Swig Perl tests --')
+ sys.stdout.flush()
old_cwd = os.getcwd()
try:
os.chdir(pm_src)
@@ -884,7 +885,6 @@ elif test_swig == 'perl':
if (r != 0):
print('[Test runner reported failure]')
failed = True
- sys.exit(1)
elif test_swig == 'python':
failed = False
swig_dir = os.path.join(abs_builddir, 'swig')
@@ -916,6 +916,7 @@ elif test_swig == 'python':
to_dir=swig_py_svn)
print('-- Running Swig Python tests --')
+ sys.stdout.flush()
pythonpath = swig_py_dir
if 'PYTHONPATH' in os.environ:
@@ -954,6 +955,7 @@ elif test_swig == 'ruby':
]
print('-- Running Swig Ruby tests --')
+ sys.stdout.flush()
old_cwd = os.getcwd()
try:
os.chdir(ruby_subdir)