You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2014/08/04 11:09:58 UTC
svn commit: r1615515 [4/4] - in /subversion/branches/authzperf: ./
subversion/bindings/javahl/native/ subversion/bindings/swig/python/svn/
subversion/include/ subversion/include/private/ subversion/libsvn_client/
subversion/libsvn_delta/ subversion/lib...
Modified: subversion/branches/authzperf/subversion/tests/libsvn_repos/repos-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/tests/libsvn_repos/repos-test.c?rev=1615515&r1=1615514&r2=1615515&view=diff
==============================================================================
--- subversion/branches/authzperf/subversion/tests/libsvn_repos/repos-test.c (original)
+++ subversion/branches/authzperf/subversion/tests/libsvn_repos/repos-test.c Mon Aug 4 09:09:55 2014
@@ -1238,6 +1238,8 @@ authz(apr_pool_t *pool)
svn_error_t *err;
svn_boolean_t access_granted;
apr_pool_t *subpool = svn_pool_create(pool);
+ int i, k;
+ apr_time_t start, end;
/* Definition of the paths to test and expected replies for each. */
struct check_access_tests test_set[] = {
@@ -1387,6 +1389,80 @@ authz(apr_pool_t *pool)
SVN_TEST_ASSERT_ERROR(authz_get_handle(&authz_cfg, contents, FALSE, subpool),
SVN_ERR_AUTHZ_INVALID_CONFIG);
+ /* The authz rules for the phase 5 tests */
+ contents =
+ "[greek:*/A/*/G]" NL
+ "* =" NL
+ "" NL
+ "[greek:*/A/**/*a*]" NL
+ "* = r" NL
+ "" NL
+ "[greek:*/**/*a]" NL
+ "* = w" NL
+ "" NL
+ "[greek:*/A/**/g*]" NL
+ "* =" NL
+ "" NL
+ "[greek:*/**/lambda]" NL
+ "* = rw" NL;
+
+ /* Load the test authz rules. */
+ SVN_ERR(authz_get_handle(&authz_cfg, contents, FALSE, subpool));
+
+ start = apr_time_now();
+ for (k = 0; k < 100000; ++k)
+ for (i = 1; i < 4; ++i)
+ {
+ const char **path;
+ const char *paths[] =
+ { "/iota",
+ "/A",
+ "/A/mu",
+ "/A/B",
+ "/A/B/lambda",
+ "/A/B/E",
+ "/A/B/E/alpha",
+ "/A/B/E/beta",
+ "/A/B/F",
+ "/A/C",
+ "/A/D",
+ "/A/D/gamma",
+ "/A/D/G",
+ "/A/D/G/pi",
+ "/A/D/G/rho",
+ "/A/D/G/tau",
+ "/A/D/H",
+ "/A/D/H/chi",
+ "/A/D/H/psi",
+ "/A/D/H/omega",
+ NULL
+ };
+
+ for (path = paths; *path; ++path)
+ {
+ SVN_ERR(svn_repos_authz_check_access(authz_cfg, "greek",
+ *path, NULL, i,
+ &access_granted, subpool));
+/* if (access_granted)
+ printf("%i %s\n", i, *path);*/
+ }
+ }
+ end = apr_time_now();
+ printf("%ld\n", end - start);
+ printf("%ld\n", (k * (i - 1) * 20 * 1000000l) / (end - start));
+
+ /* Verify that the rule on /dir2/secret doesn't affect this
+ request */
+/* SVN_ERR(svn_repos_authz_check_access(authz_cfg, "greek",
+ "/dir", NULL,
+ (svn_authz_read
+ | svn_authz_recursive),
+ &access_granted, subpool));
+ if (!access_granted)
+ return svn_error_create(SVN_ERR_TEST_FAILED, NULL,
+ "Regression: incomplete ancestry test "
+ "for recursive access lookup.");
+*/
/* That's a wrap! */
svn_pool_destroy(subpool);
return SVN_NO_ERROR;
@@ -3179,6 +3255,25 @@ test_delete_repos(const svn_test_opts_t
return SVN_NO_ERROR;
}
+/* Prepare a commit for the filename_with_control_chars() tests */
+static svn_error_t *
+fwcc_prepare(const svn_delta_editor_t **editor_p,
+ void **edit_baton_p,
+ void **root_baton,
+ svn_repos_t *repos,
+ apr_pool_t *scratch_pool)
+{
+ /* Checks for control characters are implemented in the commit editor,
+ * not in the FS API. */
+ SVN_ERR(svn_repos_get_commit_editor4(editor_p, edit_baton_p, repos,
+ NULL, "file://test", "/",
+ "plato", "test commit",
+ dummy_commit_cb, NULL, NULL, NULL,
+ scratch_pool));
+ SVN_ERR((*editor_p)->open_root(*edit_baton_p, 1, scratch_pool, root_baton));
+ return SVN_NO_ERROR;
+}
+
/* Related to issue 4340, "filenames containing \n corrupt FSFS repositories" */
static svn_error_t *
filename_with_control_chars(const svn_test_opts_t *opts,
@@ -3218,17 +3313,6 @@ filename_with_control_chars(const svn_te
SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
svn_pool_clear(subpool);
- /* Checks for control characters are implemented in the commit editor,
- * not in the FS API. */
- SVN_ERR(svn_fs_begin_txn(&txn, fs, youngest_rev, pool));
- SVN_ERR(svn_repos_get_commit_editor4(&editor, &edit_baton, repos,
- txn, "file://test", "/",
- "plato", "test commit",
- dummy_commit_cb, NULL, NULL, NULL,
- pool));
-
- SVN_ERR(editor->open_root(edit_baton, 1, pool, &root_baton));
-
/* Attempt to copy /foo to a bad path P. This should fail. */
i = 0;
do
@@ -3237,8 +3321,13 @@ filename_with_control_chars(const svn_te
if (p == NULL)
break;
svn_pool_clear(subpool);
+
+ SVN_ERR(fwcc_prepare(&editor, &edit_baton, &root_baton, repos, subpool));
err = editor->add_directory(p, root_baton, "/foo", 1, subpool,
&out_baton);
+ if (!err)
+ err = editor->close_edit(edit_baton, subpool);
+ svn_error_clear(editor->abort_edit(edit_baton, subpool));
SVN_TEST_ASSERT_ERROR(err, SVN_ERR_FS_PATH_SYNTAX);
} while (p);
@@ -3250,8 +3339,13 @@ filename_with_control_chars(const svn_te
if (p == NULL)
break;
svn_pool_clear(subpool);
+
+ SVN_ERR(fwcc_prepare(&editor, &edit_baton, &root_baton, repos, subpool));
err = editor->add_file(p, root_baton, NULL, SVN_INVALID_REVNUM,
subpool, &out_baton);
+ if (!err)
+ err = editor->close_edit(edit_baton, subpool);
+ svn_error_clear(editor->abort_edit(edit_baton, subpool));
SVN_TEST_ASSERT_ERROR(err, SVN_ERR_FS_PATH_SYNTAX);
} while (p);
@@ -3264,13 +3358,16 @@ filename_with_control_chars(const svn_te
if (p == NULL)
break;
svn_pool_clear(subpool);
+
+ SVN_ERR(fwcc_prepare(&editor, &edit_baton, &root_baton, repos, subpool));
err = editor->add_directory(p, root_baton, NULL, SVN_INVALID_REVNUM,
subpool, &out_baton);
+ if (!err)
+ err = editor->close_edit(edit_baton, subpool);
+ svn_error_clear(editor->abort_edit(edit_baton, subpool));
SVN_TEST_ASSERT_ERROR(err, SVN_ERR_FS_PATH_SYNTAX);
} while (p);
- SVN_ERR(editor->abort_edit(edit_baton, subpool));
-
return SVN_NO_ERROR;
}
Modified: subversion/branches/authzperf/subversion/tests/libsvn_subr/dirent_uri-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/tests/libsvn_subr/dirent_uri-test.c?rev=1615515&r1=1615514&r2=1615515&view=diff
==============================================================================
--- subversion/branches/authzperf/subversion/tests/libsvn_subr/dirent_uri-test.c (original)
+++ subversion/branches/authzperf/subversion/tests/libsvn_subr/dirent_uri-test.c Mon Aug 4 09:09:55 2014
@@ -37,6 +37,7 @@
#include "svn_pools.h"
#include "svn_dirent_uri.h"
#include "private/svn_fspath.h"
+#include "private/svn_cert.h"
#include "../svn_test.h"
@@ -1987,8 +1988,8 @@ test_dirent_get_absolute_from_lc_drive(a
for (hi = apr_hash_first(pool, dirents); hi; hi = apr_hash_next(hi))
{
- const char *dir = svn__apr_hash_index_key(hi);
- svn_io_dirent2_t *de = svn__apr_hash_index_val(hi);
+ const char *dir = apr_hash_this_key(hi);
+ svn_io_dirent2_t *de = apr_hash_this_val(hi);
if (de->kind == svn_node_dir &&
strcmp(dir, current_dir_on_C))
@@ -2715,6 +2716,145 @@ test_fspath_get_longest_ancestor(apr_poo
return SVN_NO_ERROR;
}
+struct cert_match_dns_test {
+ const char *pattern;
+ const char *hostname;
+ svn_boolean_t expected;
+};
+
+static svn_error_t *
+run_cert_match_dns_tests(struct cert_match_dns_test *tests, apr_pool_t *pool)
+{
+ struct cert_match_dns_test *ct;
+ apr_pool_t *iterpool = svn_pool_create(pool);
+
+ for (ct = tests; ct->pattern; ct++)
+ {
+ svn_boolean_t result;
+ svn_string_t *pattern, *hostname;
+
+ svn_pool_clear(iterpool);
+
+ pattern = svn_string_create(ct->pattern, iterpool);
+ hostname = svn_string_create(ct->hostname, iterpool);
+
+ result = svn_cert__match_dns_identity(pattern, hostname);
+ if (result != ct->expected)
+ return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
+ "Expected %s but got %s for pattern '%s' on "
+ "hostname '%s'",
+ ct->expected ? "match" : "no match",
+ result ? "match" : "no match",
+ pattern->data, hostname->data);
+
+ }
+
+ svn_pool_destroy(iterpool);
+
+ return SVN_NO_ERROR;
+}
+
+static struct cert_match_dns_test cert_match_dns_tests[] = {
+ { "foo.example.com", "foo.example.com", TRUE }, /* exact match */
+ { "foo.example.com", "FOO.EXAMPLE.COM", TRUE }, /* case differences */
+ { "FOO.EXAMPLE.COM", "foo.example.com", TRUE },
+ { "*.example.com", "FoO.ExAmPlE.CoM", TRUE },
+ { "*.ExAmPlE.CoM", "foo.example.com", TRUE },
+ { "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz", TRUE },
+ { "abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", TRUE },
+ { "foo.example.com", "bar.example.com", FALSE }, /* difference at start */
+ { "foo.example.com", "foo.example.net", FALSE }, /* difference at end */
+ { "foo.example.com", "foo.example.commercial", FALSE }, /* hostname longer */
+ { "foo.example.commercial", "foo.example.com", FALSE }, /* pattern longer */
+ { "foo.example.comcom", "foo.example.com", FALSE }, /* repeated suffix */
+ { "foo.example.com", "foo.example.comcom", FALSE },
+ { "foo.example.com.com", "foo.example.com", FALSE },
+ { "foo.example.com", "foo.example.com.com", FALSE },
+ { "foofoo.example.com", "foo.example.com", FALSE }, /* repeated prefix */
+ { "foo.example.com", "foofoo.example.com", FALSE },
+ { "foo.foo.example.com", "foo.example.com", FALSE },
+ { "foo.example.com", "foo.foo.example.com", FALSE },
+ { "foo.*.example.com", "foo.bar.example.com", FALSE }, /* RFC 6125 s. 6.4.3
+ Rule 1 */
+ { "*.example.com", "foo.example.com", TRUE }, /* RFC 6125 s. 6.4.3 Rule 2 */
+ { "*.example.com", "bar.foo.example.com", FALSE }, /* Rule 2 */
+ { "*.example.com", "example.com", FALSE }, /* Rule 2 */
+ { "*.example.com", ".example.com", FALSE }, /* RFC doesn't say what to do
+ here and a leading period on
+ a hostname doesn't make sense
+ so we'll just reject this. */
+ { "*", "foo.example.com", FALSE }, /* wildcard must be left-most label,
+ implies that there must be more than
+ one label. */
+ { "*", "example.com", FALSE },
+ { "*", "com", FALSE },
+ { "*.example.com", "foo.example.net", FALSE }, /* difference in literal text
+ with a wildcard. */
+ { "*.com", "example.com", TRUE }, /* See Errata ID 3090 for RFC 6125,
+ probably shouldn't allow this but
+ we do for now. */
+ { "*.", "example.com", FALSE }, /* test some dubious 2 character wildcard
+ patterns */
+ { "*.", "example.", TRUE }, /* This one feels questionable */
+ { "*.", "example", FALSE },
+ { "*.", ".", FALSE },
+ { "a", "a", TRUE }, /* check that single letter exact matches work */
+ { "a", "b", FALSE }, /* and single letter not matches shouldn't */
+ { "*.*.com", "foo.example.com", FALSE }, /* unsupported wildcards */
+ { "*.*.com", "example.com", FALSE },
+ { "**.example.com", "foo.example.com", FALSE },
+ { "**.example.com", "example.com", FALSE },
+ { "f*.example.com", "foo.example.com", FALSE },
+ { "f*.example.com", "bar.example.com", FALSE },
+ { "*o.example.com", "foo.example.com", FALSE },
+ { "*o.example.com", "bar.example.com", FALSE },
+ { "f*o.example.com", "foo.example.com", FALSE },
+ { "f*o.example.com", "bar.example.com", FALSE },
+ { "foo.e*.com", "foo.example.com", FALSE },
+ { "foo.*e.com", "foo.example.com", FALSE },
+ { "foo.e*e.com", "foo.example.com", FALSE },
+ { "foo.example.com", "foo.example.com.", TRUE }, /* trailing dot */
+ { "*.example.com", "foo.example.com.", TRUE },
+ { "foo", "foo.", TRUE },
+ { "foo.example.com.", "foo.example.com", FALSE },
+ { "*.example.com.", "foo.example.com", FALSE },
+ { "foo.", "foo", FALSE },
+ { "foo.example.com", "foo.example.com..", FALSE },
+ { "*.example.com", "foo.example.com..", FALSE },
+ { "foo", "foo..", FALSE },
+ { "foo.example.com..", "foo.example.com", FALSE },
+ { "*.example.com..", "foo.example.com", FALSE },
+ { "foo..", "foo", FALSE },
+ { NULL }
+};
+
+static svn_error_t *
+test_cert_match_dns_identity(apr_pool_t *pool)
+{
+ return run_cert_match_dns_tests(cert_match_dns_tests, pool);
+}
+
+/* This test table implements results that should happen if we supported
+ * RFC 6125 s. 6.4.3 Rule 3. We don't so it's expected to fail for now. */
+static struct cert_match_dns_test rule3_tests[] = {
+ { "baz*.example.net", "baz1.example.net", TRUE },
+ { "*baz.example.net", "foobaz.example.net", TRUE },
+ { "b*z.example.net", "buuz.example.net", TRUE },
+ { "b*z.example.net", "bz.example.net", FALSE }, /* presume wildcard can't
+ match nothing */
+ { "baz*.example.net", "baz.example.net", FALSE },
+ { "*baz.example.net", "baz.example.net", FALSE },
+ { "b*z.example.net", "buuzuuz.example.net", TRUE }, /* presume wildcard
+ should be greedy */
+ { NULL }
+};
+
+static svn_error_t *
+test_rule3(apr_pool_t *pool)
+{
+ return run_cert_match_dns_tests(rule3_tests, pool);
+}
+
/* The test table. */
@@ -2815,6 +2955,10 @@ static struct svn_test_descriptor_t test
"test svn_fspath__dirname/basename/split"),
SVN_TEST_PASS2(test_fspath_get_longest_ancestor,
"test svn_fspath__get_longest_ancestor"),
+ SVN_TEST_PASS2(test_cert_match_dns_identity,
+ "test svn_cert__match_dns_identity"),
+ SVN_TEST_XFAIL2(test_rule3,
+ "test match with RFC 6125 s. 6.4.3 Rule 3"),
SVN_TEST_NULL
};
Modified: subversion/branches/authzperf/subversion/tests/libsvn_subr/named_atomic-test-common.h
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/tests/libsvn_subr/named_atomic-test-common.h?rev=1615515&r1=1615514&r2=1615515&view=diff
==============================================================================
--- subversion/branches/authzperf/subversion/tests/libsvn_subr/named_atomic-test-common.h (original)
+++ subversion/branches/authzperf/subversion/tests/libsvn_subr/named_atomic-test-common.h Mon Aug 4 09:09:55 2014
@@ -48,7 +48,8 @@ typedef struct watchdog_t
apr_time_t deadline;
svn_named_atomic__t *atomic_counter;
int iterations;
- int call_count; /* don't call apr_time_now() too often '*/
+ int call_count; /* don't call apr_time_now() too often '*/
+ svn_boolean_t throttle; /* TRUE -> we are using file locks for sync */
} watchdog_t;
/* init the WATCHDOG data structure for checking ATOMIC_COUNTER to reach
@@ -65,6 +66,7 @@ init_watchdog(watchdog_t *watchdog,
watchdog->atomic_counter = atomic_counter;
watchdog->iterations = iterations;
watchdog->call_count = 0;
+ watchdog->throttle = !svn_named_atomic__is_efficient();
}
/* test for watchdog conditions */
@@ -84,6 +86,12 @@ check_watchdog(watchdog_t *watchdog, svn
return SVN_NO_ERROR;
}
+ /* If we are using file locks for synchronization, our polling loops will
+ * simply hammering them instead of giving the system time to actually
+ * do something. So, slow down to get faster ... */
+ if (watchdog->throttle)
+ apr_sleep(1000);
+
/* Check the system time and indicate when deadline has passed */
if (++watchdog->call_count > 100)
{
@@ -154,8 +162,11 @@ test_pipeline_loop(svn_named_atomic__t *
do
{
SVN_ERR(svn_named_atomic__write(&value, 0, atomic_in));
- SVN_ERR(check_watchdog(watchdog, &done));
- if (done) return SVN_NO_ERROR;
+ if (!value)
+ {
+ SVN_ERR(check_watchdog(watchdog, &done));
+ if (done) return SVN_NO_ERROR;
+ }
}
while (value == 0);
@@ -170,8 +181,11 @@ test_pipeline_loop(svn_named_atomic__t *
value,
0,
atomic_out));
- SVN_ERR(check_watchdog(watchdog, &done));
- if (done) return SVN_NO_ERROR;
+ if (old_value)
+ {
+ SVN_ERR(check_watchdog(watchdog, &done));
+ if (done) return SVN_NO_ERROR;
+ }
}
while (old_value != 0);
Modified: subversion/branches/authzperf/subversion/tests/libsvn_wc/op-depth-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/tests/libsvn_wc/op-depth-test.c?rev=1615515&r1=1615514&r2=1615515&view=diff
==============================================================================
--- subversion/branches/authzperf/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/branches/authzperf/subversion/tests/libsvn_wc/op-depth-test.c Mon Aug 4 09:09:55 2014
@@ -441,7 +441,7 @@ check_db_conflicts(svn_test__sandbox_t *
for (hi = apr_hash_first(b->pool, found_hash); hi; hi = apr_hash_next(hi))
{
svn_skel_t *conflict;
- conflict_info_t *info = svn__apr_hash_index_val(hi);
+ conflict_info_t *info = apr_hash_this_val(hi);
const char *local_abspath;
svn_pool_clear(iterpool);
@@ -2050,7 +2050,7 @@ check_db_actual(svn_test__sandbox_t* b,
if (apr_hash_count(path_hash))
{
const char *local_relpath
- = svn__apr_hash_index_key(apr_hash_first(b->pool, path_hash));
+ = apr_hash_this_key(apr_hash_first(b->pool, path_hash));
return svn_error_createf(SVN_ERR_TEST_FAILED, svn_sqlite__reset(stmt),
"actual '%s' expected", local_relpath);
}
@@ -2651,7 +2651,7 @@ check_hash_keys(apr_hash_t *hash,
for (hi = apr_hash_first(scratch_pool, hash); hi;
hi = apr_hash_next(hi))
{
- const char *name = svn__apr_hash_index_key(hi);
+ const char *name = apr_hash_this_key(hi);
err = svn_error_compose_create(
err, svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
_("Found, not expected: '%s'"), name));
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=1615515&r1=1615514&r2=1615515&view=diff
==============================================================================
--- subversion/branches/authzperf/subversion/tests/svn_test_fs.c (original)
+++ subversion/branches/authzperf/subversion/tests/svn_test_fs.c Mon Aug 4 09:09:55 2014
@@ -548,23 +548,23 @@ svn_test__validate_changes(svn_fs_root_t
{
int i;
for (i=0, hi = apr_hash_first(pool, expected); hi; hi = apr_hash_next(hi))
- SVN_DBG(("expected[%d] = '%s'\n", i++, svn__apr_hash_index_key(hi)));
+ SVN_DBG(("expected[%d] = '%s'\n", i++, apr_hash_this_key(hi)));
for (i=0, hi = apr_hash_first(pool, actual); hi; hi = apr_hash_next(hi))
- SVN_DBG(("actual[%d] = '%s'\n", i++, svn__apr_hash_index_key(hi)));
+ SVN_DBG(("actual[%d] = '%s'\n", i++, apr_hash_this_key(hi)));
}
#endif
for (hi = apr_hash_first(pool, expected); hi; hi = apr_hash_next(hi))
- if (NULL == svn_hash_gets(actual, svn__apr_hash_index_key(hi)))
+ if (NULL == svn_hash_gets(actual, apr_hash_this_key(hi)))
return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
"Path '%s' missing from actual changed-paths",
- (const char *)svn__apr_hash_index_key(hi));
+ (const char *)apr_hash_this_key(hi));
for (hi = apr_hash_first(pool, actual); hi; hi = apr_hash_next(hi))
- if (NULL == svn_hash_gets(expected, svn__apr_hash_index_key(hi)))
+ if (NULL == svn_hash_gets(expected, apr_hash_this_key(hi)))
return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
"Path '%s' missing from expected changed-paths",
- (const char *)svn__apr_hash_index_key(hi));
+ (const char *)apr_hash_this_key(hi));
return SVN_NO_ERROR;
}
Modified: subversion/branches/authzperf/tools/client-side/svn-bench/null-info-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/tools/client-side/svn-bench/null-info-cmd.c?rev=1615515&r1=1615514&r2=1615515&view=diff
==============================================================================
--- subversion/branches/authzperf/tools/client-side/svn-bench/null-info-cmd.c (original)
+++ subversion/branches/authzperf/tools/client-side/svn-bench/null-info-cmd.c Mon Aug 4 09:09:55 2014
@@ -80,8 +80,8 @@ push_dir_info(svn_ra_session_t *ra_sessi
for (hi = apr_hash_first(pool, tmpdirents); hi; hi = apr_hash_next(hi))
{
const char *path;
- const char *name = svn__apr_hash_index_key(hi);
- svn_dirent_t *the_ent = svn__apr_hash_index_val(hi);
+ const char *name = apr_hash_this_key(hi);
+ svn_dirent_t *the_ent = apr_hash_this_val(hi);
svn_client__pathrev_t *child_pathrev;
svn_pool_clear(subpool);
Modified: subversion/branches/authzperf/tools/dev/build-svn-deps-win.pl
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/tools/dev/build-svn-deps-win.pl?rev=1615515&r1=1615514&r2=1615515&view=diff
==============================================================================
--- subversion/branches/authzperf/tools/dev/build-svn-deps-win.pl (original)
+++ subversion/branches/authzperf/tools/dev/build-svn-deps-win.pl Mon Aug 4 09:09:55 2014
@@ -85,10 +85,10 @@ our $APU_VER = '1.5.2'; # apr-util versi
our $API_VER = '1.2.1'; # arp-iconv version
our $ZLIB_VER = '1.2.8';
our $OPENSSL_VER = '1.0.1e';
-our $PCRE_VER = '8.32';
+our $PCRE_VER = '8.35';
our $BDB_VER = '5.3.21';
our $SQLITE_VER = '3071602';
-our $SERF_VER = '1.2.1';
+our $SERF_VER = '1.3.6';
our $NEON_VER = '0.29.6';
# Sources for files to download
@@ -177,7 +177,7 @@ sub set_defaults {
set_default(\$PCRE_URL, "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-$PCRE_VER.zip");
set_default(\$BDB_URL, "http://download.oracle.com/berkeley-db/db-5.3.21.zip");
set_default(\$SQLITE_URL, "http://www.sqlite.org/2013/sqlite-amalgamation-$SQLITE_VER.zip");
- set_default(\$SERF_URL, "http://serf.googlecode.com/files/serf-$SERF_VER.zip");
+ set_default(\$SERF_URL, "http://serf.googlecode.com/svn/src_releases/serf-$SERF_VER.zip");
set_default(\$NEON_URL, "http://www.webdav.org/neon/neon-$NEON_VER.tar.gz");
set_default(\$INSTDIR, $TOPDIR);
set_default(\$BLDDIR, "$TOPDIR\\build");
@@ -310,7 +310,10 @@ sub check_vs_ver {
my ($major_version) = $help_output =~ /Version (\d+)\./s;
if (defined($major_version)) {
- if ($major_version eq '11') {
+ if ($major_version eq '12') {
+ $VS_VER = '2013';
+ return;
+ } elsif ($major_version eq '11') {
$VS_VER = '2012';
return;
} elsif ($major_version eq '10') {
@@ -501,9 +504,10 @@ sub build_pcre {
my $pcre_generator = 'NMake Makefiles';
# Have to use RelWithDebInfo since httpd looks for the pdb files
my $pcre_build_type = '-DCMAKE_BUILD_TYPE:STRING=' . ($DEBUG ? 'Debug' : 'RelWithDebInfo');
+ my $pcre_options = '-DPCRE_NO_RECURSE:BOOL=ON';
my $pcre_shared_libs = '-DBUILD_SHARED_LIBS:BOOL=ON';
my $pcre_install_prefix = "-DCMAKE_INSTALL_PREFIX:PATH=$INSTDIR";
- my $cmake_cmd = qq("$CMAKE" -G "$pcre_generator" "$pcre_build_type" "$pcre_shared_libs" "$pcre_install_prefix" .);
+ my $cmake_cmd = qq("$CMAKE" -G "$pcre_generator" "$pcre_build_type" "$pcre_shared_libs" "$pcre_install_prefix" "$pcre_options" .);
system_or_die("Failure generating pcre Makefiles", $cmake_cmd);
system_or_die("Failure building pcre", qq("$NMAKE"));
system_or_die("Failure testing pcre", qq("$NMAKE" test));
@@ -708,6 +712,7 @@ sub httpd_fix_debug {
sub build_httpd {
chdir_or_die($HTTPD);
+ my $vs_2013 = $VS_VER eq '2013';
my $vs_2012 = $VS_VER eq '2012';
my $vs_2010 = $VS_VER eq '2010';
@@ -734,7 +739,7 @@ sub build_httpd {
}
}, 'modules', 'support');
- if ($vs_2012) {
+ if ($vs_2012 or $vs_2013) {
# Turn off pre-compiled headers for apr-iconv to avoid:
# LNK2011: http://msdn.microsoft.com/en-us/library/3ay26wa2(v=vs.110).aspx
disable_pch('srclib\apr-iconv\build\modules.mk.win');
Modified: subversion/branches/authzperf/tools/dev/gdb-py/svndbg/printers.py
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/tools/dev/gdb-py/svndbg/printers.py?rev=1615515&r1=1615514&r2=1615515&view=diff
==============================================================================
--- subversion/branches/authzperf/tools/dev/gdb-py/svndbg/printers.py (original)
+++ subversion/branches/authzperf/tools/dev/gdb-py/svndbg/printers.py Mon Aug 4 09:09:55 2014
@@ -145,8 +145,8 @@ cstringType = gdb.lookup_type('char').po
apr_hash_count = InferiorFunction('apr_hash_count')
apr_hash_first = InferiorFunction('apr_hash_first')
apr_hash_next = InferiorFunction('apr_hash_next')
-svn__apr_hash_index_key = InferiorFunction('svn__apr_hash_index_key')
-svn__apr_hash_index_val = InferiorFunction('svn__apr_hash_index_val')
+apr_hash_this_key = InferiorFunction('apr_hash_this_key')
+apr_hash_this_val = InferiorFunction('apr_hash_this_val')
def children_of_apr_hash(hash_p, value_type=None):
"""Iterate over an 'apr_hash_t *' GDB value, in the way required for a
@@ -156,9 +156,9 @@ def children_of_apr_hash(hash_p, value_t
"""
hi = apr_hash_first(0, hash_p)
while (hi):
- k = svn__apr_hash_index_key(hi).reinterpret_cast(cstringType)
+ k = apr_hash_this_key(hi).reinterpret_cast(cstringType)
if value_type:
- val = svn__apr_hash_index_val(hi).reinterpret_cast(value_type)
+ val = apr_hash_this_val(hi).reinterpret_cast(value_type)
else:
val = '...'
try:
Modified: subversion/branches/authzperf/tools/server-side/svn-rep-sharing-stats.c
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/tools/server-side/svn-rep-sharing-stats.c?rev=1615515&r1=1615514&r2=1615515&view=diff
==============================================================================
--- subversion/branches/authzperf/tools/server-side/svn-rep-sharing-stats.c (original)
+++ subversion/branches/authzperf/tools/server-side/svn-rep-sharing-stats.c Mon Aug 4 09:09:55 2014
@@ -282,8 +282,8 @@ process_one_revision(svn_fs_t *fs,
node_revision_t *node_rev;
- path = svn__apr_hash_index_key(hi);
- change = svn__apr_hash_index_val(hi);
+ path = apr_hash_this_key(hi);
+ change = apr_hash_this_val(hi);
if (! quiet)
SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
"processing r%ld:%s\n", revnum, path));
@@ -341,7 +341,7 @@ pretty_print(const char *name,
SVN_ERR(cancel_func(NULL));
- value = svn__apr_hash_index_val(hi);
+ value = apr_hash_this_val(hi);
SVN_ERR(svn_cmdline_printf(scratch_pool, "%s %" APR_UINT64_T_FMT " %s\n",
name, value->refcount,
svn_checksum_to_cstring_display(