[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: ctypes-python bindings test cases issue.

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Fri, 5 Nov 2010 14:31:48 +0200

Noorul Islam K M wrote on Mon, Nov 01, 2010 at 21:42:02 +0530:
> Philip Martin <philip.martin_at_wandisco.com> writes:
>
> > Noorul Islam K M <noorul_at_collab.net> writes:
> >
> >> Test cases are written using python unittest framework and it has two
> >> methods, setUp() and tearDown() which gets executed for every case. In
> >> tearDown(), repository which is created in setUp() is deleted using
> >> svn_repos_delete(). During first iteration there are no issues but in
> >> the second iteration (test case), the system throws the above mentioned
> >> error. Using lsof command I could see something like this
> >>
> >> python 18111 noorul 4u REG 8,1 5120 279333 /tmp/svn_test_repos/db/revp
> >> rops/revprops.db (deleted)
> >>
> >> Does this mean that the sqlite file pointers are not completely
> >> destroyed?
> >
> > Yes. The repository handle from the previous svn_repos_create function
> > is still around when svn_repos_delete is called.
> >
> > This is a new problem caused by the revprop packing. Also, there
> > doesn't appear to be an API for explicitly closing the repository
> > handle. Solutions include:
> >
> > - adding an svn_repos_close API
> > - clearing or destroying the pool passed to svn_repos_create
> > - having the test create repositories at different locations
>
> I have implemented the last solution and attached is the patch for the
> same.

I think Philip was just enumerating all possible solutions. I think
making the test suite avoid the problem is the wrong solution --- it
would be better to cause those dangling handles to get closed at the
appropriate time (e.g., when there are no more references to the Python
repos object).
Received on 2010-11-05 13:34:46 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.