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 2010/04/24 11:37:36 UTC

svn commit: r937610 - /subversion/trunk/subversion/tests/libsvn_fs_fs/fs-pack-test.c

Author: stsp
Date: Sat Apr 24 09:37:35 2010
New Revision: 937610

URL: http://svn.apache.org/viewvc?rev=937610&view=rev
Log:
* subversion/tests/libsvn_fs_fs/fs-pack-test.c
  (create_packed_filesystem): Allow file system creation to succeed
   on systems with low open file descriptior limits. Not using an
   iterpool here meant using many file descriptors concurrently,
   which made fs-pack-test 1 fail with low file descriptor limits
   Now the test passes with a file descriptor limit as low as 32.

Modified:
    subversion/trunk/subversion/tests/libsvn_fs_fs/fs-pack-test.c

Modified: subversion/trunk/subversion/tests/libsvn_fs_fs/fs-pack-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_fs_fs/fs-pack-test.c?rev=937610&r1=937609&r2=937610&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_fs_fs/fs-pack-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_fs_fs/fs-pack-test.c Sat Apr 24 09:37:35 2010
@@ -118,6 +118,7 @@ create_packed_filesystem(const char *dir
   const char *conflict;
   svn_revnum_t after_rev;
   apr_pool_t *subpool = svn_pool_create(pool);
+  apr_pool_t *iterpool;
 
   /* Create a filesystem, then close it */
   SVN_ERR(svn_test__create_fs(&fs, dir, opts, subpool));
@@ -139,16 +140,19 @@ create_packed_filesystem(const char *dir
   SVN_ERR(svn_fs_commit_txn(&conflict, &after_rev, txn, subpool));
 
   /* Revisions 2-11: A bunch of random changes. */
+  iterpool = svn_pool_create(subpool);
   while (after_rev < max_rev + 1)
     {
-      SVN_ERR(svn_fs_begin_txn(&txn, fs, after_rev, subpool));
-      SVN_ERR(svn_fs_txn_root(&txn_root, txn, subpool));
+      svn_pool_clear(iterpool);
+      SVN_ERR(svn_fs_begin_txn(&txn, fs, after_rev, iterpool));
+      SVN_ERR(svn_fs_txn_root(&txn_root, txn, iterpool));
       SVN_ERR(svn_test__set_file_contents(txn_root, "iota",
                                           get_rev_contents(after_rev + 1,
-                                                           subpool),
-                                          subpool));
-      SVN_ERR(svn_fs_commit_txn(&conflict, &after_rev, txn, subpool));
+                                                           iterpool),
+                                          iterpool));
+      SVN_ERR(svn_fs_commit_txn(&conflict, &after_rev, txn, iterpool));
     }
+  svn_pool_destroy(iterpool);
   svn_pool_destroy(subpool);
 
   /* Now pack the FS */