Author: kotkov
Date: Thu Feb 5 11:10:32 2015
New Revision: 1657530
URL: http://svn.apache.org/r1657530
Log:
Following up on r1657525, tweak the obtain_write_lock_failure_test().
* subversion/tests/libsvn_fs/locks-test.c
(obtain_write_lock_failure_test): Rename this into ...
(obtain_write_lock_failure): ...this, as we don't use "_test" suffixes for
test functions. Rename the test filesystem to be conistent with other
tests in the same file. Finally, pass ignore_enoent = FALSE when making
the 'write-lock' file read-only. This lock file should exist in new
filesystems, and if it does not, it would be nice for the test to fail
instead of giving us a false positive.
Modified:
subversion/trunk/subversion/tests/libsvn_fs/locks-test.c
Modified: subversion/trunk/subversion/tests/libsvn_fs/locks-test.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_fs/locks-test.c?rev=1657530&r1=1657529&r2=1657530&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_fs/locks-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_fs/locks-test.c Thu Feb 5
11:10:32 2015
@@ -1080,8 +1080,8 @@ lock_cb_error(const svn_test_opts_t *opt
}
static svn_error_t *
-obtain_write_lock_failure_test(const svn_test_opts_t *opts,
- apr_pool_t *pool)
+obtain_write_lock_failure(const svn_test_opts_t *opts,
+ apr_pool_t *pool)
{
svn_fs_t *fs;
svn_revnum_t newrev;
@@ -1095,15 +1095,15 @@ obtain_write_lock_failure_test(const svn
return svn_error_create(SVN_ERR_TEST_SKIPPED, NULL,
"this will test FSFS repositories only");
- SVN_ERR(create_greek_fs(&fs, &newrev, "obtain-write-lock-failure-test",
+ SVN_ERR(create_greek_fs(&fs, &newrev, "test-obtain-write-lock-failure",
opts, pool));
SVN_ERR(svn_fs_create_access(&access, "bubba", pool));
SVN_ERR(svn_fs_set_access(fs, access));
/* Make a read only 'write-lock' file. This prevents any write operations
from being executed. */
-
SVN_ERR(svn_io_set_file_read_only("obtain-write-lock-failure-test/write-lock",
- TRUE, pool));
+
SVN_ERR(svn_io_set_file_read_only("test-obtain-write-lock-failure/write-lock",
+ FALSE, pool));
baton.results = apr_hash_make(pool);
baton.pool = pool;
@@ -1169,7 +1169,7 @@ static struct svn_test_descriptor_t test
"lock multiple paths"),
SVN_TEST_OPTS_PASS(lock_cb_error,
"lock callback error"),
- SVN_TEST_OPTS_PASS(obtain_write_lock_failure_test,
+ SVN_TEST_OPTS_PASS(obtain_write_lock_failure,
"lock/unlock when 'write-lock' couldn't be obtained"),
SVN_TEST_NULL
};