You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Philip Martin <ph...@wandisco.com> on 2012/03/22 12:41:26 UTC

APR hash order ruby test failure

There is another failure in the ruby testsuite:

http://ci.apache.org/builders/svn-x64-ubuntu-gcc/builds/4626

  1) Failure:
test_changelists_get_with_block(SvnClientTest)
/var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_client.rb:2296:in `assert_changelists'
/var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/util.rb:204:in `make_context'
/var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_client.rb:2288:in `assert_changelists'
/var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_client.rb:2349:in `test_changelists_get_with_block':
<{nil=>
  ["/tmp/d20120322-8616-qtl2ah/wc",
   "/tmp/d20120322-8616-qtl2ah/wc/hello1.txt",
   "/tmp/d20120322-8616-qtl2ah/wc/hello2.txt"]}> expected but was
<{nil=>
  ["/tmp/d20120322-8616-qtl2ah/wc",
   "/tmp/d20120322-8616-qtl2ah/wc/hello2.txt",
   "/tmp/d20120322-8616-qtl2ah/wc/hello1.txt"]}>.

The failing code is:

    make_context(log) do |ctx|
      File.open(path1, "w") {|f| f.print(src)}
      File.open(path2, "w") {|f| f.print(src)}
      ctx.add(path1)
      ctx.add(path2)
      ctx.commit(@wc_path)

      assert_equal({}, yield(ctx, changelist1))
      assert_equal({nil=>[@wc_path,path1,path2].map{|f| File.expand_path(f)}}, yield(ctx, nil))

This is likely to be APR's new hash randomisation which means that the
notification order of "hello1.txt" and "hello2.txt" is unpredictable.  I
think the fix is for the lists to be sorted but I don't know the
necessary Ruby.

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com

Re: APR hash order ruby test failure

Posted by Daniel Shahaf <da...@elego.de>.
Joe Swatosh wrote on Thu, Mar 22, 2012 at 07:36:16 -0700:
> On Thu, Mar 22, 2012 at 4:41 AM, Philip Martin
> <ph...@wandisco.com> wrote:
> > There is another failure in the ruby testsuite:
> >
> > http://ci.apache.org/builders/svn-x64-ubuntu-gcc/builds/4626
> >
> >  1) Failure:
> > test_changelists_get_with_block(SvnClientTest)
> > /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_client.rb:2296:in `assert_changelists'
> > /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/util.rb:204:in `make_context'
> > /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_client.rb:2288:in `assert_changelists'
> > /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_client.rb:2349:in `test_changelists_get_with_block':
> > <{nil=>
> >  ["/tmp/d20120322-8616-qtl2ah/wc",
> >   "/tmp/d20120322-8616-qtl2ah/wc/hello1.txt",
> >   "/tmp/d20120322-8616-qtl2ah/wc/hello2.txt"]}> expected but was
> > <{nil=>
> >  ["/tmp/d20120322-8616-qtl2ah/wc",
> >   "/tmp/d20120322-8616-qtl2ah/wc/hello2.txt",
> >   "/tmp/d20120322-8616-qtl2ah/wc/hello1.txt"]}>.
> >
> > The failing code is:
> >
> >    make_context(log) do |ctx|
> >      File.open(path1, "w") {|f| f.print(src)}
> >      File.open(path2, "w") {|f| f.print(src)}
> >      ctx.add(path1)
> >      ctx.add(path2)
> >      ctx.commit(@wc_path)
> >
> >      assert_equal({}, yield(ctx, changelist1))
> >      assert_equal({nil=>[@wc_path,path1,path2].map{|f| File.expand_path(f)}}, yield(ctx, nil))
> >
> > This is likely to be APR's new hash randomisation which means that the
> > notification order of "hello1.txt" and "hello2.txt" is unpredictable.  I
> > think the fix is for the lists to be sorted but I don't know the
> > necessary Ruby.
> >
> > --
> > uberSVN: Apache Subversion Made Easy
> > http://www.uberSVN.com
> 
> 
> I'm sure you are right. I'll start into this on the weekend....
> 
> --
> Joe

How about that?  Is it a backwards compatible change?

Index: ruby/svn/client.rb
===================================================================
--- ruby/svn/client.rb	(revision 1303600)
+++ ruby/svn/client.rb	(working copy)
@@ -19,6 +19,7 @@
 
 require "English"
 require 'uri'
