subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kot...@apache.org
Subject svn commit: r1619105 - /subversion/trunk/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c
Date Wed, 20 Aug 2014 14:02:38 GMT
Author: kotkov
Date: Wed Aug 20 14:02:38 2014
New Revision: 1619105

URL: http://svn.apache.org/r1619105
Log:
Add a new XFail test for the revision property caching problem discussed
in http://svn.haxx.se/dev/archive-2014-08/0235.shtml

* subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c
  (revprop_caching_on_off): New test.
  (test_funcs): Add revprop_caching_on_off.

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

Modified: subversion/trunk/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c?rev=1619105&r1=1619104&r2=1619105&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c Wed Aug 20 14:02:38 2014
@@ -1168,6 +1168,51 @@ metadata_checksumming(const svn_test_opt
 #undef REPO_NAME
 
 /* ------------------------------------------------------------------------ */
+
+#define REPO_NAME "revprop_caching_on_off"
+static svn_error_t *
+revprop_caching_on_off(const svn_test_opts_t *opts,
+                       apr_pool_t *pool)
+{
+  svn_fs_t *fs1;
+  svn_fs_t *fs2;
+  apr_hash_t *fs_config;
+  svn_string_t *value;
+  const svn_string_t *new_value = svn_string_create("new", pool);
+
+  if (strcmp(opts->fs_type, "fsfs") != 0)
+    return svn_error_create(SVN_ERR_TEST_SKIPPED, NULL, NULL);
+
+  /* Revision property caching requires named atomics. */
+  if (!svn_named_atomic__is_supported())
+    return svn_error_create(SVN_ERR_TEST_SKIPPED, NULL, NULL);
+
+  /* Open two filesystem objects, enable revision property caching
+   * in one of them. */
+  SVN_ERR(svn_test__create_fs(&fs1, REPO_NAME, opts, pool));
+
+  fs_config = apr_hash_make(pool);
+  svn_hash_sets(fs_config, SVN_FS_CONFIG_FSFS_CACHE_REVPROPS, "1");
+
+  SVN_ERR(svn_fs_open2(&fs2, svn_fs_path(fs1, pool), fs_config, pool, pool));
+
+  SVN_ERR(svn_fs_revision_prop(&value, fs2, 0, "svn:date", pool));
+  SVN_ERR(svn_fs_change_rev_prop2(fs1, 0, "svn:date", &value,
+                                  new_value, pool));
+
+  /* Expect the change to be visible through both objects.*/
+  SVN_ERR(svn_fs_revision_prop(&value, fs1, 0, "svn:date", pool));
+  SVN_TEST_STRING_ASSERT(value->data, "new");
+
+  SVN_ERR(svn_fs_revision_prop(&value, fs2, 0, "svn:date", pool));
+  SVN_TEST_STRING_ASSERT(value->data, "new");
+
+  return SVN_NO_ERROR;
+}
+
+#undef REPO_NAME
+
+/* ------------------------------------------------------------------------ */
 
 /* The test table.  */
 
@@ -1206,6 +1251,8 @@ static struct svn_test_descriptor_t test
                        "upgrade txns started before svnadmin upgrade"),
     SVN_TEST_OPTS_PASS(metadata_checksumming,
                        "metadata checksums being checked"),
+    SVN_TEST_OPTS_XFAIL(revprop_caching_on_off,
+                        "change revprops with enabled and disabled caching"),
     SVN_TEST_NULL
   };
 



Mime
View raw message