You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Jens Peters <jp...@gmx.de> on 2009/04/27 19:15:58 UTC

Python testsuite on windows

Hi there,

Subversion 1.6.1, i'm trying to run the python testsuite on Windows, but 
after starting it with:
python subversion\bindings\swig\python\tests\run_all.py

the suite failes quite fast with:

D:\develop\svn\subversion-1.6\subversion\bindings\swig\python\tests/..\svn\core.
py:47: DeprecationWarning: BaseException.message has been deprecated as 
of Pytho
n 2.6
   self.message = message
D:\develop\svn\subversion-1.6\subversion\bindings\swig\python\tests\core.py:17:
DeprecationWarning: BaseException.message has been deprecated as of 
Python 2.6
   self.assertEqual(svn.core.SubversionException('error message', 
1).message,
...EEEEEETraceback (most recent call last):
   File "subversion\bindings\swig\python\tests\run_all.py", line 23, in 
<module>
     unittest.main(defaultTest='suite')
   File "D:\opt\python\Lib\unittest.py", line 817, in __init__
     self.runTests()
   File "D:\opt\python\Lib\unittest.py", line 861, in runTests
     result = testRunner.run(self.test)
   File "D:\opt\python\Lib\unittest.py", line 753, in run
     test(result)
   File "D:\opt\python\Lib\unittest.py", line 464, in __call__
     return self.run(*args, **kwds)
   File "D:\opt\python\Lib\unittest.py", line 460, in run
     test(result)
   File "D:\opt\python\Lib\unittest.py", line 464, in __call__
     return self.run(*args, **kwds)
   File "D:\opt\python\Lib\unittest.py", line 460, in run
     test(result)
   File 
"D:\develop\svn\subversion-1.6\subversion\bindings\swig\python\tests\trac
\test.py", line 33, in __call__
     self.setUp()
   File 
"D:\develop\svn\subversion-1.6\subversion\bindings\swig\python\tests\trac
\versioncontrol\tests\svn_fs.py", line 58, in setUp
     self.tearDown()
   File 
"D:\develop\svn\subversion-1.6\subversion\bindings\swig\python\tests\trac
\versioncontrol\tests\svn_fs.py", line 67, in tearDown
     repos.delete(REPOS_PATH)
   File "d:\opt\Subversion\python\libsvn\repos.py", line 93, in 
svn_repos_delete
     return _repos.svn_repos_delete(*args)
svn.core.SubversionException: ("Can't remove 
'd:\\tmp\\tmp542z21-trac-svnrepos\\
db\\rep-cache.db'", 720032)

As far as I can see the error is raised somewhere deep in APR. Any 
ideas? I can remove the directory without any problems manually.

Regards,
Jens

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1950541

Re: Python testsuite on windows

Posted by Jens Peters <jp...@gmx.de>.
On 29-4-2009 17:36, Arfrever Frehtes Taifersar Arahesis wrote:
> What version of SWIG do you use?
> I remember seeing similar problem with SWIG 1.3.39.
> SWIG 1.3.36 was working correctly.
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1981514
>

Using swig 1.3.36 solves that one for me indeed, thanks for pointing 
into that direction.

Regards,
Jens

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2071645

RE: Python testsuite on windows

Posted by Jens Peters <jp...@gmx.de>.
>What version of SWIG do you use?
>I remember seeing similar problem with SWIG 1.3.39.
>SWIG 1.3.36 was working correctly.

Yes, indeed 1.3.39. So this is a real testfailure and not just a problem in the testsuite?

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1984384


Re: Python testsuite on windows

Posted by Arfrever Frehtes Taifersar Arahesis <Ar...@GMail.Com>.
2009-04-28 21:21 Jens Peters <jp...@gmx.de> napisał(a):
>>> Traceback (most recent call last):
>>>    File "subversion\bindings\swig\python\tests\client.py", line 49, in
>>> testBatonP
>>> lay
>>>      str(self.client_ctx.auth_baton))
>>> AssertionError: "<libsvn.core.svn_auth_baton_t; proxy of<Swig Object of
>>> type 'svn_auth_baton_t *' at 0x0000000003953780>  >" !=
>>> "<libsvn.core.svn_auth_baton_t;
>>> proxy of<Swig Object of type 'svn_auth_baton_t *' at 0x0000000003953750>  >"
>>
>> Those two strings look identical to me. In fact, I copied them into a
>> text editor and found that they were identical. This is likely a
>> peculiarity in Python 2.6. Arfrever, any idea why these two strings
>> would not compare identical? Note that these are string
>> representations of pointers.
>
> The adress is different :).
> 0x0000000003953780 !=
> 0x0000000003953750