+require 'set'
 require "svn/error"
 require "svn/util"
 require "svn/core"
@@ -692,7 +693,7 @@ module Svn
       end
 
       def changelists(changelists_names, root_path, depth=nil, &block)
-        lists_contents = Hash.new{|h,k| h[k]=[]}
+        lists_contents = Hash.new{|h,k| h[k]=Set.new}
         changelists_names = [changelists_names] unless changelists_names.is_a?(Array) or changelists_names.nil?
         block ||= lambda{|path, changelist| lists_contents[changelist] << path }
         Client.get_changelists(root_path, changelists_names, depth, block, self)
Index: ruby/test/test_client.rb
===================================================================
--- ruby/test/test_client.rb	(revision 1303600)
+++ ruby/test/test_client.rb	(working copy)
@@ -17,6 +17,8 @@
 #    under the License.
 # ====================================================================
 
+require 'set'
+
 require "my-assertions"
 require "util"
 
@@ -2293,7 +2295,8 @@ class SvnClientTest < Test::Unit::TestCase
       ctx.commit(@wc_path)
 
       assert_equal({}, yield(ctx, changelist1))
-      assert_equal({nil=>[@wc_path,path1,path2].map{|f| File.expand_path(f)}}, yield(ctx, nil))
+      assert_equal({nil=>[@wc_path,path1,path2].map{|f| File.expand_path(f)}.to_set},
+                   yield(ctx, nil))
       assert_equal({}, yield(ctx, []))
       assert_equal({}, yield(ctx, [changelist1]))
       assert_equal({}, yield(ctx, [changelist2]))
@@ -2347,7 +2350,7 @@ class SvnClientTest < Test::Unit::TestCase
 
   def test_changelists_get_with_block
     assert_changelists do |ctx, changelist_name|
-      changelists = Hash.new{|h,k| h[k]=[]}
+      changelists = Hash.new{|h,k| h[k]=Set.new}
       ctx.changelists(changelist_name, @wc_path) do |path,cl_name|
         changelists[cl_name] << path
       end

Re: APR hash order ruby test failure

Posted by Joe Swatosh <jo...@gmail.com>.
On Thu, Mar 22, 2012 at 4:41 AM, Philip Martin
<ph...@wandisco.com> wrote:
> There is another failure in the ruby testsuite:
>
> http://ci.apache.org/builders/svn-x64-ubuntu-gcc/builds/4626
>
>  1) Failure:
> test_changelists_get_with_block(SvnClientTest)
> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_client.rb:2296:in `assert_changelists'
> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/util.rb:204:in `make_context'
> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_client.rb:2288:in `assert_changelists'
> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_client.rb:2349:in `test_changelists_get_with_block':
> <{nil=>
>  ["/tmp/d20120322-8616-qtl2ah/wc",
>   "/tmp/d20120322-8616-qtl2ah/wc/hello1.txt",
>   "/tmp/d20120322-8616-qtl2ah/wc/hello2.txt"]}> expected but was
> <{nil=>
>  ["/tmp/d20120322-8616-qtl2ah/wc",
>   "/tmp/d20120322-8616-qtl2ah/wc/hello2.txt",
>   "/tmp/d20120322-8616-qtl2ah/wc/hello1.txt"]}>.
>
> The failing code is:
>
>    make_context(log) do |ctx|
>      File.open(path1, "w") {|f| f.print(src)}
>      File.open(path2, "w") {|f| f.print(src)}
>      ctx.add(path1)
>      ctx.add(path2)
>      ctx.commit(@wc_path)
>
>      assert_equal({}, yield(ctx, changelist1))
>      assert_equal({nil=>[@wc_path,path1,path2].map{|f| File.expand_path(f)}}, yield(ctx, nil))
>
> This is likely to be APR's new hash randomisation which means that the
> notification order of "hello1.txt" and "hello2.txt" is unpredictable.  I
> think the fix is for the lists to be sorted but I don't know the
> necessary Ruby.
>
> --
> uberSVN: Apache Subversion Made Easy
> http://www.uberSVN.com


I'm sure you are right. I'll start into this on the weekend....

--
Joe

Re: APR hash order ruby test failure

