subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1125773 - /subversion/trunk/subversion/tests/libsvn_subr/cache-test.c
Date Sat, 21 May 2011 19:14:50 GMT
Author: stsp
Date: Sat May 21 19:14:50 2011
New Revision: 1125773

URL: http://svn.apache.org/viewvc?rev=1125773&view=rev
Log:
* subversion/tests/libsvn_subr/cache-test.c
  (test_membuffer_cache_basic, test_funcs): Indicate to the cache constructor
   whether or not we're thread-safe. Makes this test PASS without APR
   thread support.

Suggested by: danielsh

Modified:
    subversion/trunk/subversion/tests/libsvn_subr/cache-test.c

Modified: subversion/trunk/subversion/tests/libsvn_subr/cache-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_subr/cache-test.c?rev=1125773&r1=1125772&r2=1125773&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_subr/cache-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_subr/cache-test.c Sat May 21 19:14:50 2011
@@ -182,8 +182,16 @@ test_membuffer_cache_basic(apr_pool_t *p
 {
   svn_cache__t *cache;
   svn_membuffer_t *membuffer;
+  svn_boolean_t thread_safe;
 
-  SVN_ERR(svn_cache__membuffer_cache_create(&membuffer, 10*1024, 1, TRUE, pool));
+#if APR_HAS_THREADS
+  thread_safe = TRUE;
+#else
+  thread_safe = FALSE;
+#endif
+
+  SVN_ERR(svn_cache__membuffer_cache_create(&membuffer, 10*1024, 1,
+                                            thread_safe, pool));
 
   /* Create a cache with just one entry. */
   SVN_ERR(svn_cache__create_membuffer_cache(&cache,
@@ -265,12 +273,7 @@ struct svn_test_descriptor_t test_funcs[
                        "basic memcache svn_cache test"),
     SVN_TEST_OPTS_PASS(test_memcache_long_key,
                        "memcache svn_cache with very long keys"),
-#if APR_HAS_THREADS
     SVN_TEST_PASS2(test_membuffer_cache_basic,
                    "basic membuffer svn_cache test"),
-#else
-    SVN_TEST_XFAIL2(test_membuffer_cache_basic,
-                   "basic membuffer svn_cache test"),
-#endif
     SVN_TEST_NULL
   };



Mime
View raw message