What version of SWIG do you use?
I remember seeing similar problem with SWIG 1.3.39.
SWIG 1.3.36 was working correctly.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1981514


Re: Python testsuite on windows

Posted by Jens Peters <jp...@gmx.de>.
>> Traceback (most recent call last):
>>    File "subversion\bindings\swig\python\tests\client.py", line 49, in
>> testBatonP
>> lay
>>      str(self.client_ctx.auth_baton))
>> AssertionError: "<libsvn.core.svn_auth_baton_t; proxy of<Swig Object of
>> type 'svn_auth_baton_t *' at 0x0000000003953780>  >" !=
>> "<libsvn.core.svn_auth_baton_t;
>> proxy of<Swig Object of type 'svn_auth_baton_t *' at 0x0000000003953750>  >"
>
> Those two strings look identical to me. In fact, I copied them into a
> text editor and found that they were identical. This is likely a
> peculiarity in Python 2.6. Arfrever, any idea why these two strings
> would not compare identical? Note that these are string
> representations of pointers.

The adress is different :).
0x0000000003953780 !=
0x0000000003953750

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1967417

Re: Python testsuite on windows

Posted by Jens Peters <jp...@gmx.de>.
> But unfortunately this one doesn't work for the trac based tests.

Uh, correction, client.py derives from trac as well, but runs fine. But 
here the setUp does different stuff than the others.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1967378

Re: Python testsuite on windows

Posted by Jens Peters <jp...@gmx.de>.
> Jens, could you also try updating mergeinfo.py to set self.fs = None
> and self.repos = None and see if that helps? I've attached an
> (untested) patch which does that.

Hi David,

yes, your patch works perfectly for merge-info and I could apply the 
same fix to repository (see attachment).

But unfortunately this one doesn't work for the trac based tests. Within 
every trac base suite the first one is fine, but it fails when TearDown 
(called from setUp) wants to remove the repository. The stacktrace is 
everywhere the same:

subversion\bindings\swig\python\tests\trac\versioncontrol\tests\svn_fs.py", 
line 58, in setUp
    self.tearDown()
subversion\bindings\swig\python\tests\trac\versioncontrol\tests\svn_fs.py", 
line 67, in tearDown
    repos.delete(REPOS_PATH)

Jens

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1967320

Re: Python testsuite on windows

Posted by David James <ja...@gmail.com>.
Hi Jens,

Thanks for your post. Could you try this again using an older version
of Python, say, Python 2.5? I think Python 2.6 may have made a few
changes that are breaking the test suite.

> D:\develop\svn\subversion-1.6>python
> subversion\bindings\swig\python\tests\clien
> t.py
> F............
> ======================================================================
> FAIL: Test playing with C batons
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "subversion\bindings\swig\python\tests\client.py", line 49, in
> testBatonP
> lay
>     str(self.client_ctx.auth_baton))
> AssertionError: "<libsvn.core.svn_auth_baton_t; proxy of <Swig Object of
> type 'svn_auth_baton_t *' at 0x0000000003953780> >" !=
> "<libsvn.core.svn_auth_baton_t;
> proxy of <Swig Object of type 'svn_auth_baton_t *' at 0x0000000003953750> >"

Those two strings look identical to me. In fact, I copied them into a
text editor and found that they were identical. This is likely a
peculiarity in Python 2.6. Arfrever, any idea why these two strings
would not compare identical? Note that these are string
representations of pointers.

On Mon, Apr 27, 2009 at 1:11 PM, Jens Peters <jp...@gmx.de> wrote:
> Merge-info:
>
> d:\opt\Subversion\python\svn\core.py:47: DeprecationWarning:
> BaseException.messa
> ge has been deprecated as of Python 2.6
>   self.message = message
> EEEEEE
> ======================================================================
> ERROR: test_mergeinfo_get (__main__.SubversionMergeinfoTestCase)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "subversion\bindings\swig\python\tests\mergeinfo.py", line 55,
> in tearDow
> n
>     repos.delete(REPOS_PATH)
>   File "d:\opt\Subversion\python\libsvn\repos.py", line 93, in
> svn_repos_delete
>     return _repos.svn_repos_delete(*args)
> SubversionException: ("Can't remove
> 'd:\\tmp\\tmpxyfbvp-trac-svnrepos\\db\\rep-c
> ache.db'", 720032)
>
> All 6 tests are failing with the same message.
>
> Ra:
> 16 of 17 tests are failing with "Can't remove ..". The first test
> finishes fine.
>
> WC:
> 22 of 23 tests are failing with "Can't remove ..". The first test
> finishes fine.
>
> Repository:
> I dont see a summary, but fails with "Can't remove ..". The first test
> seems to finish fine, according to the number of dots :) ).

