subversion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Foad <julianf...@apache.org>
Subject Re: Reviewing 1.10 APIs & compatibility
Date Tue, 06 Feb 2018 15:39:36 GMT
I have requested a bit of work time to look at these issues.

Here's where I've got to with the first test failure.

Philip Martin wrote:
> 1.9 against a 1.10 server
> =========================
> 
> First I ran the 1.9 testsuite against 1.10 servers
> over http:// and svn://.  For http:// there were two FAILs:
> 
>    FAIL:  lock_tests.py 34: unlock file locked by other user
>    FAIL:  lock_tests.py 53: unlock a lock with timeout
> 
> In both cases the problem is the testsuite getting different error from
> that expected:
> 
>    W: Unexpected output
>    W: EXPECTED STDERR (regexp):
>    W: | svn: warning: W160039: .*[Uu]nlock of .*403 Forbidden.*
>    W: ACTUAL STDERR:
>    W: | svn: warning: apr_err=SVN_ERR_FS_PATH_ALREADY_LOCKED
>    W: | svn: warning: W160035: Path 'pi' already locked (423 Locked)
>    W: | ../src-1.9/subversion/svn/unlock-cmd.c:100: (apr_err=SVN_ERR_ILLEGAL_TARGET)
>    W: | svn: E200009: One or more locks could not be released
> 
> It turns out that both 1.9 and 1.10 servers return the same underlying
> FS error: the W160039 expected by the testsuite.  The difference is that
> the 1.9 server wraps it in a 403 while the 1.10 server wraps it in a
> 423.  The 1.9 client does not have r1716450 and that causes the 1.9
> client to convert the underlying FS error to W160035.

It looks like the behaviour changes in 1.10 are intentional and Good.

I think the test suite should be updated to accept the old error when
the server is old, like this:

[[[
Index: subversion/tests/cmdline/lock_tests.py
===================================================================
--- subversion/tests/cmdline/lock_tests.py	(revision 1823283)
+++ subversion/tests/cmdline/lock_tests.py	(working copy)
@@ -1360,8 +1360,11 @@ def unlocked_lock_of_other_user(sbox):
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
   # now try to unlock with user jconstant, should fail but exit 0.
-  expected_err = "svn: warning: W160039: User '%s' is trying to use a lock owned by "\
-                 "'%s'.*" % (svntest.main.wc_author2, svntest.main.wc_author)
+  if sbox.repo_url.startswith("http") and svntest.main.options.server_minor_version <=
9:
+    expected_err = "svn: warning: W160039: .*[Uu]nlock of .*403 Forbidden.*"
+  else:
+    expected_err = "svn: warning: W160039: User '%s' is trying to use a lock owned by "\
+                   "'%s'.*" % (svntest.main.wc_author2, svntest.main.wc_author)
   svntest.actions.run_and_verify_svn([], expected_err,
                                      'unlock',
                                      '--username', svntest.main.wc_author2,
]]]

This is similar to what was present before r1716450, when the '403'
message was expected for the 'http' URLs, and the better message was
used for the svn:// case, which in 1.10 is now used for all cases.

However, this doesn't match the message Philip showed above, and this
is only for test #34.

I am still working on setting up the cross-version testing to pursue this.

- Julian

Mime
View raw message