Posted by Hyrum K Wright <hy...@wandisco.com>.
On Wed, Mar 28, 2012 at 8:04 AM, Daniel Shahaf <d....@daniel.shahaf.name> wrote:
> Philip Martin wrote on Wed, Mar 28, 2012 at 10:30:31 +0100:
>> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_wc.rb:764:in `test_diff_callbacks_for_backward_compatibility':
>> <[[:dir_props_changed,
>>   "/tmp/d20120327-16259-17t4nz8/wc",
>>   [#<Svn::Core::Prop:0x2ac09bd95450
>>     @name="svn:entry:committed-date",
>>     @value=nil>,
>>    #<Svn::Core::Prop:0x2ac09bd95428
>>     @name="svn:entry:committed-rev",
>>     @value=nil>,
>>    #<Svn::Core::Prop:0x2ac09bd95400 @name="svn:entry:last-author", @value=nil>,
>>    #<Svn::Core::Prop:0x2ac09bd95360 @name="svn:entry:uuid", @value=nil>]],
>>  [:file_changed,
>>   "/tmp/d20120327-16259-17t4nz8/wc/dir/hello.txt",
>>   [#<Svn::Core::Prop:0x2ac09bd952e8 @name="my-prop", @value="value">]],
>>  [:file_added, "/tmp/d20120327-16259-17t4nz8/wc/dir/hello2.txt", []]]> expected but was
>
> FTR, I haven't looked closely, but I expect we shouldn't be seeing
> entryprops here.

It depends on at what layer the test is operating (I haven't looked
very closely either).  The ruby tests are very thorough, and it
wouldn't surprise me if some of them were being run on APIs which do
expose entry props.

-Hyrum


-- 

uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com/

Re: APR hash order ruby test failure

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Philip Martin wrote on Wed, Mar 28, 2012 at 10:30:31 +0100:
> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_wc.rb:764:in `test_diff_callbacks_for_backward_compatibility':
> <[[:dir_props_changed,
>   "/tmp/d20120327-16259-17t4nz8/wc",
>   [#<Svn::Core::Prop:0x2ac09bd95450
>     @name="svn:entry:committed-date",
>     @value=nil>,
>    #<Svn::Core::Prop:0x2ac09bd95428
>     @name="svn:entry:committed-rev",
>     @value=nil>,
>    #<Svn::Core::Prop:0x2ac09bd95400 @name="svn:entry:last-author", @value=nil>,
>    #<Svn::Core::Prop:0x2ac09bd95360 @name="svn:entry:uuid", @value=nil>]],
>  [:file_changed,
>   "/tmp/d20120327-16259-17t4nz8/wc/dir/hello.txt",
>   [#<Svn::Core::Prop:0x2ac09bd952e8 @name="my-prop", @value="value">]],
>  [:file_added, "/tmp/d20120327-16259-17t4nz8/wc/dir/hello2.txt", []]]> expected but was

FTR, I haven't looked closely, but I expect we shouldn't be seeing
entryprops here.

Re: APR hash order ruby test failure

Posted by Philip Martin <ph...@wandisco.com>.
Joe Swatosh <jo...@gmail.com> writes:

> From that perspective, it seems to me that the best approach is to use
> the Set in the test, but not in the bindings themselves. Also the
> current APIs don't provide order guarantees (obviously), but if they
> started to guarantee order in the future, the Set may be a bad choice
> in the interface.

That sounds reasonable.  The bindings test currently cause a Ruby SEGV
if APR is built with pool debugging enabled:

#1  <signal handler called>
#2  0x00007ffff5bffa91 in apr_hash_next (hi=0x737190) at tables/apr_hash.c:134
#3  0x00007ffff62be912 in c2r_hash_with_key_convert (hash=0x737180, 
    key_conv=0x7ffff62bcbc9 <c2r_string>, key_ctx=0x0, 
    value_conv=0x7ffff62bc8f6 <svn_swig_rb_from_swig_type>, 
    value_ctx=0x7ffff653a530)
    at ../src/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c:1432
#4  0x00007ffff62be9ed in c2r_hash (hash=0x737180, 
    value_conv=0x7ffff62bc8f6 <svn_swig_rb_from_swig_type>, ctx=0x7ffff653a530)
    at ../src/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c:1452
#5  0x00007ffff62bea65 in svn_swig_rb_apr_hash_to_hash_swig_type (
    hash=0x737180, type_name=0x7ffff653a530 "svn_log_changed_path_t *")
    at ../src/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c:1470
#6  0x00007ffff64e2f40 in _wrap_svn_log_entry_t_changed_paths_get (argc=0, 
    argv=0x0, self=140737217253200)
    at subversion/bindings/swig/ruby/core.c:5695
