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 2013/11/27 08:53:35 UTC

svn commit: r1545955 [13/15] - in /subversion/branches/fsfs-improvements: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ build/win32/ contrib/server-side/ contrib/server-side/svncutter/ notes/ subversion/bindings/javahl/native/ ...

Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_fs_base/fs-base-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_fs_base/fs-base-test.c?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_fs_base/fs-base-test.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_fs_base/fs-base-test.c Wed Nov 27 07:53:29 2013
@@ -124,7 +124,7 @@ static svn_error_t *
 check_entry_present(svn_fs_root_t *root, const char *path,
                     const char *name, apr_pool_t *pool)
 {
-  svn_boolean_t present;
+  svn_boolean_t present = FALSE;
   SVN_ERR(check_entry(root, path, name, &present, pool));
 
   if (! present)
@@ -141,7 +141,7 @@ static svn_error_t *
 check_entry_absent(svn_fs_root_t *root, const char *path,
                    const char *name, apr_pool_t *pool)
 {
-  svn_boolean_t present;
+  svn_boolean_t present = TRUE;
   SVN_ERR(check_entry(root, path, name, &present, pool));
 
   if (present)
@@ -213,7 +213,7 @@ check_id(svn_fs_t *fs, const svn_fs_id_t
 static svn_error_t *
 check_id_present(svn_fs_t *fs, const svn_fs_id_t *id, apr_pool_t *pool)
 {
-  svn_boolean_t present;
+  svn_boolean_t present = FALSE;
   SVN_ERR(check_id(fs, id, &present, pool));
 
   if (! present)
@@ -233,7 +233,7 @@ check_id_present(svn_fs_t *fs, const svn
 static svn_error_t *
 check_id_absent(svn_fs_t *fs, const svn_fs_id_t *id, apr_pool_t *pool)
 {
-  svn_boolean_t present;
+  svn_boolean_t present = TRUE;
   SVN_ERR(check_id(fs, id, &present, pool));
 
   if (present)
@@ -1519,6 +1519,8 @@ key_test(apr_pool_t *pool)
 
 /* The test table.  */
 
+int svn_test_max_threads = 2;
+
 struct svn_test_descriptor_t test_funcs[] =
   {
     SVN_TEST_NULL,

Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_fs_base/strings-reps-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_fs_base/strings-reps-test.c?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_fs_base/strings-reps-test.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_fs_base/strings-reps-test.c Wed Nov 27 07:53:29 2013
@@ -612,7 +612,7 @@ write_null_string(const svn_test_opts_t 
 
   /* Create a new fs and repos */
   SVN_ERR(svn_test__create_bdb_fs
-          (&fs, "test-repo-test-strings", opts,
+          (&fs, "test-repo-write-null-string", opts,
            pool));
 
   args.fs = fs;
@@ -732,6 +732,8 @@ copy_string(const svn_test_opts_t *opts,
 
 /* The test table.  */
 
+int svn_test_max_threads = 3;
+
 struct svn_test_descriptor_t test_funcs[] =
   {
     SVN_TEST_NULL,

Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c Wed Nov 27 07:53:29 2013
@@ -894,6 +894,8 @@ get_set_multiple_huge_revprops_packed_fs
 
 /* The test table.  */
 
+int svn_test_max_threads = 4;
+
 struct svn_test_descriptor_t test_funcs[] =
   {
     SVN_TEST_NULL,

Propchange: subversion/branches/fsfs-improvements/subversion/tests/libsvn_fs_x/
------------------------------------------------------------------------------
  Merged /subversion/trunk/subversion/tests/libsvn_fs_x:r1536947-1545954

Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_fs_x/fs-x-pack-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_fs_x/fs-x-pack-test.c?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_fs_x/fs-x-pack-test.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_fs_x/fs-x-pack-test.c Wed Nov 27 07:53:29 2013
@@ -937,6 +937,8 @@ pack_shard_size_one(const svn_test_opts_
 
 /* The test table.  */
 
+int svn_test_max_threads = 4;
+
 struct svn_test_descriptor_t test_funcs[] =
   {
     SVN_TEST_NULL,

Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_fs_x/string-table-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_fs_x/string-table-test.c?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_fs_x/string-table-test.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_fs_x/string-table-test.c Wed Nov 27 07:53:29 2013
@@ -197,8 +197,8 @@ static svn_error_t *
 many_strings_table_body(svn_boolean_t do_load_store,
                         apr_pool_t *pool)
 {
-  /* cause multiple sub-tables to be created */
-  enum { COUNT = 1000 };
+  /* cause multiple sub-tables (6 to be exact) to be created */
+  enum { COUNT = 100 };
 
   svn_stringbuf_t *strings[COUNT] = { 0 };
   apr_size_t indexes[COUNT] = { 0 };
@@ -288,6 +288,8 @@ store_load_many_strings_table(apr_pool_t
 
 /* The test table.  */
 
+int svn_test_max_threads = 4;
+
 struct svn_test_descriptor_t test_funcs[] =
   {
     SVN_TEST_NULL,

Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_ra/ra-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_ra/ra-test.c?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_ra/ra-test.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_ra/ra-test.c Wed Nov 27 07:53:29 2013
@@ -126,7 +126,7 @@ open_tunnel(apr_file_t **request, apr_fi
 
   SVN_ERR(svn_dirent_get_absolute(&svnserve, "../../svnserve/svnserve", pool));
 #ifdef WIN32
-  svnserve = apr_pstrcat(pool, svnserve, ".exe", NULL);
+  svnserve = apr_pstrcat(pool, svnserve, ".exe", SVN_VA_NULL);
 #endif
   SVN_ERR(svn_io_check_path(svnserve, &kind, pool));
   if (kind != svn_node_file)
@@ -288,7 +288,8 @@ tunel_callback_test(const svn_test_opts_
 
   SVN_ERR(svn_test__create_repos(&repos, tunnel_repos_name, opts, pool));
 
-  url = apr_pstrcat(pool, "svn+test://localhost/", tunnel_repos_name, NULL);
+  url = apr_pstrcat(pool, "svn+test://localhost/", tunnel_repos_name,
+                    SVN_VA_NULL);
   SVN_ERR(svn_ra_create_callbacks(&cbtable, pool));
   cbtable->check_tunnel_func = check_tunnel;
   cbtable->open_tunnel_func = open_tunnel;
@@ -325,6 +326,9 @@ tunel_callback_test(const svn_test_opts_
 
 
 /* The test table.  */
+
+int svn_test_max_threads = 1;
+
 struct svn_test_descriptor_t test_funcs[] =
   {
     SVN_TEST_NULL,

Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_ra_local/ra-local-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_ra_local/ra-local-test.c?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_ra_local/ra-local-test.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_ra_local/ra-local-test.c Wed Nov 27 07:53:29 2013
@@ -279,6 +279,8 @@ split_url_test(const svn_test_opts_t *op
 #define HAS_UNC_HOST 0
 #endif
 
+int svn_test_max_threads = 1;
+
 struct svn_test_descriptor_t test_funcs[] =
   {
     SVN_TEST_NULL,

Propchange: subversion/branches/fsfs-improvements/subversion/tests/libsvn_repos/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Nov 27 07:53:29 2013
@@ -3,6 +3,7 @@ Release
 .libs
 repos-test
 test-repo-*
+config-pool-test*
 md5args
 *.o
 *.lo

Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_repos/repos-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_repos/repos-test.c?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_repos/repos-test.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_repos/repos-test.c Wed Nov 27 07:53:29 2013
@@ -37,6 +37,10 @@
 #include "svn_config.h"
 #include "svn_props.h"
 #include "svn_version.h"
+#include "private/svn_repos_private.h"
+
+/* be able to look into svn_config_t */
+#include "../../libsvn_subr/config_impl.h"
 
 #include "../svn_test_fs.h"
 
@@ -1455,8 +1459,8 @@ in_repo_authz(const svn_test_opts_t *opt
 
   repos_root = svn_repos_path(repos, pool);
   SVN_ERR(svn_uri_get_file_url_from_dirent(&repos_url, repos_root, pool));
-  authz_url = apr_pstrcat(pool, repos_url, "/authz", SVN_VA_NULL);
-  noent_authz_url = apr_pstrcat(pool, repos_url, "/A/authz", SVN_VA_NULL);
+  authz_url = svn_path_url_add_component2(repos_url, "authz", pool);
+  noent_authz_url = svn_path_url_add_component2(repos_url, "A/authz", pool);
 
   /* absolute file URL. */
   SVN_ERR(svn_repos_authz_read2(&authz_cfg, authz_url, NULL, TRUE, pool));
@@ -1594,11 +1598,11 @@ in_repo_groups_authz(const svn_test_opts
   /* Calculate URLs */
   repos_root = svn_repos_path(repos, pool);
   SVN_ERR(svn_uri_get_file_url_from_dirent(&repos_url, repos_root, pool));
-  authz_url = apr_pstrcat(pool, repos_url, "/authz", SVN_VA_NULL);
-  empty_authz_url = apr_pstrcat(pool, repos_url, "/empty-authz", SVN_VA_NULL);
-  noent_authz_url = apr_pstrcat(pool, repos_url, "/A/authz", SVN_VA_NULL);
-  groups_url = apr_pstrcat(pool, repos_url, "/groups", SVN_VA_NULL);
-  noent_groups_url = apr_pstrcat(pool, repos_url, "/A/groups", SVN_VA_NULL);
+  authz_url = svn_path_url_add_component2(repos_url, "authz", pool);
+  empty_authz_url = svn_path_url_add_component2(repos_url, "empty-authz", pool);
+  noent_authz_url = svn_path_url_add_component2(repos_url, "A/authz", pool);
+  groups_url = svn_path_url_add_component2(repos_url, "groups", pool);
+  noent_groups_url = svn_path_url_add_component2(repos_url, "A/groups", pool);
 
 
   /* absolute file URLs. */
@@ -3303,9 +3307,246 @@ test_repos_info(const svn_test_opts_t *o
   return SVN_NO_ERROR;
 }
 
-
+static svn_error_t *
+test_config_pool(const svn_test_opts_t *opts,
+                 apr_pool_t *pool)
+{
+  const char *repo_name = "test-repo-config-pool";
+  svn_repos_t *repos;
+  svn_stringbuf_t *cfg_buffer1, *cfg_buffer2;
+  svn_config_t *cfg;
+  apr_hash_t *sections1, *sections2;
+  int i;
+  svn_boolean_t bvalue;
+  svn_fs_txn_t *txn;
+  svn_fs_root_t *root, *rev_root;
+  svn_revnum_t rev;
+  const char *repo_root_url;
+  svn_error_t *err;
+
+  svn_repos__config_pool_t *config_pool;
+  apr_pool_t *config_pool_pool;
+  apr_pool_t *subpool = svn_pool_create(pool);
+
+  const char *wrk_dir = svn_test_data_path("config_pool", pool);
+
+  SVN_ERR(svn_io_make_dir_recursively(wrk_dir, pool));
+
+  /* read all config info through a single config pool and we want to be
+     able to control its lifetime.  The latter requires a separate pool. */
+  config_pool_pool = svn_pool_create(pool);
+  SVN_ERR(svn_repos__config_pool_create(&config_pool, TRUE,
+                                        config_pool_pool));
+
+  /* have two different configurations  */
+  SVN_ERR(svn_stringbuf_from_file2(
+                        &cfg_buffer1,
+                        svn_dirent_join(opts->srcdir,
+                                        "../libsvn_subr/config-test.cfg",
+                                        pool),
+                        pool));
+  cfg_buffer2 = svn_stringbuf_dup(cfg_buffer1, pool);
+  svn_stringbuf_appendcstr(cfg_buffer2, "\n[more]\nU=\"X\"\n");
+
+  /* write them to 2x2 files */
+  SVN_ERR(svn_io_write_atomic(svn_dirent_join(wrk_dir,
+                                              "config-pool-test1.cfg",
+                                              pool),
+                              cfg_buffer1->data, cfg_buffer1->len, NULL,
+                              pool));
+  SVN_ERR(svn_io_write_atomic(svn_dirent_join(wrk_dir,
+                                              "config-pool-test2.cfg",
+                                              pool),
+                              cfg_buffer1->data, cfg_buffer1->len, NULL,
+                              pool));
+  SVN_ERR(svn_io_write_atomic(svn_dirent_join(wrk_dir,
+                                              "config-pool-test3.cfg",
+                                              pool),
+                              cfg_buffer2->data, cfg_buffer2->len, NULL,
+                              pool));
+  SVN_ERR(svn_io_write_atomic(svn_dirent_join(wrk_dir,
+                                              "config-pool-test4.cfg",
+                                              pool),
+                              cfg_buffer2->data, cfg_buffer2->len, NULL,
+                              pool));
+
+  /* requesting a config over and over again should return the same
+     (even though it is not being referenced) */
+  sections1 = NULL;
+  for (i = 0; i < 4; ++i)
+    {
+      SVN_ERR(svn_repos__config_pool_get(
+                                    &cfg, NULL, config_pool,
+                                    svn_dirent_join(wrk_dir,
+                                                    "config-pool-test1.cfg",
+                                                    pool),
+                                    TRUE, TRUE, NULL, subpool));
+
+      if (sections1 == NULL)
+        sections1 = cfg->sections;
+      else
+        SVN_TEST_ASSERT(cfg->sections == sections1);
+
+      svn_pool_clear(subpool);
+    }
+
+  /* requesting the same config from another file should return the same
+     (even though it is not being referenced) */
+  for (i = 0; i < 4; ++i)
+    {
+      SVN_ERR(svn_repos__config_pool_get(
+                                    &cfg, NULL, config_pool,
+                                    svn_dirent_join(wrk_dir,
+                                                    "config-pool-test2.cfg",
+                                                    pool),
+                                    TRUE, TRUE, NULL, subpool));
+
+      SVN_TEST_ASSERT(cfg->sections == sections1);
+
+      svn_pool_clear(subpool);
+    }
+
+  /* reading a different configuration should return a different pointer */
+  sections2 = NULL;
+  for (i = 0; i < 2; ++i)
+    {
+      SVN_ERR(svn_repos__config_pool_get(
+                                    &cfg, NULL, config_pool,
+                                    svn_dirent_join(wrk_dir,
+                                                    "config-pool-test3.cfg",
+                                                    pool),
+                                    TRUE, TRUE, NULL, subpool));
+
+      if (sections2 == NULL)
+        sections2 = cfg->sections;
+      else
+        SVN_TEST_ASSERT(cfg->sections == sections2);
+
+      SVN_TEST_ASSERT(sections1 != sections2);
+      svn_pool_clear(subpool);
+    }
+
+  /* create an in-repo config */
+  SVN_ERR(svn_dirent_get_absolute(&repo_root_url, repo_name, pool));
+  SVN_ERR(svn_uri_get_file_url_from_dirent(&repo_root_url, repo_root_url,
+                                           pool));
+
+  SVN_ERR(svn_test__create_repos(&repos, repo_name, opts, pool));
+  SVN_ERR(svn_fs_begin_txn2(&txn, svn_repos_fs(repos), 0, 0, pool));
+  SVN_ERR(svn_fs_txn_root(&root, txn, pool));
+  SVN_ERR(svn_fs_make_dir(root, "dir", pool));
+  SVN_ERR(svn_fs_make_file(root, "dir/config", pool));
+  SVN_ERR(svn_test__set_file_contents(root, "dir/config",
+                                      cfg_buffer1->data, pool));
+  SVN_ERR(svn_fs_commit_txn2(NULL, &rev, txn, TRUE, pool));
+
+  /* reading the config from the repo should still give cfg1 */
+  SVN_ERR(svn_repos__config_pool_get(&cfg, NULL, config_pool,
+                                     svn_path_url_add_component2(
+                                                    repo_root_url,
+                                                    "dir/config", pool),
+                                     TRUE, TRUE, NULL, subpool));
+  SVN_TEST_ASSERT(cfg->sections == sections1);
+  svn_pool_clear(subpool);
+
+  /* create another in-repo config */
+  SVN_ERR(svn_fs_begin_txn2(&txn, svn_repos_fs(repos), rev, 0, pool));
+  SVN_ERR(svn_fs_txn_root(&root, txn, pool));
+  SVN_ERR(svn_fs_revision_root(&rev_root, svn_repos_fs(repos), rev, pool));
+  SVN_ERR(svn_fs_copy(rev_root, "dir", root, "another-dir", pool));
+  SVN_ERR(svn_test__set_file_contents(root, "dir/config",
+                                      cfg_buffer2->data, pool));
+  SVN_ERR(svn_fs_commit_txn2(NULL, &rev, txn, TRUE, pool));
+
+  /* reading the config from the repo should give cfg2 now */
+  SVN_ERR(svn_repos__config_pool_get(&cfg, NULL, config_pool,
+                                     svn_path_url_add_component2(
+                                                    repo_root_url,
+                                                    "dir/config", pool),
+                                     TRUE, TRUE, NULL, subpool));
+  SVN_TEST_ASSERT(cfg->sections == sections2);
+  svn_pool_clear(subpool);
+
+  /* reading the copied config should still give cfg1 */
+  SVN_ERR(svn_repos__config_pool_get(&cfg, NULL, config_pool,
+                                     svn_path_url_add_component2(
+                                                    repo_root_url,
+                                                    "another-dir/config",
+                                                    pool),
+                                     TRUE, TRUE, NULL, subpool));
+  SVN_TEST_ASSERT(cfg->sections == sections1);
+  svn_pool_clear(subpool);
+
+  /* once again: repeated reads.  This triggers a different code path. */
+  SVN_ERR(svn_repos__config_pool_get(&cfg, NULL, config_pool,
+                                     svn_path_url_add_component2(
+                                                    repo_root_url,
+                                                    "dir/config", pool),
+                                     TRUE, TRUE, NULL, subpool));
+  SVN_TEST_ASSERT(cfg->sections == sections2);
+  SVN_ERR(svn_repos__config_pool_get(&cfg, NULL, config_pool,
+                                     svn_path_url_add_component2(
+                                                    repo_root_url,
+                                                    "another-dir/config",
+                                                    pool),
+                                     TRUE, TRUE, NULL, subpool));
+  SVN_TEST_ASSERT(cfg->sections == sections1);
+  svn_pool_clear(subpool);
+
+  /* access paths that don't exist */
+  SVN_TEST_ASSERT_ERROR(svn_repos__config_pool_get(&cfg, NULL, config_pool,
+                          svn_path_url_add_component2(repo_root_url, "X",
+                                                      pool),
+                          TRUE, TRUE, NULL, subpool),
+                        SVN_ERR_ILLEGAL_TARGET);
+  err = svn_repos__config_pool_get(&cfg, NULL, config_pool, "X.cfg",
+                                   TRUE, TRUE, NULL, subpool);
+  SVN_TEST_ASSERT(err && APR_STATUS_IS_ENOENT(err->apr_err));
+  svn_error_clear(err);
+  svn_pool_clear(subpool);
+
+  /* as long as we keep a reference to a config, clearing the config pool
+     should not invalidate that reference */
+  SVN_ERR(svn_repos__config_pool_get(&cfg, NULL, config_pool,
+                                     svn_dirent_join(wrk_dir,
+                                                     "config-pool-test1.cfg",
+                                                     pool),
+                                     TRUE, TRUE, NULL, pool));
+  svn_pool_clear(config_pool_pool);
+  for (i = 0; i < 64000; ++i)
+    apr_pcalloc(config_pool_pool, 80);
+
+  SVN_ERR(svn_config_get_bool(cfg, &bvalue, "booleans", "true3", FALSE));
+  SVN_TEST_ASSERT(bvalue);
+
+  return SVN_NO_ERROR;
+}
+
+
+static svn_error_t *
+test_repos_fs_type(const svn_test_opts_t *opts,
+                   apr_pool_t *pool)
+{
+  svn_repos_t *repos;
+
+  /* Create test repository. */
+  SVN_ERR(svn_test__create_repos(&repos, "test-repo-repos_fs_type",
+                                 opts, pool));
+
+  SVN_TEST_STRING_ASSERT(svn_repos_fs_type(repos, pool), opts->fs_type);
+
+  /* Re-open repository and verify fs-type again. */
+  SVN_ERR(svn_repos_open2(&repos, svn_repos_path(repos, pool), NULL, pool));
+
+  SVN_TEST_STRING_ASSERT(svn_repos_fs_type(repos, pool), opts->fs_type);
+
+  return SVN_NO_ERROR;
+}
+
 /* The test table.  */
 
+int svn_test_max_threads = 4;
+
 struct svn_test_descriptor_t test_funcs[] =
   {
     SVN_TEST_NULL,
@@ -3351,5 +3592,9 @@ struct svn_test_descriptor_t test_funcs[
                        "test filenames with control characters"),
     SVN_TEST_OPTS_PASS(test_repos_info,
                        "test svn_repos_info_*"),
+    SVN_TEST_OPTS_PASS(test_config_pool,
+                       "test svn_repos__config_pool_*"),
+    SVN_TEST_OPTS_PASS(test_repos_fs_type,
+                       "test test_repos_fs_type"),
     SVN_TEST_NULL
   };

Propchange: subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Nov 27 07:53:29 2013
@@ -22,6 +22,7 @@ opt-test
 path-test
 revision-test
 skel-test
+sqlite-test
 stream-test
 string-test
 string-test.tmp

Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/auth-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/auth-test.c?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/auth-test.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/auth-test.c Wed Nov 27 07:53:29 2013
@@ -315,6 +315,8 @@ test_auth_clear(apr_pool_t *pool)
 
 /* The test table.  */
 
+int svn_test_max_threads = 1;
+
 struct svn_test_descriptor_t test_funcs[] =
   {
     SVN_TEST_NULL,

Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/cache-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/cache-test.c?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/cache-test.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/cache-test.c Wed Nov 27 07:53:29 2013
@@ -259,6 +259,8 @@ test_memcache_long_key(const svn_test_op
 
 /* The test table.  */
 
+int svn_test_max_threads = 1;
+
 struct svn_test_descriptor_t test_funcs[] =
   {
     SVN_TEST_NULL,

Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/checksum-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/checksum-test.c?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/checksum-test.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/checksum-test.c Wed Nov 27 07:53:29 2013
@@ -23,7 +23,10 @@
 
 #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"
@@ -155,7 +158,91 @@ 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 */
+
+int svn_test_max_threads = 1;
+
 struct svn_test_descriptor_t test_funcs[] =
   {
     SVN_TEST_NULL,
@@ -167,5 +254,7 @@ 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
   };

Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/compat-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/compat-test.c?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/compat-test.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/compat-test.c Wed Nov 27 07:53:29 2013
@@ -209,6 +209,9 @@ test_version_at_least(apr_pool_t *pool)
 }
 
 /* An array of all test functions */
+
+int svn_test_max_threads = 1;
+
 struct svn_test_descriptor_t test_funcs[] =
   {
     SVN_TEST_NULL,

Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/config-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/config-test.c?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/config-test.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/config-test.c Wed Nov 27 07:53:29 2013
@@ -33,6 +33,7 @@
 #include <apr_getopt.h>
 #include <apr_pools.h>
 
+#include "svn_dirent_uri.h"
 #include "svn_error.h"
 #include "svn_config.h"
 #include "private/svn_subr_private.h"
@@ -40,42 +41,6 @@
 #include "../svn_test.h"
 
 
-/* Initialize parameters for the tests. */
-extern int test_argc;
-extern const char **test_argv;
-
-static const apr_getopt_option_t opt_def[] =
-  {
-    {"srcdir", 'S', 1, "the source directory for VPATH test runs"},
-    {0, 0, 0, 0}
-  };
-static const char *srcdir = NULL;
-
-static svn_error_t *init_params(apr_pool_t *pool)
-{
-  apr_getopt_t *opt;
-  int optch;
-  const char *opt_arg;
-  apr_status_t status;
-
-  apr_getopt_init(&opt, pool, test_argc, test_argv);
-  while (!(status = apr_getopt_long(opt, opt_def, &optch, &opt_arg)))
-    {
-      switch (optch)
-        {
-        case 'S':
-          srcdir = opt_arg;
-          break;
-        }
-    }
-
-  if (!srcdir)
-    return svn_error_create(SVN_ERR_TEST_FAILED, 0,
-                            "missing required parameter '--srcdir'");
-
-  return SVN_NO_ERROR;
-}
-
 /* A quick way to create error messages.  */
 static svn_error_t *
 fail(apr_pool_t *pool, const char *fmt, ...)
@@ -100,16 +65,14 @@ static const char *config_values[] = { "
                                        "Aa 100", NULL };
 
 static svn_error_t *
-test_text_retrieval(apr_pool_t *pool)
+test_text_retrieval(const svn_test_opts_t *opts,
+                    apr_pool_t *pool)
 {
   svn_config_t *cfg;
   int i;
   const char *cfg_file;
 
-  if (!srcdir)
-    SVN_ERR(init_params(pool));
-
-  cfg_file = apr_pstrcat(pool, srcdir, "/", "config-test.cfg", SVN_VA_NULL);
+  cfg_file = svn_dirent_join(opts->srcdir, "config-test.cfg", pool);
   SVN_ERR(svn_config_read3(&cfg, cfg_file, TRUE, FALSE, FALSE, pool));
 
   /* Test values retrieved from our ConfigParser instance against
@@ -151,16 +114,14 @@ static const char *false_keys[] = {"fals
                                    NULL};
 
 static svn_error_t *
-test_boolean_retrieval(apr_pool_t *pool)
+test_boolean_retrieval(const svn_test_opts_t *opts,
+                       apr_pool_t *pool)
 {
   svn_config_t *cfg;
   int i;
   const char *cfg_file;
 
-  if (!srcdir)
-    SVN_ERR(init_params(pool));
-
-  cfg_file = apr_pstrcat(pool, srcdir, "/", "config-test.cfg", SVN_VA_NULL);
+  cfg_file = svn_dirent_join(opts->srcdir, "config-test.cfg", pool);
   SVN_ERR(svn_config_read3(&cfg, cfg_file, TRUE, FALSE, FALSE, pool));
 
   for (i = 0; true_keys[i] != NULL; i++)
@@ -212,15 +173,13 @@ test_boolean_retrieval(apr_pool_t *pool)
 }
 
 static svn_error_t *
-test_has_section_case_insensitive(apr_pool_t *pool)
+test_has_section_case_insensitive(const svn_test_opts_t *opts,
+                                  apr_pool_t *pool)
 {
   svn_config_t *cfg;
   const char *cfg_file;
 
-  if (!srcdir)
-    SVN_ERR(init_params(pool));
-
-  cfg_file = apr_pstrcat(pool, srcdir, "/", "config-test.cfg", SVN_VA_NULL);
+  cfg_file = svn_dirent_join(opts->srcdir, "config-test.cfg", pool);
   SVN_ERR(svn_config_read3(&cfg, cfg_file, TRUE, FALSE, FALSE, pool));
 
   if (! svn_config_has_section(cfg, "section1"))
@@ -242,15 +201,13 @@ test_has_section_case_insensitive(apr_po
 }
 
 static svn_error_t *
-test_has_section_case_sensitive(apr_pool_t *pool)
+test_has_section_case_sensitive(const svn_test_opts_t *opts,
+                                apr_pool_t *pool)
 {
   svn_config_t *cfg;
   const char *cfg_file;
 
-  if (!srcdir)
-    SVN_ERR(init_params(pool));
-
-  cfg_file = apr_pstrcat(pool, srcdir, "/", "config-test.cfg", SVN_VA_NULL);
+  cfg_file = svn_dirent_join(opts->srcdir, "config-test.cfg", pool);
   SVN_ERR(svn_config_read3(&cfg, cfg_file, TRUE, TRUE, FALSE, pool));
 
   if (! svn_config_has_section(cfg, "section1"))
@@ -272,7 +229,8 @@ test_has_section_case_sensitive(apr_pool
 }
 
 static svn_error_t *
-test_has_option_case_sensitive(apr_pool_t *pool)
+test_has_option_case_sensitive(const svn_test_opts_t *opts,
+                               apr_pool_t *pool)
 {
   svn_config_t *cfg;
   const char *cfg_file;
@@ -290,10 +248,7 @@ test_has_option_case_sensitive(apr_pool_
   };
   static const int test_data_size = sizeof(test_data)/sizeof(*test_data);
 
-  if (!srcdir)
-    SVN_ERR(init_params(pool));
-
-  cfg_file = apr_pstrcat(pool, srcdir, "/", "config-test.cfg", SVN_VA_NULL);
+  cfg_file = svn_dirent_join(opts->srcdir, "config-test.cfg", pool);
   SVN_ERR(svn_config_read3(&cfg, cfg_file, TRUE, TRUE, TRUE, pool));
 
   for (i = 0; i < test_data_size; ++i)
@@ -314,16 +269,14 @@ test_has_option_case_sensitive(apr_pool_
 }
 
 static svn_error_t *
-test_stream_interface(apr_pool_t *pool)
+test_stream_interface(const svn_test_opts_t *opts,
+                      apr_pool_t *pool)
 {
   svn_config_t *cfg;
   const char *cfg_file;
   svn_stream_t *stream;
 
-  if (!srcdir)
-    SVN_ERR(init_params(pool));
-
-  cfg_file = apr_pstrcat(pool, srcdir, "/", "config-test.cfg", SVN_VA_NULL);
+  cfg_file = svn_dirent_join(opts->srcdir, "config-test.cfg", pool);
   SVN_ERR(svn_stream_open_readonly(&stream, cfg_file, pool, pool));
 
   SVN_ERR(svn_config_parse(&cfg, stream, TRUE, TRUE, pool));
@@ -354,16 +307,14 @@ test_ignore_bom(apr_pool_t *pool)
 }
 
 static svn_error_t *
-test_read_only_mode(apr_pool_t *pool)
+test_read_only_mode(const svn_test_opts_t *opts,
+                    apr_pool_t *pool)
 {
   svn_config_t *cfg;
   svn_config_t *cfg2;
   const char *cfg_file;
 
-  if (!srcdir)
-    SVN_ERR(init_params(pool));
-
-  cfg_file = apr_pstrcat(pool, srcdir, "/", "config-test.cfg", SVN_VA_NULL);
+  cfg_file = svn_dirent_join(opts->srcdir, "config-test.cfg", pool);
   SVN_ERR(svn_config_read3(&cfg, cfg_file, TRUE, TRUE, FALSE, pool));
 
   /* setting CFG to r/o mode shall toggle the r/o mode and expand values */
@@ -392,24 +343,27 @@ test_read_only_mode(apr_pool_t *pool)
 */
 
 /* An array of all test functions */
+
+int svn_test_max_threads = 1;
+
 struct svn_test_descriptor_t test_funcs[] =
   {
     SVN_TEST_NULL,
-    SVN_TEST_PASS2(test_text_retrieval,
-                   "test svn_config"),
-    SVN_TEST_PASS2(test_boolean_retrieval,
-                   "test svn_config boolean conversion"),
-    SVN_TEST_PASS2(test_has_section_case_insensitive,
-                   "test svn_config_has_section (case insensitive)"),
-    SVN_TEST_PASS2(test_has_section_case_sensitive,
-                   "test svn_config_has_section (case sensitive)"),
-    SVN_TEST_PASS2(test_has_option_case_sensitive,
-                   "test case-sensitive option name lookup"),
-    SVN_TEST_PASS2(test_stream_interface,
-                   "test svn_config_parse"),
+    SVN_TEST_OPTS_PASS(test_text_retrieval,
+                       "test svn_config"),
+    SVN_TEST_OPTS_PASS(test_boolean_retrieval,
+                       "test svn_config boolean conversion"),
+    SVN_TEST_OPTS_PASS(test_has_section_case_insensitive,
+                       "test svn_config_has_section (case insensitive)"),
+    SVN_TEST_OPTS_PASS(test_has_section_case_sensitive,
+                       "test svn_config_has_section (case sensitive)"),
+    SVN_TEST_OPTS_PASS(test_has_option_case_sensitive,
+                       "test case-sensitive option name lookup"),
+    SVN_TEST_OPTS_PASS(test_stream_interface,
+                       "test svn_config_parse"),
     SVN_TEST_PASS2(test_ignore_bom,
                    "test parsing config file with BOM"),
-    SVN_TEST_PASS2(test_read_only_mode,
-                   "test r/o mode"),
+    SVN_TEST_OPTS_PASS(test_read_only_mode,
+                       "test r/o mode"),
     SVN_TEST_NULL
   };

Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/crypto-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/crypto-test.c?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/crypto-test.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/crypto-test.c Wed Nov 27 07:53:29 2013
@@ -177,6 +177,8 @@ test_passphrase_check(apr_pool_t *pool)
 
 /* The test table.  */
 
+int svn_test_max_threads = -1;
+
 struct svn_test_descriptor_t test_funcs[] =
   {
     SVN_TEST_NULL,

Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/dirent_uri-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/dirent_uri-test.c?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/dirent_uri-test.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/dirent_uri-test.c Wed Nov 27 07:53:29 2013
@@ -285,72 +285,72 @@ test_dirent_join(apr_pool_t *pool)
                              "expected \"%s\"", \
                              result, expect);
 
-  TEST_MANY((pool, "abc", NULL), "abc");
-  TEST_MANY((pool, "/abc", NULL), "/abc");
-  TEST_MANY((pool, "/", NULL), "/");
-
-  TEST_MANY((pool, "abc", "def", "ghi", NULL), "abc/def/ghi");
-  TEST_MANY((pool, "abc", "/def", "ghi", NULL), "/def/ghi");
-  TEST_MANY((pool, "/abc", "def", "ghi", NULL), "/abc/def/ghi");
-  TEST_MANY((pool, "abc", "def", "/ghi", NULL), "/ghi");
-  TEST_MANY((pool, "/", "def", "/ghi", NULL), "/ghi");
-  TEST_MANY((pool, "/", "/def", "/ghi", NULL), "/ghi");
-
-  TEST_MANY((pool, SVN_EMPTY_PATH, "def", "ghi", NULL), "def/ghi");
-  TEST_MANY((pool, "abc", SVN_EMPTY_PATH, "ghi", NULL), "abc/ghi");
-  TEST_MANY((pool, "abc", "def", SVN_EMPTY_PATH, NULL), "abc/def");
-  TEST_MANY((pool, SVN_EMPTY_PATH, "def", SVN_EMPTY_PATH, NULL), "def");
-  TEST_MANY((pool, SVN_EMPTY_PATH, SVN_EMPTY_PATH, "ghi", NULL), "ghi");
-  TEST_MANY((pool, "abc", SVN_EMPTY_PATH, SVN_EMPTY_PATH, NULL), "abc");
-  TEST_MANY((pool, SVN_EMPTY_PATH, "def", "/ghi", NULL), "/ghi");
-  TEST_MANY((pool, SVN_EMPTY_PATH, SVN_EMPTY_PATH, "/ghi", NULL), "/ghi");
-
-  TEST_MANY((pool, "/", "def", "ghi", NULL), "/def/ghi");
-  TEST_MANY((pool, "abc", "/", "ghi", NULL), "/ghi");
-  TEST_MANY((pool, "abc", "def", "/", NULL), "/");
-  TEST_MANY((pool, "/", "/", "ghi", NULL), "/ghi");
-  TEST_MANY((pool, "/", "/", "/", NULL), "/");
-  TEST_MANY((pool, "/", SVN_EMPTY_PATH, "ghi", NULL), "/ghi");
-  TEST_MANY((pool, "/", "def", SVN_EMPTY_PATH, NULL), "/def");
-  TEST_MANY((pool, SVN_EMPTY_PATH, "/", "ghi", NULL), "/ghi");
-  TEST_MANY((pool, "/", SVN_EMPTY_PATH, SVN_EMPTY_PATH, NULL), "/");
-  TEST_MANY((pool, SVN_EMPTY_PATH, "/", SVN_EMPTY_PATH, NULL), "/");
-  TEST_MANY((pool, SVN_EMPTY_PATH, SVN_EMPTY_PATH, "/", NULL), "/");
-
-#ifdef SVN_USE_DOS_PATHS
-  TEST_MANY((pool, "X:/", "def", "ghi", NULL), "X:/def/ghi");
-  TEST_MANY((pool, "abc", "X:/", "ghi", NULL), "X:/ghi");
-  TEST_MANY((pool, "abc", "def", "X:/", NULL), "X:/");
-  TEST_MANY((pool, "X:/", "X:/", "ghi", NULL), "X:/ghi");
-  TEST_MANY((pool, "X:/", "X:/", "/", NULL), "/");
-  TEST_MANY((pool, "X:/", SVN_EMPTY_PATH, "ghi", NULL), "X:/ghi");
-  TEST_MANY((pool, "X:/", "def", SVN_EMPTY_PATH, NULL), "X:/def");
-  TEST_MANY((pool, SVN_EMPTY_PATH, "X:/", "ghi", NULL), "X:/ghi");
-  TEST_MANY((pool, "X:/", SVN_EMPTY_PATH, SVN_EMPTY_PATH, NULL), "X:/");
-  TEST_MANY((pool, SVN_EMPTY_PATH, "X:/", SVN_EMPTY_PATH, NULL), "X:/");
-  TEST_MANY((pool, SVN_EMPTY_PATH, SVN_EMPTY_PATH, "X:/", NULL), "X:/");
-
-  TEST_MANY((pool, "X:", "def", "ghi", NULL), "X:def/ghi");
-  TEST_MANY((pool, "X:", "X:/", "ghi", NULL), "X:/ghi");
-  TEST_MANY((pool, "X:", "X:/", "/", NULL), "/");
-  TEST_MANY((pool, "X:", SVN_EMPTY_PATH, "ghi", NULL), "X:ghi");
-  TEST_MANY((pool, "X:", "def", SVN_EMPTY_PATH, NULL), "X:def");
-  TEST_MANY((pool, SVN_EMPTY_PATH, "X:", "ghi", NULL), "X:ghi");
-  TEST_MANY((pool, "//srv/shr", "def", "ghi", NULL), "//srv/shr/def/ghi");
-  TEST_MANY((pool, "//srv/shr/fld", "def", "ghi", NULL), "//srv/shr/fld/def/ghi");
-  TEST_MANY((pool, "//srv/shr/fld", "def", "//srv/shr", NULL), "//srv/shr");
-  TEST_MANY((pool, "//srv/s r/fld", "def", "//srv/s r", NULL), "//srv/s r");
-  TEST_MANY((pool, SVN_EMPTY_PATH, "//srv/shr/fld", "def", "ghi", NULL), "//srv/shr/fld/def/ghi");
-  TEST_MANY((pool, SVN_EMPTY_PATH, "//srv/shr/fld", "def", "//srv/shr", NULL), "//srv/shr");
+  TEST_MANY((pool, "abc", SVN_VA_NULL), "abc");
+  TEST_MANY((pool, "/abc", SVN_VA_NULL), "/abc");
+  TEST_MANY((pool, "/", SVN_VA_NULL), "/");
+
+  TEST_MANY((pool, "abc", "def", "ghi", SVN_VA_NULL), "abc/def/ghi");
+  TEST_MANY((pool, "abc", "/def", "ghi", SVN_VA_NULL), "/def/ghi");
+  TEST_MANY((pool, "/abc", "def", "ghi", SVN_VA_NULL), "/abc/def/ghi");
+  TEST_MANY((pool, "abc", "def", "/ghi", SVN_VA_NULL), "/ghi");
+  TEST_MANY((pool, "/", "def", "/ghi", SVN_VA_NULL), "/ghi");
+  TEST_MANY((pool, "/", "/def", "/ghi", SVN_VA_NULL), "/ghi");
+
+  TEST_MANY((pool, SVN_EMPTY_PATH, "def", "ghi", SVN_VA_NULL), "def/ghi");
+  TEST_MANY((pool, "abc", SVN_EMPTY_PATH, "ghi", SVN_VA_NULL), "abc/ghi");
+  TEST_MANY((pool, "abc", "def", SVN_EMPTY_PATH, SVN_VA_NULL), "abc/def");
+  TEST_MANY((pool, SVN_EMPTY_PATH, "def", SVN_EMPTY_PATH, SVN_VA_NULL), "def");
+  TEST_MANY((pool, SVN_EMPTY_PATH, SVN_EMPTY_PATH, "ghi", SVN_VA_NULL), "ghi");
+  TEST_MANY((pool, "abc", SVN_EMPTY_PATH, SVN_EMPTY_PATH, SVN_VA_NULL), "abc");
+  TEST_MANY((pool, SVN_EMPTY_PATH, "def", "/ghi", SVN_VA_NULL), "/ghi");
+  TEST_MANY((pool, SVN_EMPTY_PATH, SVN_EMPTY_PATH, "/ghi", SVN_VA_NULL), "/ghi");
+
+  TEST_MANY((pool, "/", "def", "ghi", SVN_VA_NULL), "/def/ghi");
+  TEST_MANY((pool, "abc", "/", "ghi", SVN_VA_NULL), "/ghi");
+  TEST_MANY((pool, "abc", "def", "/", SVN_VA_NULL), "/");
+  TEST_MANY((pool, "/", "/", "ghi", SVN_VA_NULL), "/ghi");
+  TEST_MANY((pool, "/", "/", "/", SVN_VA_NULL), "/");
+  TEST_MANY((pool, "/", SVN_EMPTY_PATH, "ghi", SVN_VA_NULL), "/ghi");
+  TEST_MANY((pool, "/", "def", SVN_EMPTY_PATH, SVN_VA_NULL), "/def");
+  TEST_MANY((pool, SVN_EMPTY_PATH, "/", "ghi", SVN_VA_NULL), "/ghi");
+  TEST_MANY((pool, "/", SVN_EMPTY_PATH, SVN_EMPTY_PATH, SVN_VA_NULL), "/");
+  TEST_MANY((pool, SVN_EMPTY_PATH, "/", SVN_EMPTY_PATH, SVN_VA_NULL), "/");
+  TEST_MANY((pool, SVN_EMPTY_PATH, SVN_EMPTY_PATH, "/", SVN_VA_NULL), "/");
+
+#ifdef SVN_USE_DOS_PATHS
+  TEST_MANY((pool, "X:/", "def", "ghi", SVN_VA_NULL), "X:/def/ghi");
+  TEST_MANY((pool, "abc", "X:/", "ghi", SVN_VA_NULL), "X:/ghi");
+  TEST_MANY((pool, "abc", "def", "X:/", SVN_VA_NULL), "X:/");
+  TEST_MANY((pool, "X:/", "X:/", "ghi", SVN_VA_NULL), "X:/ghi");
+  TEST_MANY((pool, "X:/", "X:/", "/", SVN_VA_NULL), "/");
+  TEST_MANY((pool, "X:/", SVN_EMPTY_PATH, "ghi", SVN_VA_NULL), "X:/ghi");
+  TEST_MANY((pool, "X:/", "def", SVN_EMPTY_PATH, SVN_VA_NULL), "X:/def");
+  TEST_MANY((pool, SVN_EMPTY_PATH, "X:/", "ghi", SVN_VA_NULL), "X:/ghi");
+  TEST_MANY((pool, "X:/", SVN_EMPTY_PATH, SVN_EMPTY_PATH, SVN_VA_NULL), "X:/");
+  TEST_MANY((pool, SVN_EMPTY_PATH, "X:/", SVN_EMPTY_PATH, SVN_VA_NULL), "X:/");
+  TEST_MANY((pool, SVN_EMPTY_PATH, SVN_EMPTY_PATH, "X:/", SVN_VA_NULL), "X:/");
+
+  TEST_MANY((pool, "X:", "def", "ghi", SVN_VA_NULL), "X:def/ghi");
+  TEST_MANY((pool, "X:", "X:/", "ghi", SVN_VA_NULL), "X:/ghi");
+  TEST_MANY((pool, "X:", "X:/", "/", SVN_VA_NULL), "/");
+  TEST_MANY((pool, "X:", SVN_EMPTY_PATH, "ghi", SVN_VA_NULL), "X:ghi");
+  TEST_MANY((pool, "X:", "def", SVN_EMPTY_PATH, SVN_VA_NULL), "X:def");
+  TEST_MANY((pool, SVN_EMPTY_PATH, "X:", "ghi", SVN_VA_NULL), "X:ghi");
+  TEST_MANY((pool, "//srv/shr", "def", "ghi", SVN_VA_NULL), "//srv/shr/def/ghi");
+  TEST_MANY((pool, "//srv/shr/fld", "def", "ghi", SVN_VA_NULL), "//srv/shr/fld/def/ghi");
+  TEST_MANY((pool, "//srv/shr/fld", "def", "//srv/shr", SVN_VA_NULL), "//srv/shr");
+  TEST_MANY((pool, "//srv/s r/fld", "def", "//srv/s r", SVN_VA_NULL), "//srv/s r");
+  TEST_MANY((pool, SVN_EMPTY_PATH, "//srv/shr/fld", "def", "ghi", SVN_VA_NULL), "//srv/shr/fld/def/ghi");
+  TEST_MANY((pool, SVN_EMPTY_PATH, "//srv/shr/fld", "def", "//srv/shr", SVN_VA_NULL), "//srv/shr");
 
-  TEST_MANY((pool, "abcd", "/dir", "A:", "file", NULL), "A:file");
-  TEST_MANY((pool, "abcd", "A:", "/dir", "file", NULL), "A:/dir/file");
+  TEST_MANY((pool, "abcd", "/dir", "A:", "file", SVN_VA_NULL), "A:file");
+  TEST_MANY((pool, "abcd", "A:", "/dir", "file", SVN_VA_NULL), "A:/dir/file");
 
 #else /* !SVN_USE_DOS_PATHS */
-  TEST_MANY((pool, "X:", "def", "ghi", NULL), "X:/def/ghi");
-  TEST_MANY((pool, "X:", SVN_EMPTY_PATH, "ghi", NULL), "X:/ghi");
-  TEST_MANY((pool, "X:", "def", SVN_EMPTY_PATH, NULL), "X:/def");
-  TEST_MANY((pool, SVN_EMPTY_PATH, "X:", "ghi", NULL), "X:/ghi");
+  TEST_MANY((pool, "X:", "def", "ghi", SVN_VA_NULL), "X:/def/ghi");
+  TEST_MANY((pool, "X:", SVN_EMPTY_PATH, "ghi", SVN_VA_NULL), "X:/ghi");
+  TEST_MANY((pool, "X:", "def", SVN_EMPTY_PATH, SVN_VA_NULL), "X:/def");
+  TEST_MANY((pool, SVN_EMPTY_PATH, "X:", "ghi", SVN_VA_NULL), "X:/ghi");
 #endif /* SVN_USE_DOS_PATHS */
 
   /* ### probably need quite a few more tests... */
@@ -1939,10 +1939,10 @@ test_dirent_get_absolute(apr_pool_t *poo
         expect_abs = apr_pstrcat(pool, curdir, expect + 1, SVN_VA_NULL);
 #ifdef SVN_USE_DOS_PATHS
       if (*expect == '@')
-        expect_abs = apr_pstrcat(pool, curdironc, expect + 1, NULL);
+        expect_abs = apr_pstrcat(pool, curdironc, expect + 1, SVN_VA_NULL);
 
       if (*expect == '$')
-        expect_abs = apr_pstrcat(pool, curdrive, expect + 1, NULL);
+        expect_abs = apr_pstrcat(pool, curdrive, expect + 1, SVN_VA_NULL);
 
       /* Remove double '/' when CWD was the root dir (E.g. C:/) */
       expect_abs = svn_dirent_canonicalize(expect_abs, pool);
@@ -2717,6 +2717,8 @@ test_fspath_get_longest_ancestor(apr_poo
 
 /* The test table.  */
 
+int svn_test_max_threads = 1;
+
 struct svn_test_descriptor_t test_funcs[] =
   {
     SVN_TEST_NULL,

Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/error-code-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/error-code-test.c?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/error-code-test.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/error-code-test.c Wed Nov 27 07:53:29 2013
@@ -74,6 +74,8 @@ check_error_codes_unique(apr_pool_t *poo
 
 /* The test table.  */
 
+int svn_test_max_threads = 1;
+
 struct svn_test_descriptor_t test_funcs[] =
   {
     SVN_TEST_NULL,

Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/error-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/error-test.c?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/error-test.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/error-test.c Wed Nov 27 07:53:29 2013
@@ -229,6 +229,8 @@ test_error_symbolic_name(apr_pool_t *poo
 
 /* The test table.  */
 
+int svn_test_max_threads = 1;
+
 struct svn_test_descriptor_t test_funcs[] =
   {
     SVN_TEST_NULL,

Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/hashdump-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/hashdump-test.c?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/hashdump-test.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/hashdump-test.c Wed Nov 27 07:53:29 2013
@@ -178,6 +178,9 @@ test3(apr_pool_t *pool)
 */
 
 /* An array of all test functions */
+
+int svn_test_max_threads = 1;
+
 struct svn_test_descriptor_t test_funcs[] =
   {
     SVN_TEST_NULL,

Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/io-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/io-test.c?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/io-test.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/io-test.c Wed Nov 27 07:53:29 2013
@@ -39,7 +39,7 @@
 
 /* Helpers to create the test data directory. */
 
-#define TEST_DIR "io-test-temp"
+#define TEST_DIR_PREFIX "io-test-temp"
 
 /* The definition for the test data files. */
 struct test_file_definition_t
@@ -66,7 +66,7 @@ struct test_file_definition_t
     char* created_path;
   };
 
-struct test_file_definition_t test_file_definitions[] =
+struct test_file_definition_t test_file_definitions_template[] =
   {
     {"empty",                 "",      0},
     {"single_a",              "a",     1},
@@ -121,6 +121,7 @@ struct test_file_definition_t test_file_
 
 static svn_error_t *
 create_test_file(struct test_file_definition_t* definition,
+                 const char *testname,
                  apr_pool_t *pool,
                  apr_pool_t *scratch_pool)
 {
@@ -129,6 +130,7 @@ create_test_file(struct test_file_defini
   apr_off_t midpos = definition->size / 2;
   svn_error_t *err = NULL;
   int i;
+  const char *test_dir = apr_pstrcat(pool, TEST_DIR_PREFIX, testname, NULL);
 
   if (definition->size < 5)
     SVN_ERR_ASSERT(strlen(definition->data) >= (apr_size_t)definition->size);
@@ -136,9 +138,9 @@ create_test_file(struct test_file_defini
     SVN_ERR_ASSERT(strlen(definition->data) >= 5);
 
 
-  definition->created_path = svn_dirent_join(TEST_DIR,
-                                  definition->name,
-                                  pool);
+  definition->created_path = svn_dirent_join(test_dir,
+                                             definition->name,
+                                             pool);
 
   SVN_ERR(svn_io_file_open(&file_h,
                            definition->created_path,
@@ -176,37 +178,47 @@ create_test_file(struct test_file_defini
 
 /* Function to prepare the whole set of on-disk files to be compared. */
 static svn_error_t *
-create_comparison_candidates(apr_pool_t *scratch_pool)
+create_comparison_candidates(struct test_file_definition_t **definitions,
+                             const char *testname,
+                             apr_pool_t *pool)
 {
   svn_node_kind_t kind;
-  apr_pool_t *iterpool = svn_pool_create(scratch_pool);
+  apr_pool_t *iterpool = svn_pool_create(pool);
   struct test_file_definition_t *candidate;
   svn_error_t *err = SVN_NO_ERROR;
+  apr_size_t count = 0;
+  const char *test_dir = apr_pstrcat(pool, TEST_DIR_PREFIX,
+                                     testname, NULL);
 
   /* If there's already a directory named io-test-temp, delete it.
      Doing things this way means that repositories stick around after
      a failure for postmortem analysis, but also that tests can be
      re-run without cleaning out the repositories created by prior
      runs.  */
-  SVN_ERR(svn_io_check_path(TEST_DIR, &kind, scratch_pool));
+  SVN_ERR(svn_io_check_path(test_dir, &kind, pool));
 
   if (kind == svn_node_dir)
-    SVN_ERR(svn_io_remove_dir2(TEST_DIR, TRUE, NULL, NULL, scratch_pool));
+    SVN_ERR(svn_io_remove_dir2(test_dir, TRUE, NULL, NULL, pool));
   else if (kind != svn_node_none)
     return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
                              "There is already a file named '%s'",
-                             TEST_DIR);
+                             test_dir);
 
-  SVN_ERR(svn_io_dir_make(TEST_DIR, APR_OS_DEFAULT, scratch_pool));
+  SVN_ERR(svn_io_dir_make(test_dir, APR_OS_DEFAULT, pool));
 
-  svn_test_add_dir_cleanup(TEST_DIR);
+  svn_test_add_dir_cleanup(test_dir);
 
-  for (candidate = test_file_definitions;
+  for (candidate = test_file_definitions_template;
        candidate->name != NULL;
        candidate += 1)
+    count++;
+
+  *definitions = apr_pmemdup(pool, test_file_definitions_template,
+                             (count + 1) * sizeof(**definitions));
+  for (candidate = *definitions; candidate->name != NULL; candidate += 1)
     {
       svn_pool_clear(iterpool);
-      err = create_test_file(candidate, scratch_pool, iterpool);
+      err = create_test_file(candidate, testname, pool, iterpool);
       if (err)
         break;
     }
@@ -229,8 +241,11 @@ test_two_file_size_comparison(apr_pool_t
   svn_error_t *err = SVN_NO_ERROR;
   svn_error_t *cmp_err;
   apr_pool_t *iterpool = svn_pool_create(scratch_pool);
+  struct test_file_definition_t *test_file_definitions;
 
-  SVN_ERR(create_comparison_candidates(scratch_pool));
+  SVN_ERR(create_comparison_candidates(&test_file_definitions,
+                                       "test_two_file_size_comparison",
+                                       scratch_pool));
 
   for (outer = test_file_definitions; outer->name != NULL; outer += 1)
     {
@@ -280,8 +295,11 @@ test_two_file_content_comparison(apr_poo
   svn_error_t *err = SVN_NO_ERROR;
   svn_error_t *cmp_err;
   apr_pool_t *iterpool = svn_pool_create(scratch_pool);
+  struct test_file_definition_t *test_file_definitions;
 
-  SVN_ERR(create_comparison_candidates(scratch_pool));
+  SVN_ERR(create_comparison_candidates(&test_file_definitions,
+                                       "test_two_file_content_comparison",
+                                       scratch_pool));
 
   for (outer = test_file_definitions; outer->name != NULL; outer += 1)
     {
@@ -333,8 +351,11 @@ test_three_file_size_comparison(apr_pool
   svn_error_t *err = SVN_NO_ERROR;
   svn_error_t *cmp_err;
   apr_pool_t *iterpool = svn_pool_create(scratch_pool);
+  struct test_file_definition_t *test_file_definitions;
 
-  SVN_ERR(create_comparison_candidates(scratch_pool));
+  SVN_ERR(create_comparison_candidates(&test_file_definitions,
+                                       "test_three_file_size_comparison",
+                                       scratch_pool));
 
   for (outer = test_file_definitions; outer->name != NULL; outer += 1)
     {
@@ -413,8 +434,11 @@ test_three_file_content_comparison(apr_p
   svn_error_t *err = SVN_NO_ERROR;
   svn_error_t *cmp_err;
   apr_pool_t *iterpool = svn_pool_create(scratch_pool);
+  struct test_file_definition_t *test_file_definitions;
 
-  SVN_ERR(create_comparison_candidates(scratch_pool));
+  SVN_ERR(create_comparison_candidates(&test_file_definitions,
+                                       "test_three_file_content_comparison",
+                                       scratch_pool));
 
   for (outer = test_file_definitions; outer->name != NULL; outer += 1)
     {
@@ -642,6 +666,8 @@ aligned_seek_test(apr_pool_t *pool)
 
 /* The test table.  */
 
+int svn_test_max_threads = 3;
+
 struct svn_test_descriptor_t test_funcs[] =
   {
     SVN_TEST_NULL,

Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/mergeinfo-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/mergeinfo-test.c?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/mergeinfo-test.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/mergeinfo-test.c Wed Nov 27 07:53:29 2013
@@ -115,10 +115,6 @@ verify_mergeinfo_parse(const char *input
 }
 
 
-/* Some of our own global variables (for simplicity), which map paths
-   -> merge ranges. */
-static apr_hash_t *info1, *info2;
-
 #define NBR_MERGEINFO_VALS 24
 
 /* Valid mergeinfo values. */
@@ -269,6 +265,7 @@ test_parse_combine_rangeinfo(apr_pool_t 
 {
   apr_array_header_t *result;
   svn_merge_range_t *resultrange;
+  apr_hash_t *info1;
 
   SVN_ERR(svn_mergeinfo_parse(&info1, single_mergeinfo, pool));
 
@@ -347,6 +344,7 @@ test_parse_broken_mergeinfo(apr_pool_t *
 {
   int i;
   svn_error_t *err;
+  apr_hash_t *info1;
 
   /* Trigger some error(s) with mal-formed input. */
   for (i = 0; i < NBR_BROKEN_MERGEINFO_VALS; i++)
@@ -566,6 +564,7 @@ test_mergeinfo_intersect(apr_pool_t *poo
     { {0, 1, TRUE}, {2, 4, TRUE}, {11, 12, TRUE} };
   svn_rangelist_t *rangelist;
   apr_hash_t *intersection;
+  apr_hash_t *info1, *info2;
 
   SVN_ERR(svn_mergeinfo_parse(&info1, "/trunk: 1-6,12-16\n/foo: 31", pool));
   SVN_ERR(svn_mergeinfo_parse(&info2, "/trunk: 1,3-4,7,9,11-12", pool));
@@ -702,6 +701,7 @@ test_merge_mergeinfo(apr_pool_t *pool)
     {
       int j;
       svn_string_t *info2_starting, *info2_ending;
+      apr_hash_t *info1, *info2;
 
       SVN_ERR(svn_mergeinfo_parse(&info1, mergeinfo[i].mergeinfo1, pool));
       SVN_ERR(svn_mergeinfo_parse(&info2, mergeinfo[i].mergeinfo2, pool));
@@ -1110,6 +1110,7 @@ test_rangelist_to_string(apr_pool_t *poo
   svn_rangelist_t *result;
   svn_string_t *output;
   svn_string_t *expected = svn_string_create("3,5,7-11,13-14", pool);
+  apr_hash_t *info1;
 
   SVN_ERR(svn_mergeinfo_parse(&info1, mergeinfo1, pool));
 
@@ -1130,6 +1131,7 @@ test_mergeinfo_to_string(apr_pool_t *poo
 {
   svn_string_t *output;
   svn_string_t *expected;
+  apr_hash_t *info1, *info2;
   expected = svn_string_create("/fred:8-10\n/trunk:3,5,7-11,13-14", pool);
 
   SVN_ERR(svn_mergeinfo_parse(&info1, mergeinfo1, pool));
@@ -1671,6 +1673,8 @@ test_remove_prefix_from_catalog(apr_pool
 
 /* The test table.  */
 
+int svn_test_max_threads = 1;
+
 struct svn_test_descriptor_t test_funcs[] =
   {
     SVN_TEST_NULL,

Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/named_atomic-test-common.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/named_atomic-test-common.h?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/named_atomic-test-common.h (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/named_atomic-test-common.h Wed Nov 27 07:53:29 2013
@@ -209,7 +209,7 @@ test_pipeline(int id, int count, int ite
                                             ATOMIC_NAME,
                                             apr_itoa(pool,
                                                      id),
-                                            NULL),
+                                            SVN_VA_NULL),
                                 FALSE));
   SVN_ERR(svn_named_atomic__get(&atomic_out,
                                 ns,
@@ -217,7 +217,7 @@ test_pipeline(int id, int count, int ite
                                             ATOMIC_NAME,
                                             apr_itoa(pool,
                                                      (id + 1) % count),
-                                            NULL),
+                                            SVN_VA_NULL),
                                 FALSE));
 
   /* our iteration counter */

Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/named_atomic-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/named_atomic-test.c?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/named_atomic-test.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/named_atomic-test.c Wed Nov 27 07:53:29 2013
@@ -57,7 +57,7 @@ adjust_proc_path(const char **proc, cons
   char path [MAX_PATH] = { 0 };
   GetModuleFileNameA(NULL, path, sizeof(path));
   *(strrchr(path, '\\') + 1) = 0;
-  *proc = apr_pstrcat(pool, path, *proc, ".exe", NULL);
+  *proc = apr_pstrcat(pool, path, *proc, ".exe", SVN_VA_NULL);
 
   /* And we need to set the working dir to our working dir to make
    * our sub-processes find all DLLs. */
@@ -215,7 +215,7 @@ init_concurrency_test_shm(apr_pool_t *po
                                     apr_pstrcat(pool,
                                                 ATOMIC_NAME,
                                                 apr_itoa(pool, i),
-                                                NULL),
+                                                SVN_VA_NULL),
                                     TRUE));
       SVN_ERR(svn_named_atomic__write(NULL, 0, atomic));
     }
@@ -390,9 +390,9 @@ calibrate_iterations(apr_pool_t *pool, i
   int calib_iterations;
   double taken = 0.0;
 
-  /* increase iterations until we pass the 100ms mark */
+  /* increase iterations until we pass the 20ms mark */
 
-  for (calib_iterations = 10; taken < 100000.0; calib_iterations *= 2)
+  for (calib_iterations = 10; taken < 20000.0; calib_iterations *= 2)
     {
       apr_pool_t *scratch = svn_pool_create(pool);
       SVN_ERR(init_concurrency_test_shm(scratch, count));
@@ -404,16 +404,19 @@ calibrate_iterations(apr_pool_t *pool, i
       svn_pool_destroy(scratch);
     }
 
-  /* scale that to 1s */
+  /* scale that to .1s */
+  suggested_iterations = (int)(100000.0 / taken * calib_iterations);
 
-  suggested_iterations = (int)(1000000.0 / taken * calib_iterations);
+  /* 250k iterations should be plenty in any case. */
+  if (suggested_iterations > 250000)
+    suggested_iterations = 250000;
 
   return SVN_NO_ERROR;
 }
 
 /* Find out how far the system will scale, i.e. how many workers can be
  * run concurrently without experiencing significant slowdowns.
- * Sets HW_THREAD_COUNT to a value of 2 .. 32 (limit the system impact in
+ * Sets HW_THREAD_COUNT to a value of 2 .. 8 (limit the system impact in
  * case our heuristics fail) and determines the number of iterations.
  * Can be called multiple times but will skip the calculations after the
  * first successful run.
@@ -432,7 +435,7 @@ calibrate_concurrency(apr_pool_t *pool)
       if (svn_named_atomic__is_efficient() && proc_found(TEST_PROC, pool))
         {
           SVN_ERR(calibrate_iterations(pool, 2));
-          for (; hw_thread_count < 32; hw_thread_count *= 2)
+          for (; hw_thread_count < 8; hw_thread_count *= 2)
             {
               int saved_suggestion = suggested_iterations;
 
@@ -742,6 +745,9 @@ test_multiprocess(apr_pool_t *pool)
 */
 
 /* An array of all test functions */
+
+int svn_test_max_threads = 1;
+
 struct svn_test_descriptor_t test_funcs[] =
   {
     SVN_TEST_NULL,

Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/opt-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/opt-test.c?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/opt-test.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/opt-test.c Wed Nov 27 07:53:29 2013
@@ -193,6 +193,8 @@ test_svn_opt_args_to_target_array2(apr_p
 
 /* The test table.  */
 
+int svn_test_max_threads = 1;
+
 struct svn_test_descriptor_t test_funcs[] =
   {
     SVN_TEST_NULL,

Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/packed-data-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/packed-data-test.c?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/packed-data-test.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/packed-data-test.c Wed Nov 27 07:53:29 2013
@@ -548,6 +548,9 @@ test_full_structure(apr_pool_t *pool)
 }
 
 /* An array of all test functions */
+
+int svn_test_max_threads = 1;
+
 struct svn_test_descriptor_t test_funcs[] =
   {
     SVN_TEST_NULL,

Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/path-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/path-test.c?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/path-test.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/path-test.c Wed Nov 27 07:53:29 2013
@@ -505,74 +505,74 @@ test_path_join(apr_pool_t *pool)
                              "expected \"%s\"", \
                              result, expect);
 
-  TEST_MANY((pool, "abc", NULL), "abc");
-  TEST_MANY((pool, "/abc", NULL), "/abc");
-  TEST_MANY((pool, "/", NULL), "/");
-
-  TEST_MANY((pool, "abc", "def", "ghi", NULL), "abc/def/ghi");
-  TEST_MANY((pool, "abc", "/def", "ghi", NULL), "/def/ghi");
-  TEST_MANY((pool, "/abc", "def", "ghi", NULL), "/abc/def/ghi");
-  TEST_MANY((pool, "abc", "def", "/ghi", NULL), "/ghi");
-  TEST_MANY((pool, "/", "def", "/ghi", NULL), "/ghi");
-  TEST_MANY((pool, "/", "/def", "/ghi", NULL), "/ghi");
-
-  TEST_MANY((pool, SVN_EMPTY_PATH, "def", "ghi", NULL), "def/ghi");
-  TEST_MANY((pool, "abc", SVN_EMPTY_PATH, "ghi", NULL), "abc/ghi");
-  TEST_MANY((pool, "abc", "def", SVN_EMPTY_PATH, NULL), "abc/def");
-  TEST_MANY((pool, SVN_EMPTY_PATH, "def", SVN_EMPTY_PATH, NULL), "def");
-  TEST_MANY((pool, SVN_EMPTY_PATH, SVN_EMPTY_PATH, "ghi", NULL), "ghi");
-  TEST_MANY((pool, "abc", SVN_EMPTY_PATH, SVN_EMPTY_PATH, NULL), "abc");
-  TEST_MANY((pool, SVN_EMPTY_PATH, "def", "/ghi", NULL), "/ghi");
-  TEST_MANY((pool, SVN_EMPTY_PATH, SVN_EMPTY_PATH, "/ghi", NULL), "/ghi");
-
-  TEST_MANY((pool, "/", "def", "ghi", NULL), "/def/ghi");
-  TEST_MANY((pool, "abc", "/", "ghi", NULL), "/ghi");
-  TEST_MANY((pool, "abc", "def", "/", NULL), "/");
-  TEST_MANY((pool, "/", "/", "ghi", NULL), "/ghi");
-  TEST_MANY((pool, "/", "/", "/", NULL), "/");
-  TEST_MANY((pool, "/", SVN_EMPTY_PATH, "ghi", NULL), "/ghi");
-  TEST_MANY((pool, "/", "def", SVN_EMPTY_PATH, NULL), "/def");
-  TEST_MANY((pool, SVN_EMPTY_PATH, "/", "ghi", NULL), "/ghi");
-  TEST_MANY((pool, "/", SVN_EMPTY_PATH, SVN_EMPTY_PATH, NULL), "/");
-  TEST_MANY((pool, SVN_EMPTY_PATH, "/", SVN_EMPTY_PATH, NULL), "/");
-  TEST_MANY((pool, SVN_EMPTY_PATH, SVN_EMPTY_PATH, "/", NULL), "/");
+  TEST_MANY((pool, "abc", SVN_VA_NULL), "abc");
+  TEST_MANY((pool, "/abc", SVN_VA_NULL), "/abc");
+  TEST_MANY((pool, "/", SVN_VA_NULL), "/");
+
+  TEST_MANY((pool, "abc", "def", "ghi", SVN_VA_NULL), "abc/def/ghi");
+  TEST_MANY((pool, "abc", "/def", "ghi", SVN_VA_NULL), "/def/ghi");
+  TEST_MANY((pool, "/abc", "def", "ghi", SVN_VA_NULL), "/abc/def/ghi");
+  TEST_MANY((pool, "abc", "def", "/ghi", SVN_VA_NULL), "/ghi");
+  TEST_MANY((pool, "/", "def", "/ghi", SVN_VA_NULL), "/ghi");
+  TEST_MANY((pool, "/", "/def", "/ghi", SVN_VA_NULL), "/ghi");
+
+  TEST_MANY((pool, SVN_EMPTY_PATH, "def", "ghi", SVN_VA_NULL), "def/ghi");
+  TEST_MANY((pool, "abc", SVN_EMPTY_PATH, "ghi", SVN_VA_NULL), "abc/ghi");
+  TEST_MANY((pool, "abc", "def", SVN_EMPTY_PATH, SVN_VA_NULL), "abc/def");
+  TEST_MANY((pool, SVN_EMPTY_PATH, "def", SVN_EMPTY_PATH, SVN_VA_NULL), "def");
+  TEST_MANY((pool, SVN_EMPTY_PATH, SVN_EMPTY_PATH, "ghi", SVN_VA_NULL), "ghi");
+  TEST_MANY((pool, "abc", SVN_EMPTY_PATH, SVN_EMPTY_PATH, SVN_VA_NULL), "abc");
+  TEST_MANY((pool, SVN_EMPTY_PATH, "def", "/ghi", SVN_VA_NULL), "/ghi");
+  TEST_MANY((pool, SVN_EMPTY_PATH, SVN_EMPTY_PATH, "/ghi", SVN_VA_NULL), "/ghi");
+
+  TEST_MANY((pool, "/", "def", "ghi", SVN_VA_NULL), "/def/ghi");
+  TEST_MANY((pool, "abc", "/", "ghi", SVN_VA_NULL), "/ghi");
+  TEST_MANY((pool, "abc", "def", "/", SVN_VA_NULL), "/");
+  TEST_MANY((pool, "/", "/", "ghi", SVN_VA_NULL), "/ghi");
+  TEST_MANY((pool, "/", "/", "/", SVN_VA_NULL), "/");
+  TEST_MANY((pool, "/", SVN_EMPTY_PATH, "ghi", SVN_VA_NULL), "/ghi");
+  TEST_MANY((pool, "/", "def", SVN_EMPTY_PATH, SVN_VA_NULL), "/def");
+  TEST_MANY((pool, SVN_EMPTY_PATH, "/", "ghi", SVN_VA_NULL), "/ghi");
+  TEST_MANY((pool, "/", SVN_EMPTY_PATH, SVN_EMPTY_PATH, SVN_VA_NULL), "/");
+  TEST_MANY((pool, SVN_EMPTY_PATH, "/", SVN_EMPTY_PATH, SVN_VA_NULL), "/");
+  TEST_MANY((pool, SVN_EMPTY_PATH, SVN_EMPTY_PATH, "/", SVN_VA_NULL), "/");
 
 #ifdef SVN_USE_DOS_PATHS
 /* These will fail, see issue #2028
-  TEST_MANY((pool, "X:", "def", "ghi", NULL), "X:def/ghi");
-  TEST_MANY((pool, "X:", SVN_EMPTY_PATH, "ghi", NULL), "X:ghi");
-  TEST_MANY((pool, "X:", "def", SVN_EMPTY_PATH, NULL), "X:def");
-  TEST_MANY((pool, SVN_EMPTY_PATH, "X:", "ghi", NULL), "X:ghi");
-  TEST_MANY((pool, "X:/", "def", "ghi", NULL), "X:/def/ghi");
-  TEST_MANY((pool, "abc", "X:/", "ghi", NULL), "X:/ghi");
-  TEST_MANY((pool, "abc", "def", "X:/", NULL), "X:/");
-  TEST_MANY((pool, "X:/", "X:/", "ghi", NULL), "X:/ghi");
-  TEST_MANY((pool, "X:/", "X:/", "/", NULL), "/");
-  TEST_MANY((pool, "X:/", SVN_EMPTY_PATH, "ghi", NULL), "X:/ghi");
-  TEST_MANY((pool, "X:/", "def", SVN_EMPTY_PATH, NULL), "X:/def");
-  TEST_MANY((pool, SVN_EMPTY_PATH, "X:/", "ghi", NULL), "X:/ghi");
-  TEST_MANY((pool, "X:/", SVN_EMPTY_PATH, SVN_EMPTY_PATH, NULL), "X:/");
-  TEST_MANY((pool, SVN_EMPTY_PATH, "X:/", SVN_EMPTY_PATH, NULL), "X:/");
-  TEST_MANY((pool, SVN_EMPTY_PATH, SVN_EMPTY_PATH, "X:/", NULL), "X:/");
-  TEST_MANY((pool, "X:", "X:/", "ghi", NULL), "X:/ghi");
-  TEST_MANY((pool, "X:", "X:/", "/", NULL), "/");
-
-  TEST_MANY((pool, "//srv/shr", "def", "ghi", NULL), "//srv/shr/def/ghi");
-  TEST_MANY((pool, "//srv", "shr", "def", "ghi", NULL), "//srv/shr/def/ghi");
-  TEST_MANY((pool, "//srv/shr/fld", "def", "ghi", NULL),
+  TEST_MANY((pool, "X:", "def", "ghi", SVN_VA_NULL), "X:def/ghi");
+  TEST_MANY((pool, "X:", SVN_EMPTY_PATH, "ghi", SVN_VA_NULL), "X:ghi");
+  TEST_MANY((pool, "X:", "def", SVN_EMPTY_PATH, SVN_VA_NULL), "X:def");
+  TEST_MANY((pool, SVN_EMPTY_PATH, "X:", "ghi", SVN_VA_NULL), "X:ghi");
+  TEST_MANY((pool, "X:/", "def", "ghi", SVN_VA_NULL), "X:/def/ghi");
+  TEST_MANY((pool, "abc", "X:/", "ghi", SVN_VA_NULL), "X:/ghi");
+  TEST_MANY((pool, "abc", "def", "X:/", SVN_VA_NULL), "X:/");
+  TEST_MANY((pool, "X:/", "X:/", "ghi", SVN_VA_NULL), "X:/ghi");
+  TEST_MANY((pool, "X:/", "X:/", "/", SVN_VA_NULL), "/");
+  TEST_MANY((pool, "X:/", SVN_EMPTY_PATH, "ghi", SVN_VA_NULL), "X:/ghi");
+  TEST_MANY((pool, "X:/", "def", SVN_EMPTY_PATH, SVN_VA_NULL), "X:/def");
+  TEST_MANY((pool, SVN_EMPTY_PATH, "X:/", "ghi", SVN_VA_NULL), "X:/ghi");
+  TEST_MANY((pool, "X:/", SVN_EMPTY_PATH, SVN_EMPTY_PATH, SVN_VA_NULL), "X:/");
+  TEST_MANY((pool, SVN_EMPTY_PATH, "X:/", SVN_EMPTY_PATH, SVN_VA_NULL), "X:/");
+  TEST_MANY((pool, SVN_EMPTY_PATH, SVN_EMPTY_PATH, "X:/", SVN_VA_NULL), "X:/");
+  TEST_MANY((pool, "X:", "X:/", "ghi", SVN_VA_NULL), "X:/ghi");
+  TEST_MANY((pool, "X:", "X:/", "/", SVN_VA_NULL), "/");
+
+  TEST_MANY((pool, "//srv/shr", "def", "ghi", SVN_VA_NULL), "//srv/shr/def/ghi");
+  TEST_MANY((pool, "//srv", "shr", "def", "ghi", SVN_VA_NULL), "//srv/shr/def/ghi");
+  TEST_MANY((pool, "//srv/shr/fld", "def", "ghi", SVN_VA_NULL),
             "//srv/shr/fld/def/ghi");
-  TEST_MANY((pool, "//srv/shr/fld", "def", "//srv/shr", NULL), "//srv/shr");
-  TEST_MANY((pool, "//srv", "shr", "//srv/shr", NULL), "//srv/shr");
-  TEST_MANY((pool, SVN_EMPTY_PATH, "//srv/shr/fld", "def", "ghi", NULL),
+  TEST_MANY((pool, "//srv/shr/fld", "def", "//srv/shr", SVN_VA_NULL), "//srv/shr");
+  TEST_MANY((pool, "//srv", "shr", "//srv/shr", SVN_VA_NULL), "//srv/shr");
+  TEST_MANY((pool, SVN_EMPTY_PATH, "//srv/shr/fld", "def", "ghi", SVN_VA_NULL),
             "//srv/shr/fld/def/ghi");
-  TEST_MANY((pool, SVN_EMPTY_PATH, "//srv/shr/fld", "def", "//srv/shr", NULL),
+  TEST_MANY((pool, SVN_EMPTY_PATH, "//srv/shr/fld", "def", "//srv/shr", SVN_VA_NULL),
             "//srv/shr");
 */
 #else /* WIN32 or Cygwin */
-  TEST_MANY((pool, "X:", "def", "ghi", NULL), "X:/def/ghi");
-  TEST_MANY((pool, "X:", SVN_EMPTY_PATH, "ghi", NULL), "X:/ghi");
-  TEST_MANY((pool, "X:", "def", SVN_EMPTY_PATH, NULL), "X:/def");
-  TEST_MANY((pool, SVN_EMPTY_PATH, "X:", "ghi", NULL), "X:/ghi");
+  TEST_MANY((pool, "X:", "def", "ghi", SVN_VA_NULL), "X:/def/ghi");
+  TEST_MANY((pool, "X:", SVN_EMPTY_PATH, "ghi", SVN_VA_NULL), "X:/ghi");
+  TEST_MANY((pool, "X:", "def", SVN_EMPTY_PATH, SVN_VA_NULL), "X:/def");
+  TEST_MANY((pool, SVN_EMPTY_PATH, "X:", "ghi", SVN_VA_NULL), "X:/ghi");
 #endif /* non-WIN32 */
 
   /* ### probably need quite a few more tests... */
@@ -1700,6 +1700,8 @@ test_path_resolve_repos_relative_url(apr
 
 /* The test table.  */
 
+int svn_test_max_threads = 1;
+
 struct svn_test_descriptor_t test_funcs[] =
   {
     SVN_TEST_NULL,

Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/prefix-string-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/prefix-string-test.c?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/prefix-string-test.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/prefix-string-test.c Wed Nov 27 07:53:29 2013
@@ -136,6 +136,9 @@ test_string_comparison(apr_pool_t *pool)
 }
 
 /* An array of all test functions */
+
+int svn_test_max_threads = 1;
+
 struct svn_test_descriptor_t test_funcs[] =
   {
     SVN_TEST_NULL,

Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/priority-queue-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/priority-queue-test.c?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/priority-queue-test.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/priority-queue-test.c Wed Nov 27 07:53:29 2013
@@ -220,6 +220,9 @@ test_update(apr_pool_t *pool)
 }
 
 /* An array of all test functions */
+
+int svn_test_max_threads = 1;
+
 struct svn_test_descriptor_t test_funcs[] =
   {
     SVN_TEST_NULL,

Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/revision-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/revision-test.c?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/revision-test.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/revision-test.c Wed Nov 27 07:53:29 2013
@@ -123,6 +123,8 @@ test_revnum_parse(apr_pool_t *pool)
 
 /* The test table.  */
 
+int svn_test_max_threads = 1;
+
 struct svn_test_descriptor_t test_funcs[] =
   {
     SVN_TEST_NULL,

Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/root-pools-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/root-pools-test.c?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/root-pools-test.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/root-pools-test.c Wed Nov 27 07:53:29 2013
@@ -121,6 +121,8 @@ test_root_pool_concurrency(apr_pool_t *p
 
 /* The test table.  */
 
+int svn_test_max_threads = 1;
+
 struct svn_test_descriptor_t test_funcs[] =
   {
     SVN_TEST_NULL,

Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/skel-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/skel-test.c?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/skel-test.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/skel-test.c Wed Nov 27 07:53:29 2013
@@ -886,6 +886,8 @@ unparse_list(apr_pool_t *pool)
 
 /* The test table.  */
 
+int svn_test_max_threads = 1;
+
 struct svn_test_descriptor_t test_funcs[] =
   {
     SVN_TEST_NULL,

Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/spillbuf-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/spillbuf-test.c?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/spillbuf-test.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/spillbuf-test.c Wed Nov 27 07:53:29 2013
@@ -560,6 +560,9 @@ test_spillbuf_file_attrs_spill_all(apr_p
 }
 
 /* The test table.  */
+
+int svn_test_max_threads = 1;
+
 struct svn_test_descriptor_t test_funcs[] =
   {
     SVN_TEST_NULL,

Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/sqlite-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/sqlite-test.c?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/sqlite-test.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/sqlite-test.c Wed Nov 27 07:53:29 2013
@@ -112,6 +112,8 @@ test_sqlite_reset(apr_pool_t *pool)
 }
 
 
+int svn_test_max_threads = 1;
+
 struct svn_test_descriptor_t test_funcs[] =
   {
     SVN_TEST_NULL,

Propchange: subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/sqlite-test.c
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/stream-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/stream-test.c?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/stream-test.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/stream-test.c Wed Nov 27 07:53:29 2013
@@ -773,6 +773,8 @@ test_stringbuf_from_stream(apr_pool_t *p
 
 /* The test table.  */
 
+int svn_test_max_threads = 1;
+
 struct svn_test_descriptor_t test_funcs[] =
   {
     SVN_TEST_NULL,

Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/string-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/string-test.c?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/string-test.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/string-test.c Wed Nov 27 07:53:29 2013
@@ -59,7 +59,6 @@ fail(apr_pool_t *pool, const char *fmt, 
 
 /* Some of our own global variables, for simplicity.  Yes,
    simplicity. */
-svn_stringbuf_t *a = NULL, *b = NULL, *c = NULL;
 const char *phrase_1 = "hello, ";
 const char *phrase_2 = "a longish phrase of sorts, longer than 16 anyway";
 
@@ -69,7 +68,7 @@ const char *phrase_2 = "a longish phrase
 static svn_error_t *
 test1(apr_pool_t *pool)
 {
-  a = svn_stringbuf_create(phrase_1, pool);
+  svn_stringbuf_t *a = svn_stringbuf_create(phrase_1, pool);
 
   /* Test that length, data, and null-termination are correct. */
   if ((a->len == strlen(phrase_1)) && ((strcmp(a->data, phrase_1)) == 0))
@@ -82,7 +81,7 @@ test1(apr_pool_t *pool)
 static svn_error_t *
 test2(apr_pool_t *pool)
 {
-  b = svn_stringbuf_ncreate(phrase_2, 16, pool);
+  svn_stringbuf_t *b = svn_stringbuf_ncreate(phrase_2, 16, pool);
 
   /* Test that length, data, and null-termination are correct. */
   if ((b->len == 16) && ((strncmp(b->data, phrase_2, 16)) == 0))
@@ -98,8 +97,8 @@ test3(apr_pool_t *pool)
   char *tmp;
   size_t old_len;
 
-  a = svn_stringbuf_create(phrase_1, pool);
-  b = svn_stringbuf_ncreate(phrase_2, 16, pool);
+  svn_stringbuf_t *a = svn_stringbuf_create(phrase_1, pool);
+  svn_stringbuf_t *b = svn_stringbuf_ncreate(phrase_2, 16, pool);
 
   tmp = apr_palloc(pool, (a->len + b->len + 1));
   strcpy(tmp, a->data);
@@ -118,7 +117,7 @@ test3(apr_pool_t *pool)
 static svn_error_t *
 test4(apr_pool_t *pool)
 {
-  a = svn_stringbuf_create(phrase_1, pool);
+  svn_stringbuf_t *a = svn_stringbuf_create(phrase_1, pool);
   svn_stringbuf_appendcstr(a, "new bytes to append");
 
   /* Test that length, data, and null-termination are correct. */
@@ -133,7 +132,7 @@ test4(apr_pool_t *pool)
 static svn_error_t *
 test5(apr_pool_t *pool)
 {
-  a = svn_stringbuf_create(phrase_1, pool);
+  svn_stringbuf_t *a = svn_stringbuf_create(phrase_1, pool);
   svn_stringbuf_appendbytes(a, "new bytes to append", 9);
 
   /* Test that length, data, and null-termination are correct. */
@@ -148,9 +147,9 @@ test5(apr_pool_t *pool)
 static svn_error_t *
 test6(apr_pool_t *pool)
 {
-  a = svn_stringbuf_create(phrase_1, pool);
-  b = svn_stringbuf_create(phrase_2, pool);
-  c = svn_stringbuf_dup(a, pool);
+  svn_stringbuf_t *a = svn_stringbuf_create(phrase_1, pool);
+  svn_stringbuf_t *b = svn_stringbuf_create(phrase_2, pool);
+  svn_stringbuf_t *c = svn_stringbuf_dup(a, pool);
 
   /* Test that length, data, and null-termination are correct. */
   if ((svn_stringbuf_compare(a, c)) && (! svn_stringbuf_compare(b, c)))
@@ -166,7 +165,7 @@ test7(apr_pool_t *pool)
   char *tmp;
   size_t tmp_len;
 
-  c = svn_stringbuf_create(phrase_2, pool);
+  svn_stringbuf_t *c = svn_stringbuf_create(phrase_2, pool);
 
   tmp_len = c->len;
   tmp = apr_palloc(pool, c->len + 1);
@@ -186,7 +185,7 @@ test7(apr_pool_t *pool)
 static svn_error_t *
 test8(apr_pool_t *pool)
 {
-  c = svn_stringbuf_create(phrase_2, pool);
+  svn_stringbuf_t *c = svn_stringbuf_create(phrase_2, pool);
 
   svn_stringbuf_setempty(c);
 
@@ -200,7 +199,7 @@ test8(apr_pool_t *pool)
 static svn_error_t *
 test9(apr_pool_t *pool)
 {
-  a = svn_stringbuf_create(phrase_1, pool);
+  svn_stringbuf_t *a = svn_stringbuf_create(phrase_1, pool);
 
   svn_stringbuf_fillchar(a, '#');
 
@@ -380,7 +379,7 @@ test_find_char_backward(const char* data
 {
   apr_size_t i;
 
-  a = svn_stringbuf_create(data, pool);
+  svn_stringbuf_t *a = svn_stringbuf_create(data, pool);
   i = svn_stringbuf_find_char_backward(a, ch);
 
   if (i == pos)
@@ -392,7 +391,7 @@ test_find_char_backward(const char* data
 static svn_error_t *
 test13(apr_pool_t *pool)
 {
-  a = svn_stringbuf_create("test, test", pool);
+  svn_stringbuf_t *a = svn_stringbuf_create("test, test", pool);
 
   return test_find_char_backward(a->data, a->len, ',', 4, pool);
 }
@@ -400,7 +399,7 @@ test13(apr_pool_t *pool)
 static svn_error_t *
 test14(apr_pool_t *pool)
 {
-  a = svn_stringbuf_create(",test test", pool);
+  svn_stringbuf_t *a = svn_stringbuf_create(",test test", pool);
 
   return test_find_char_backward(a->data, a->len, ',', 0, pool);
 }
@@ -408,7 +407,7 @@ test14(apr_pool_t *pool)
 static svn_error_t *
 test15(apr_pool_t *pool)
 {
-  a = svn_stringbuf_create("testing,", pool);
+  svn_stringbuf_t *a = svn_stringbuf_create("testing,", pool);
 
   return test_find_char_backward(a->data,
                                  a->len,
@@ -420,7 +419,7 @@ test15(apr_pool_t *pool)
 static svn_error_t *
 test16(apr_pool_t *pool)
 {
-  a = svn_stringbuf_create_empty(pool);
+  svn_stringbuf_t *a = svn_stringbuf_create_empty(pool);
 
   return test_find_char_backward(a->data, a->len, ',', 0, pool);
 }
@@ -428,7 +427,7 @@ test16(apr_pool_t *pool)
 static svn_error_t *
 test17(apr_pool_t *pool)
 {
-  a = svn_stringbuf_create("test test test", pool);
+  svn_stringbuf_t *a = svn_stringbuf_create("test test test", pool);
 
   return test_find_char_backward(a->data,
                                  a->len,
@@ -444,7 +443,7 @@ test_first_non_whitespace(const char *st
 {
   apr_size_t i;
 
-  a = svn_stringbuf_create(str, pool);
+  svn_stringbuf_t *a = svn_stringbuf_create(str, pool);
 
   i = svn_stringbuf_first_non_whitespace(a);
 
@@ -475,8 +474,8 @@ test20(apr_pool_t *pool)
 static svn_error_t *
 test21(apr_pool_t *pool)
 {
-  a = svn_stringbuf_create("    \ttest\t\t  \t  ", pool);
-  b = svn_stringbuf_create("test", pool);
+  svn_stringbuf_t *a = svn_stringbuf_create("    \ttest\t\t  \t  ", pool);
+  svn_stringbuf_t *b = svn_stringbuf_create("test", pool);
 
   svn_stringbuf_strip_whitespace(a);
 
@@ -491,8 +490,8 @@ test_stringbuf_unequal(const char* str1,
                        const char* str2,
                        apr_pool_t *pool)
 {
-  a = svn_stringbuf_create(str1, pool);
-  b = svn_stringbuf_create(str2, pool);
+  svn_stringbuf_t *a = svn_stringbuf_create(str1, pool);
+  svn_stringbuf_t *b = svn_stringbuf_create(str2, pool);
 
   if (svn_stringbuf_compare(a, b))
     return fail(pool, "test failed");
@@ -590,7 +589,7 @@ expect_stringbuf_equal(const svn_stringb
 static svn_error_t *
 test_stringbuf_insert(apr_pool_t *pool)
 {
-  a = svn_stringbuf_create("st , ", pool);
+  svn_stringbuf_t *a = svn_stringbuf_create("st , ", pool);
 
   svn_stringbuf_insert(a, 0, "teflon", 2);
   SVN_TEST_STRING_ASSERT(a->data, "test , ");
@@ -611,7 +610,7 @@ test_stringbuf_insert(apr_pool_t *pool)
 static svn_error_t *
 test_stringbuf_remove(apr_pool_t *pool)
 {
-  a = svn_stringbuf_create("test hello, world!", pool);
+  svn_stringbuf_t *a = svn_stringbuf_create("test hello, world!", pool);
 
   svn_stringbuf_remove(a, 0, 2);
   SVN_TEST_STRING_ASSERT(a->data, "st hello, world!");
@@ -629,7 +628,7 @@ test_stringbuf_remove(apr_pool_t *pool)
 static svn_error_t *
 test_stringbuf_replace(apr_pool_t *pool)
 {
-  a = svn_stringbuf_create("odd with some world?", pool);
+  svn_stringbuf_t *a = svn_stringbuf_create("odd with some world?", pool);
 
   svn_stringbuf_replace(a, 0, 3, "tester", 4);
   SVN_TEST_STRING_ASSERT(a->data, "test with some world?");
@@ -834,6 +833,9 @@ test_string_matching(apr_pool_t *pool)
 */
 
 /* An array of all test functions */
+
+int svn_test_max_threads = 1;
+
 struct svn_test_descriptor_t test_funcs[] =
   {
     SVN_TEST_NULL,

Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/subst_translate-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/subst_translate-test.c?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/subst_translate-test.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/subst_translate-test.c Wed Nov 27 07:53:29 2013
@@ -501,6 +501,8 @@ test_svn_subst_long_keywords(apr_pool_t 
   return SVN_NO_ERROR;
 }
 
+int svn_test_max_threads = 1;
+
 struct svn_test_descriptor_t test_funcs[] =
   {
     SVN_TEST_NULL,

Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/time-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/time-test.c?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/time-test.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/time-test.c Wed Nov 27 07:53:29 2013
@@ -339,6 +339,8 @@ test_parse_date(apr_pool_t *pool)
 
 /* The test table.  */
 
+int svn_test_max_threads = 1;
+
 struct svn_test_descriptor_t test_funcs[] =
   {
     SVN_TEST_NULL,