Okay, I find this a bit confusing.
 1) client.py is having no problem deleting repositories
 2) From the message you sent, I can't tell whether mergeinfo.py is
able to delete repositories at all. Are all six exceptions identical,
or is there a slight difference in the exception? E.g., is the first
exception thrown during the second tearDown instead of the first
tearDown?
 3) repository.py, ra.py and wc.py can delete a repository, but only
during the first run.

What's the difference between the four classes? Well, it looks like
the classes that experience problems all keep references to an FS
object inside the test object (self.fs). client.py seems to not do
that and maybe that's why it's working. Maybe we should teach the
tearDown method of the classes to kill references to self.fs etc. That
might fix the problem.

Jens, could you also try updating mergeinfo.py to set self.fs = None
and self.repos = None and see if that helps? I've attached an
(untested) patch which does that.


Cheers,

David

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1951895

Re: Python testsuite on windows

Posted by Jens Peters <jp...@gmx.de>.
David James wrote:
> Hi Jens,
>
>  From this bug report it's hard to tell the exact problem. This does
> suggest a new issue with Subversion 1.6 -- now that Subversion has a
> rep-cache DB, we need to be careful to make sure it gets closed before
> we try to delete the directory. I'm wondering whether the rep-cache DB
> got left open because of an exception in an earlier test -- could you
> try running the tests individually to see what the problem with them
> is?

Hi James,

Thank you for your reply. The following tests are OK:
Core, Delta, Pool, Auth.

These are the ones with errors:

Merge-info:

d:\opt\Subversion\python\svn\core.py:47: DeprecationWarning: 
BaseException.messa
ge has been deprecated as of Python 2.6
   self.message = message
EEEEEE
======================================================================
ERROR: test_mergeinfo_get (__main__.SubversionMergeinfoTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "subversion\bindings\swig\python\tests\mergeinfo.py", line 55, 
in tearDow
n
     repos.delete(REPOS_PATH)
   File "d:\opt\Subversion\python\libsvn\repos.py", line 93, in 
svn_repos_delete
     return _repos.svn_repos_delete(*args)
SubversionException: ("Can't remove 
'd:\\tmp\\tmpxyfbvp-trac-svnrepos\\db\\rep-c
ache.db'", 720032)

All 6 tests are failing with the same message.

------------------------------------------------------------------------
------------------------------------------------------------------------
Client:

D:\develop\svn\subversion-1.6>python 
subversion\bindings\swig\python\tests\clien
t.py
F............
======================================================================
FAIL: Test playing with C batons
----------------------------------------------------------------------
Traceback (most recent call last):
   File "subversion\bindings\swig\python\tests\client.py", line 49, in 
testBatonP
lay
     str(self.client_ctx.auth_baton))
AssertionError: "<libsvn.core.svn_auth_baton_t; proxy of <Swig Object of 
type 's
vn_auth_baton_t *' at 0x0000000003953780> >" != 
"<libsvn.core.svn_auth_baton_t;
proxy of <Swig Object of type 'svn_auth_baton_t *' at 0x0000000003953750> >"

----------------------------------------------------------------------
Ran 13 tests in 1.279s

FAILED (failures=1)

------------------------------------------------------------------------
------------------------------------------------------------------------

Ra:
16 of 17 tests are failing with "Can't remove ..". The first test 
finishes fine.

WC:
22 of 23 tests are failing with "Can't remove ..". The first test 
finishes fine.

Repository:
I dont see a summary, but fails with "Can't remove ..". The first test 
seems to finish fine, according to the number of dots :) ).

Let me know if I can provide some more infos.

Regards,
Jens

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1951261

Re: Python testsuite on windows

Posted by David James <ja...@gmail.com>.
On Mon, Apr 27, 2009 at 12:15 PM, Jens Peters <jp...@gmx.de> wrote:
>     return _repos.svn_repos_delete(*args)
> svn.core.SubversionException: ("Can't remove
> 'd:\\tmp\\tmp542z21-trac-svnrepos\\
> db\\rep-cache.db'", 720032)

Hi Jens,