subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pbu...@apache.org
Subject svn commit: r1068436 - in /subversion/trunk: notes/xfail-status subversion/tests/libsvn_fs/locks-test.c
Date Tue, 08 Feb 2011 15:16:13 GMT
Author: pburba
Date: Tue Feb  8 15:16:11 2011
New Revision: 1068436

URL: http://svn.apache.org/viewvc?rev=1068436&view=rev
Log:
Remove two XFailing lock tests that are never going to pass.

See discussion at http://svn.haxx.se/dev/archive-2011-02/0188.shtml

* subversion/tests/libsvn_fs/locks-test.c

  (lock_name_reservation,
   directory_locks_kinda): Remove.

  (test_funcs): Remove lock_name_reservation and directory_locks_kinda.

* notes/xfail-status: Remove defunct locks-test.

Modified:
    subversion/trunk/notes/xfail-status
    subversion/trunk/subversion/tests/libsvn_fs/locks-test.c

Modified: subversion/trunk/notes/xfail-status
URL: http://svn.apache.org/viewvc/subversion/trunk/notes/xfail-status?rev=1068436&r1=1068435&r2=1068436&view=diff
==============================================================================
--- subversion/trunk/notes/xfail-status (original)
+++ subversion/trunk/notes/xfail-status Tue Feb  8 15:16:11 2011
@@ -32,24 +32,6 @@ Test #  Mode   Test Description
   Log: N/A
   Point Person: julianfoad
 
-LISTING: locks-test.exe
-
-Test #  Mode   Test Description
-------  -----  ----------------
-   9    XFAIL  able to reserve a name (lock non-existent path)
-  Issue #: None
-  Target Milestone: None
-  Thread: N/A
-  Log: http://svn.apache.org/viewvc?view=revision&revision=853631
-  Point Person: cmpilato
-  
-  10    XFAIL  directory locks (kinda)
-  Issue #: None
-  Target Milestone: None 
-  Thread: N/A
-  Log: http://svn.apache.org/viewvc?view=revision&revision=853631
-  Point Person: cmpilato
-  
 LISTING: parse-diff-test.exe
 
 Test #  Mode   Test Description

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=1068436&r1=1068435&r2=1068436&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_fs/locks-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_fs/locks-test.c Tue Feb  8 15:16:11 2011
@@ -618,132 +618,6 @@ lock_dir_propchange(const svn_test_opts_
   return SVN_NO_ERROR;
 }
 