#7  0x00007ffff7b1c0ae in ?? () from /usr/lib/libruby1.8.so.1.8

(gdb) down
#3  0x00007ffff62be912 in c2r_hash_with_key_convert (hash=0x737180, 
    key_conv=0x7ffff62bcbc9 <c2r_string>, key_ctx=0x0, 
    value_conv=0x7ffff62bc8f6 <svn_swig_rb_from_swig_type>, 
    value_ctx=0x7ffff653a530)
    at ../src/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c:1432
1432      for (hi = apr_hash_first(NULL, hash); hi; hi = apr_hash_next(hi)) {
(gdb) p hash[0]
$3 = {pool = 0x0, array = 0x51, iterator = {ht = 0x737180, this = 0x0, 
    next = 0x0, index = 1}, count = 0, max = 0, seed = 1094795585, 
  hash_func = 0x4141414141414141, free = 0x4141414141414141}

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com

Re: APR hash order ruby test failure

Posted by Joe Swatosh <jo...@gmail.com>.
On Wed, Mar 28, 2012 at 5:44 AM, Philip Martin
<ph...@wandisco.com> wrote:
> Hyrum K Wright <hy...@wandisco.com> writes:
>
>> On Wed, Mar 28, 2012 at 4:30 AM, Philip Martin
>>>
>>> We fix these by converting the arrays to sets so that the order is
>>> irrelevant.  The open question is whether we do this solely within the
>>> testsuite, changing both sides of the comparison, or whether we change
>>> the bindings to return a set and adjust the testsuite to match.
>>
>> I think that depends on the compatibility guarantees of the bindings.
>> Making them a set feels more correct from a semantic perspective, but
>> I don't know if it will break existing consumers.
>
> Indeed; Daniel and I discusssed it on IRC.  We don't really know what
> guarantees apply.  We don't know who consumes the Ruby bindings, google
> doesn't show much so perhaps it's people writing private stuff.  Some
> consumers may not even notice an array to set change and would continue
> to operate.
>
> --
> uberSVN: Apache Subversion Made Easy
> http://www.uberSVN.com


Sorry I haven't had any time to devote to this. I changed something,
now my tests are failing for revisions that used to pass.....  I'm not
sure what the compatibility guarantees are. In the past, working with
kou, we basically tried to keep everything backward compatible.

>From that perspective, it seems to me that the best approach is to use
the Set in the test, but not in the bindings themselves. Also the
current APIs don't provide order guarantees (obviously), but if they
started to guarantee order in the future, the Set may be a bad choice
in the interface. I haven't had a chance to even look at this, so take
the above with a grain of salt.

--
Joe

Re: APR hash order ruby test failure

Posted by Philip Martin <ph...@wandisco.com>.
Hyrum K Wright <hy...@wandisco.com> writes:

> On Wed, Mar 28, 2012 at 4:30 AM, Philip Martin
>>
>> We fix these by converting the arrays to sets so that the order is
>> irrelevant.  The open question is whether we do this solely within the
>> testsuite, changing both sides of the comparison, or whether we change
>> the bindings to return a set and adjust the testsuite to match.
>
> I think that depends on the compatibility guarantees of the bindings.
> Making them a set feels more correct from a semantic perspective, but
> I don't know if it will break existing consumers.

Indeed; Daniel and I discusssed it on IRC.  We don't really know what
guarantees apply.  We don't know who consumes the Ruby bindings, google
doesn't show much so perhaps it's people writing private stuff.  Some
consumers may not even notice an array to set change and would continue
to operate.

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com

Re: APR hash order ruby test failure

Posted by Hyrum K Wright <hy...@wandisco.com>.
On Wed, Mar 28, 2012 at 4:30 AM, Philip Martin
<ph...@wandisco.com> wrote:
> Philip Martin <ph...@wandisco.com> writes:
>
>> There is another failure in the ruby testsuite:
>>
>> http://ci.apache.org/builders/svn-x64-ubuntu-gcc/builds/4626
>>
>>   1) Failure:
>> test_changelists_get_with_block(SvnClientTest)
>> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_client.rb:2296:in `assert_changelists'
>> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/util.rb:204:in `make_context'
>> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_client.rb:2288:in `assert_changelists'
>> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_client.rb:2349:in `test_changelists_get_with_block':
>> <{nil=>
>>   ["/tmp/d20120322-8616-qtl2ah/wc",
>>    "/tmp/d20120322-8616-qtl2ah/wc/hello1.txt",
>>    "/tmp/d20120322-8616-qtl2ah/wc/hello2.txt"]}> expected but was
>> <{nil=>
>>   ["/tmp/d20120322-8616-qtl2ah/wc",
>>    "/tmp/d20120322-8616-qtl2ah/wc/hello2.txt",
>>    "/tmp/d20120322-8616-qtl2ah/wc/hello1.txt"]}>.
>
> Another failure that looks like a similar problem in a different place:
>
>  1) Failure:
> test_diff_callbacks_for_backward_compatibility(SvnWcTest)
> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_wc.rb:756:in `assert_diff_callbacks'
> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/svn/wc.rb:136:in `_open'
> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/svn/wc.rb:114:in `open'
> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_wc.rb:711:in `assert_diff_callbacks'
> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/svn/ra.rb:52:in `open'
> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_wc.rb:699:in `assert_diff_callbacks'
> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/util.rb:204:in `make_context'
> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_wc.rb:696:in `assert_diff_callbacks'
> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_wc.rb:764:in `test_diff_callbacks_for_backward_compatibility':
> <[[:dir_props_changed,
>  "/tmp/d20120327-16259-17t4nz8/wc",
>  [#<Svn::Core::Prop:0x2ac09bd95450
>    @name="svn:entry:committed-date",
>    @value=nil>,
>   #<Svn::Core::Prop:0x2ac09bd95428
>    @name="svn:entry:committed-rev",
>    @value=nil>,
>   #<Svn::Core::Prop:0x2ac09bd95400 @name="svn:entry:last-author", @value=nil>,
>   #<Svn::Core::Prop:0x2ac09bd95360 @name="svn:entry:uuid", @value=nil>]],
>  [:file_changed,
>  "/tmp/d20120327-16259-17t4nz8/wc/dir/hello.txt",
>  [#<Svn::Core::Prop:0x2ac09bd952e8 @name="my-prop", @value="value">]],
>  [:file_added, "/tmp/d20120327-16259-17t4nz8/wc/dir/hello2.txt", []]]> expected but was
> <[[:dir_props_changed,
>  "/tmp/d20120327-16259-17t4nz8/wc",
>  [#<Svn::Core::Prop:0x2ac09bd95ea0
>    @name="svn:entry:committed-date",
>    @value=nil>,
>   #<Svn::Core::Prop:0x2ac09bd95e50
>    @name="svn:entry:committed-rev",
>    @value=nil>,
>   #<Svn::Core::Prop:0x2ac09bd95f18 @name="svn:entry:last-author", @value=nil>,
>   #<Svn::Core::Prop:0x2ac09bd95dd8 @name="svn:entry:uuid", @value=nil>]],
>  [:file_added, "/tmp/d20120327-16259-17t4nz8/wc/dir/hello2.txt", []],
>  [:file_changed,
>  "/tmp/d20120327-16259-17t4nz8/wc/dir/hello.txt",
>  [#<Svn::Core::Prop:0x2ac09bd95860 @name="my-prop", @value="value">]]]>.
>
> We fix these by converting the arrays to sets so that the order is
> irrelevant.  The open question is whether we do this solely within the
> testsuite, changing both sides of the comparison, or whether we change
> the bindings to return a set and adjust the testsuite to match.

I think that depends on the compatibility guarantees of the bindings.
Making them a set feels more correct from a semantic perspective, but
I don't know if it will break existing consumers.

-Hyrum


-- 

uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com/

Re: APR hash order ruby test failure

Posted by Joe Swatosh <jo...@gmail.com>.
On Fri, Apr 6, 2012 at 11:32 AM, Joe Swatosh <jo...@gmail.com> wrote:
> On Wed, Mar 28, 2012 at 2:30 AM, Philip Martin
> <ph...@wandisco.com> wrote:
>> Philip Martin <ph...@wandisco.com> writes:
>>
>>> There is another failure in the ruby testsuite:
>>>
>>> http://ci.apache.org/builders/svn-x64-ubuntu-gcc/builds/4626
>>>
>>>   1) Failure:
>>> test_changelists_get_with_block(SvnClientTest)
>>> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_client.rb:2296:in `assert_changelists'
>>> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/util.rb:204:in `make_context'
>>> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_client.rb:2288:in `assert_changelists'
>>> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_client.rb:2349:in `test_changelists_get_with_block':
>>> <{nil=>
>>>   ["/tmp/d20120322-8616-qtl2ah/wc",
>>>    "/tmp/d20120322-8616-qtl2ah/wc/hello1.txt",
>>>    "/tmp/d20120322-8616-qtl2ah/wc/hello2.txt"]}> expected but was
>>> <{nil=>
>>>   ["/tmp/d20120322-8616-qtl2ah/wc",
>>>    "/tmp/d20120322-8616-qtl2ah/wc/hello2.txt",
>>>    "/tmp/d20120322-8616-qtl2ah/wc/hello1.txt"]}>.
>>
>> Another failure that looks like a similar problem in a different place:
>>
>>  1) Failure:
>> test_diff_callbacks_for_backward_compatibility(SvnWcTest)
>> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_wc.rb:756:in `assert_diff_callbacks'
>> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/svn/wc.rb:136:in `_open'
>> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/svn/wc.rb:114:in `open'
>> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_wc.rb:711:in `assert_diff_callbacks'
>> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/svn/ra.rb:52:in `open'
>> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_wc.rb:699:in `assert_diff_callbacks'
>> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/util.rb:204:in `make_context'
>> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_wc.rb:696:in `assert_diff_callbacks'
>> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_wc.rb:764:in `test_diff_callbacks_for_backward_compatibility':
>> <[[:dir_props_changed,
>>  "/tmp/d20120327-16259-17t4nz8/wc",
>>  [#<Svn::Core::Prop:0x2ac09bd95450
>>    @name="svn:entry:committed-date",
>>    @value=nil>,
>>   #<Svn::Core::Prop:0x2ac09bd95428
>>    @name="svn:entry:committed-rev",
>>    @value=nil>,
>>   #<Svn::Core::Prop:0x2ac09bd95400 @name="svn:entry:last-author", @value=nil>,
>>   #<Svn::Core::Prop:0x2ac09bd95360 @name="svn:entry:uuid", @value=nil>]],
>>  [:file_changed,
>>  "/tmp/d20120327-16259-17t4nz8/wc/dir/hello.txt",
>>  [#<Svn::Core::Prop:0x2ac09bd952e8 @name="my-prop", @value="value">]],
>>  [:file_added, "/tmp/d20120327-16259-17t4nz8/wc/dir/hello2.txt", []]]> expected but was
>> <[[:dir_props_changed,
>>  "/tmp/d20120327-16259-17t4nz8/wc",
>>  [#<Svn::Core::Prop:0x2ac09bd95ea0
>>    @name="svn:entry:committed-date",
>>    @value=nil>,
>>   #<Svn::Core::Prop:0x2ac09bd95e50
>>    @name="svn:entry:committed-rev",
>>    @value=nil>,
>>   #<Svn::Core::Prop:0x2ac09bd95f18 @name="svn:entry:last-author", @value=nil>,
>>   #<Svn::Core::Prop:0x2ac09bd95dd8 @name="svn:entry:uuid", @value=nil>]],
>>  [:file_added, "/tmp/d20120327-16259-17t4nz8/wc/dir/hello2.txt", []],
>>  [:file_changed,
>>  "/tmp/d20120327-16259-17t4nz8/wc/dir/hello.txt",
>>  [#<Svn::Core::Prop:0x2ac09bd95860 @name="my-prop", @value="value">]]]>.
>>
>> We fix these by converting the arrays to sets so that the order is
>> irrelevant.  The open question is whether we do this solely within the
>> testsuite, changing both sides of the comparison, or whether we change
>> the bindings to return a set and adjust the testsuite to match.
>>
>
> I think I've addressed the first failure in r1310535. I will continue
> looking into the wc failure.
>

I think r1310594 takes care of the wc failures in the Ruby bindings.
I'm not seeing other test failures locally, please let me know if
others start failing....

--
Joe

Re: APR hash order ruby test failure

Posted by Joe Swatosh <jo...@gmail.com>.
On Wed, Mar 28, 2012 at 2:30 AM, Philip Martin
<ph...@wandisco.com> wrote:
> Philip Martin <ph...@wandisco.com> writes:
>
>> There is another failure in the ruby testsuite:
>>
>> http://ci.apache.org/builders/svn-x64-ubuntu-gcc/builds/4626
>>
>>   1) Failure:
>> test_changelists_get_with_block(SvnClientTest)
>> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_client.rb:2296:in `assert_changelists'
>> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/util.rb:204:in `make_context'
>> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_client.rb:2288:in `assert_changelists'
>> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_client.rb:2349:in `test_changelists_get_with_block':
>> <{nil=>
>>   ["/tmp/d20120322-8616-qtl2ah/wc",
>>    "/tmp/d20120322-8616-qtl2ah/wc/hello1.txt",
>>    "/tmp/d20120322-8616-qtl2ah/wc/hello2.txt"]}> expected but was
>> <{nil=>
>>   ["/tmp/d20120322-8616-qtl2ah/wc",
>>    "/tmp/d20120322-8616-qtl2ah/wc/hello2.txt",
>>    "/tmp/d20120322-8616-qtl2ah/wc/hello1.txt"]}>.
>
> Another failure that looks like a similar problem in a different place:
>
>  1) Failure:
> test_diff_callbacks_for_backward_compatibility(SvnWcTest)
> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_wc.rb:756:in `assert_diff_callbacks'
> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/svn/wc.rb:136:in `_open'
> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/svn/wc.rb:114:in `open'
> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_wc.rb:711:in `assert_diff_callbacks'
> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/svn/ra.rb:52:in `open'
> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_wc.rb:699:in `assert_diff_callbacks'
> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/util.rb:204:in `make_context'
> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_wc.rb:696:in `assert_diff_callbacks'
> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_wc.rb:764:in `test_diff_callbacks_for_backward_compatibility':
> <[[:dir_props_changed,
>  "/tmp/d20120327-16259-17t4nz8/wc",
>  [#<Svn::Core::Prop:0x2ac09bd95450
>    @name="svn:entry:committed-date",
>    @value=nil>,
>   #<Svn::Core::Prop:0x2ac09bd95428
>    @name="svn:entry:committed-rev",
>    @value=nil>,
>   #<Svn::Core::Prop:0x2ac09bd95400 @name="svn:entry:last-author", @value=nil>,
>   #<Svn::Core::Prop:0x2ac09bd95360 @name="svn:entry:uuid", @value=nil>]],
>  [:file_changed,
>  "/tmp/d20120327-16259-17t4nz8/wc/dir/hello.txt",
>  [#<Svn::Core::Prop:0x2ac09bd952e8 @name="my-prop", @value="value">]],
>  [:file_added, "/tmp/d20120327-16259-17t4nz8/wc/dir/hello2.txt", []]]> expected but was
> <[[:dir_props_changed,
>  "/tmp/d20120327-16259-17t4nz8/wc",
>  [#<Svn::Core::Prop:0x2ac09bd95ea0
>    @name="svn:entry:committed-date",
>    @value=nil>,
>   #<Svn::Core::Prop:0x2ac09bd95e50
>    @name="svn:entry:committed-rev",
>    @value=nil>,
>   #<Svn::Core::Prop:0x2ac09bd95f18 @name="svn:entry:last-author", @value=nil>,
>   #<Svn::Core::Prop:0x2ac09bd95dd8 @name="svn:entry:uuid", @value=nil>]],
>  [:file_added, "/tmp/d20120327-16259-17t4nz8/wc/dir/hello2.txt", []],
>  [:file_changed,
>  "/tmp/d20120327-16259-17t4nz8/wc/dir/hello.txt",
>  [#<Svn::Core::Prop:0x2ac09bd95860 @name="my-prop", @value="value">]]]>.
>
> We fix these by converting the arrays to sets so that the order is
> irrelevant.  The open question is whether we do this solely within the
> testsuite, changing both sides of the comparison, or whether we change
> the bindings to return a set and adjust the testsuite to match.
>

I think I've addressed the first failure in r1310535. I will continue
looking into the wc failure.

--
Joe

Re: APR hash order ruby test failure

Posted by Philip Martin <ph...@wandisco.com>.
Philip Martin <ph...@wandisco.com> writes:

> There is another failure in the ruby testsuite:
>
> http://ci.apache.org/builders/svn-x64-ubuntu-gcc/builds/4626
>
>   1) Failure:
> test_changelists_get_with_block(SvnClientTest)
> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_client.rb:2296:in `assert_changelists'
> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/util.rb:204:in `make_context'
> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_client.rb:2288:in `assert_changelists'
> /var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_client.rb:2349:in `test_changelists_get_with_block':
> <{nil=>
>   ["/tmp/d20120322-8616-qtl2ah/wc",
>    "/tmp/d20120322-8616-qtl2ah/wc/hello1.txt",
>    "/tmp/d20120322-8616-qtl2ah/wc/hello2.txt"]}> expected but was
> <{nil=>
>   ["/tmp/d20120322-8616-qtl2ah/wc",
>    "/tmp/d20120322-8616-qtl2ah/wc/hello2.txt",
>    "/tmp/d20120322-8616-qtl2ah/wc/hello1.txt"]}>.

Another failure that looks like a similar problem in a different place:

  1) Failure:
test_diff_callbacks_for_backward_compatibility(SvnWcTest)
/var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_wc.rb:756:in `assert_diff_callbacks'
/var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/svn/wc.rb:136:in `_open'
/var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/svn/wc.rb:114:in `open'
/var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_wc.rb:711:in `assert_diff_callbacks'
/var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/svn/ra.rb:52:in `open'
/var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_wc.rb:699:in `assert_diff_callbacks'
/var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/util.rb:204:in `make_context'
/var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_wc.rb:696:in `assert_diff_callbacks'
/var/lib/buildbot/svn-buildslave/svn-x64-ubuntu/build/subversion/bindings/swig/ruby/test/test_wc.rb:764:in `test_diff_callbacks_for_backward_compatibility':
<[[:dir_props_changed,
  "/tmp/d20120327-16259-17t4nz8/wc",
  [#<Svn::Core::Prop:0x2ac09bd95450
    @name="svn:entry:committed-date",
    @value=nil>,
   #<Svn::Core::Prop:0x2ac09bd95428
    @name="svn:entry:committed-rev",
    @value=nil>,
   #<Svn::Core::Prop:0x2ac09bd95400 @name="svn:entry:last-author", @value=nil>,
   #<Svn::Core::Prop:0x2ac09bd95360 @name="svn:entry:uuid", @value=nil>]],
 [:file_changed,
  "/tmp/d20120327-16259-17t4nz8/wc/dir/hello.txt",
  [#<Svn::Core::Prop:0x2ac09bd952e8 @name="my-prop", @value="value">]],
 [:file_added, "/tmp/d20120327-16259-17t4nz8/wc/dir/hello2.txt", []]]> expected but was
<[[:dir_props_changed,
  "/tmp/d20120327-16259-17t4nz8/wc",
  [#<Svn::Core::Prop:0x2ac09bd95ea0
    @name="svn:entry:committed-date",
    @value=nil>,
   #<Svn::Core::Prop:0x2ac09bd95e50
    @name="svn:entry:committed-rev",
    @value=nil>,
   #<Svn::Core::Prop:0x2ac09bd95f18 @name="svn:entry:last-author", @value=nil>,
   #<Svn::Core::Prop:0x2ac09bd95dd8 @name="svn:entry:uuid", @value=nil>]],
 [:file_added, "/tmp/d20120327-16259-17t4nz8/wc/dir/hello2.txt", []],
 [:file_changed,
  "/tmp/d20120327-16259-17t4nz8/wc/dir/hello.txt",
  [#<Svn::Core::Prop:0x2ac09bd95860 @name="my-prop", @value="value">]]]>.

We fix these by converting the arrays to sets so that the order is
irrelevant.  The open question is whether we do this solely within the
testsuite, changing both sides of the comparison, or whether we change
the bindings to return a set and adjust the testsuite to match.

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com