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

Re: [bug] possible pool leak in Ruby bindings for FS?

From: Joe Swatosh <joe.swatosh_at_gmail.com>
Date: 2007-03-15 06:06:24 CET

Hi

On 3/14/07, Joe Swatosh <joe.swatosh@gmail.com> wrote:
> Hi,
>
> On 3/14/07, Kouhei Sutou <kou@cozmixng.org> wrote:
> > Hi Joe,
> >
>
>
> >
> > Could you try the attached patch? If the attached patch
> > doesn't pass this test, I'll apply your patch.
> >
>
> Sure, but I won't be able to get to it until this evening.
>
> --
> Joe
>

Almost, needs one more normalize_line_break at line 325 to make it
through the test:

Index: subversion/bindings/swig/ruby/test/test_fs.rb
===================================================================
--- subversion/bindings/swig/ruby/test/test_fs.rb (revision 23833)
+++ subversion/bindings/swig/ruby/test/test_fs.rb (working copy)
@@ -308,9 +308,9 @@

     File.open(path, "w") {|f| f.print(modified)}
     @fs.transaction do |txn|
- checksum = MD5.new(result).hexdigest
+ checksum = MD5.new(normalize_line_break(result)).hexdigest
       stream = txn.root.apply_text(path_in_repos, checksum)
- stream.write(result)
+ stream.write(normalize_line_break(result))
       stream.close
     end
     ctx.up(@wc_path)
@@ -322,15 +322,15 @@
                                               path_in_repos)
     data = ''
     stream.each{|w| data << w.new_data}
- assert_equal(expected, data)
+ assert_equal(normalize_line_break(expected), data)

     File.open(path, "w") {|f| f.print(src)}
     rev3 = ctx.ci(@wc_path).revision

     File.open(path, "w") {|f| f.print(modified)}
     @fs.transaction do |txn|
- base_checksum = MD5.new(src).hexdigest
- checksum = MD5.new(result).hexdigest
+ base_checksum = MD5.new(normalize_line_break(src)).hexdigest
+ checksum = MD5.new(normalize_line_break(result)).hexdigest
       handler = txn.root.apply_textdelta(path_in_repos,
                                          base_checksum, checksum)
       assert_raises(Svn::Error::ChecksumMismatch) do

======

Put still errors during teardown:

D:\SVN\src-trunk\subversion\bindings\swig\ruby>ruby test\run-test.rb
-n test_delta
Loaded suite test
Started
E
Finished in 5.969 seconds.

  1) Error:
test_delta(SvnFsTest):
Svn::Error::SvnError:
D:\SVN\src-trunk\subversion\libsvn_subr\io.c:1810 Can't remove
'test\repos\db\revs\1'
Can't set file 'test\repos\db\revs\1' read-write: Access is denied.
    D:/SVN/src-trunk/subversion/bindings/swig/ruby/svn/util.rb:68:in
`svn_repos_delete'
    D:/SVN/src-trunk/subversion/bindings/swig/ruby/svn/util.rb:68:in `delete'
    D:/SVN/src-trunk/subversion/bindings/swig/ruby/test/util.rb:103:in
`teardown_repository'
    D:/SVN/src-trunk/subversion/bindings/swig/ruby/test/util.rb:40:in
`teardown_basic'
    D:/SVN/src-trunk/subversion/bindings/swig/ruby/test/test_fs.rb:19:in
`teardown'

1 tests, 3 assertions, 0 failures, 1 errors

--
Joe
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Mar 15 06:06:41 2007

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.