subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1535730 - /subversion/branches/log-addressing/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c
Date Fri, 25 Oct 2013 13:34:26 GMT
Author: stefan2
Date: Fri Oct 25 13:34:26 2013
New Revision: 1535730

URL: http://svn.apache.org/r1535730
Log:
On the log-addressing branch:
Extend our FSFS addressing mode upgrade test to verify that pack will
handle old mode as well as new mode shards correctly in a single run.

* subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c
  (upgrade_txn_to_log_addressing): fill up the latest shard and pack both
                                   shards, the one using phys. addressing
                                   and the one using log. addressing

Modified:
    subversion/branches/log-addressing/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c

Modified: subversion/branches/log-addressing/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c?rev=1535730&r1=1535729&r2=1535730&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c (original)
+++ subversion/branches/log-addressing/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c Fri
Oct 25 13:34:26 2013
@@ -1010,10 +1010,32 @@ upgrade_txn_to_log_addressing(const svn_
       SVN_ERR(svn_fs_commit_txn2(NULL, &rev, txn, TRUE, pool));
     }
 
-  /* verify that our changes got in */
+  /* Further changes to fill the shard */
+
   SVN_ERR(svn_fs_youngest_rev(&rev, fs, pool));
   SVN_TEST_ASSERT(rev == SHARD_SIZE + MAX_REV + 1);
 
+  while ((rev + 1) % SHARD_SIZE)
+    {
+      svn_fs_txn_t *txn;
+      if (rev % SHARD_SIZE == 0)
+        break;
+
+      SVN_ERR(svn_fs_begin_txn(&txn, fs, rev, pool));
+      SVN_ERR(svn_fs_txn_root(&root, txn, pool));
+      SVN_ERR(svn_test__set_file_contents(root, "iota",
+                                          get_rev_contents(rev + 1, pool),
+                                          pool));
+      SVN_ERR(svn_fs_commit_txn(NULL, &rev, txn, pool));
+    }
+
+  /* Pack repo to verify that old and new shard get packed according to
+     their respective addressing mode */
+
+  SVN_ERR(svn_fs_pack(REPO_NAME, NULL, NULL, NULL, NULL, pool));
+
+  /* verify that our changes got in */
+
   SVN_ERR(svn_fs_revision_root(&root, fs, rev, pool));
   for (i = 0; i < SHARD_SIZE; ++i)
     {



Mime
View raw message