-
-
-/* DAV clients sometimes LOCK non-existent paths, as a way of
-   reserving names.  Check that this technique works. */
-static svn_error_t *
-lock_name_reservation(const svn_test_opts_t *opts,
-                      apr_pool_t *pool)
-{
-  svn_fs_t *fs;
-  svn_fs_txn_t *txn;
-  svn_fs_root_t *txn_root, *rev_root;
-  const char *conflict;
-  svn_revnum_t newrev;
-  svn_fs_access_t *access;
-  svn_lock_t *mylock;
-  svn_error_t *err;
-
-  /* Prepare a filesystem and a new txn. */
-  SVN_ERR(svn_test__create_fs(&fs, "test-repo-lock-name-reservation",
-                              opts, pool));
-  SVN_ERR(svn_fs_begin_txn2(&txn, fs, 0, SVN_FS_TXN_CHECK_LOCKS, pool));
-  SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
-
-  /* Create the greek tree and commit it. */
-  SVN_ERR(svn_test__create_greek_tree(txn_root, pool));
-  SVN_ERR(svn_fs_commit_txn(&conflict, &newrev, txn, pool));
-  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(newrev));
-
-  /* Become 'bubba' and lock imaginary path  "/A/D/G2/blooga". */
-  SVN_ERR(svn_fs_create_access(&access, "bubba", pool));
-  SVN_ERR(svn_fs_set_access(fs, access));
-  SVN_ERR(svn_fs_lock(&mylock, fs, "/A/D/G2/blooga", NULL, "", 0, 0,
-                      SVN_INVALID_REVNUM, FALSE, pool));
-
-  /* We are no longer 'bubba'.  We're nobody. */
-  SVN_ERR(svn_fs_set_access(fs, NULL));
-
-  /* Make a new transaction. */
-  SVN_ERR(svn_fs_begin_txn2(&txn, fs, newrev, SVN_FS_TXN_CHECK_LOCKS, pool));
-  SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
-
-  /* This copy should fail, because an imaginary path in the target of
-     the copy is reserved by someone else. */
-  SVN_ERR(svn_fs_revision_root(&rev_root, fs, 1, pool));
-  err = svn_fs_copy(rev_root, "/A/D/G", txn_root, "/A/D/G2", pool);
-  if (! err)
-    return svn_error_create
-      (SVN_ERR_TEST_FAILED, NULL,
-       "Uhoh, copy succeeded when path within target was locked.");
-  svn_error_clear(err);
-
-  return SVN_NO_ERROR;
-}
-
-
-/* Test that we can set and get locks in and under a directory.  We'll
-   use non-existent FS paths for this test, though, as the FS API
-   currently disallows directory locking.  */
-static svn_error_t *
-directory_locks_kinda(const svn_test_opts_t *opts,
-                      apr_pool_t *pool)
-{
-  svn_fs_t *fs;
-  svn_fs_txn_t *txn;
-  svn_fs_root_t *txn_root;
-  svn_fs_access_t *access;
-  svn_lock_t *mylock;
-  apr_size_t num_expected_paths, i;
-  struct get_locks_baton_t *get_locks_baton;
-
-  /* Prepare a filesystem and a new txn. */
-  SVN_ERR(svn_test__create_fs(&fs, "test-repo-directory-locks-kinda",
-                              opts, pool));
-  SVN_ERR(svn_fs_begin_txn2(&txn, fs, 0, SVN_FS_TXN_CHECK_LOCKS, pool));
-  SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
-
-  /* We are now 'bubba'. */
-  SVN_ERR(svn_fs_create_access(&access, "bubba", pool));
-  SVN_ERR(svn_fs_set_access(fs, access));
-
-  /*** Lock some various, non-existent, yet dir-name-spacily
-       overlapping paths; verify. ***/
-  {
-    static const char *expected_paths[] = {
-      "/Program Files/Tigris.org/Subversion",
-      "/Program Files/Tigris.org",
-      "/Stuff/Junk/Fluff",
-      "/Program Files",
-    };
-    num_expected_paths = sizeof(expected_paths) / sizeof(const char *);
-
-    /* Lock all paths under /A/D/G. */
-    for (i = 0; i < num_expected_paths; i++)
-      {
-        SVN_ERR(svn_fs_lock(&mylock, fs, expected_paths[i], NULL, "", 0, 0,
-                            SVN_INVALID_REVNUM, FALSE, pool));
-      }
-    get_locks_baton = make_get_locks_baton(pool);
-    SVN_ERR(svn_fs_get_locks(fs, "/", get_locks_callback,
-                             get_locks_baton, pool));
-    SVN_ERR(verify_matching_lock_paths(get_locks_baton, expected_paths,
-                                       num_expected_paths, pool));
-  }
-
-  /*** Now unlock a "middle directory" ***/
-  {
-    static const char *expected_paths[] = {
-      "/Program Files/Tigris.org/Subversion",
-      "/Stuff/Junk/Fluff",
-      "/Program Files",
-    };
-    num_expected_paths = sizeof(expected_paths) / sizeof(const char *);
-
-    SVN_ERR(svn_fs_unlock(fs, "/Program Files/Tigris.org", NULL,
-                          TRUE, pool));
-    get_locks_baton = make_get_locks_baton(pool);
-    SVN_ERR(svn_fs_get_locks(fs, "/", get_locks_callback,
-                             get_locks_baton, pool));
-    SVN_ERR(verify_matching_lock_paths(get_locks_baton, expected_paths,
-                                       num_expected_paths, pool));
-  }
-
-  return SVN_NO_ERROR;
-}
-
-
 /* Test that locks auto-expire correctly. */
 static svn_error_t *
 lock_expiration(const svn_test_opts_t *opts,
@@ -1003,10 +877,6 @@ struct svn_test_descriptor_t test_funcs[
                        "test that locking is enforced in final commit step"),
     SVN_TEST_OPTS_PASS(lock_dir_propchange,
                        "dir propchange can be committed with locked child"),
-    SVN_TEST_OPTS_XFAIL(lock_name_reservation,
-                        "able to reserve a name (lock non-existent path)"),
-    SVN_TEST_OPTS_XFAIL(directory_locks_kinda,
-                        "directory locks (kinda)"),
     SVN_TEST_OPTS_PASS(lock_expiration,
                        "test that locks can expire"),
     SVN_TEST_OPTS_PASS(lock_break_steal_refresh,



Mime
View raw message