Project

General

Profile

Actions

Bug #6405

closed

Re: [ruby-cvs:42717] ryan:r35541 (trunk): Imported minitest 2.12.1 (r7323)

Added by naruse (Yui NARUSE) over 12 years ago. Updated over 12 years ago.

Status:
Closed
Target version:
ruby -v:
trunk
Backport:
[ruby-core:44884]

Description

After r35541, test-all fails as following:

  1. Error:
    test_equals_tilde(TestGemPlatform):
    TypeError: can't convert Gem::Platform to String
    /home/chkbuild/build/ruby-trunk/20120504T230101Z/ruby/test/rubygems/test_gem_platform.rb:210:in test_equals_tilde' /home/chkbuild/build/ruby-trunk/20120504T230101Z/ruby/lib/test/unit.rb:633:in block in _run_suites'
    /home/chkbuild/build/ruby-trunk/20120504T230101Z/ruby/lib/test/unit.rb:631:in each' /home/chkbuild/build/ruby-trunk/20120504T230101Z/ruby/lib/test/unit.rb:631:in _run_suites'
    /home/chkbuild/build/ruby-trunk/20120504T230101Z/ruby/lib/test/unit.rb:21:in run' /home/chkbuild/build/ruby-trunk/20120504T230101Z/ruby/lib/test/unit.rb:682:in run'
    /home/chkbuild/build/ruby-trunk/20120504T230101Z/ruby/lib/test/unit.rb:714:in run' /home/chkbuild/build/ruby-trunk/20120504T230101Z/ruby/lib/test/unit.rb:718:in run'
    ./test/runner.rb:15:in `'

  2. Error:
    test_dir(TestGemInstaller):
    TypeError: can't convert Regexp to String
    /home/chkbuild/build/ruby-trunk/20120504T230101Z/ruby/test/rubygems/test_gem_installer.rb:1220:in test_dir' /home/chkbuild/build/ruby-trunk/20120504T230101Z/ruby/lib/test/unit.rb:633:in block in _run_suites'
    /home/chkbuild/build/ruby-trunk/20120504T230101Z/ruby/lib/test/unit.rb:631:in each' /home/chkbuild/build/ruby-trunk/20120504T230101Z/ruby/lib/test/unit.rb:631:in _run_suites'
    /home/chkbuild/build/ruby-trunk/20120504T230101Z/ruby/lib/test/unit.rb:21:in run' /home/chkbuild/build/ruby-trunk/20120504T230101Z/ruby/lib/test/unit.rb:682:in run'
    /home/chkbuild/build/ruby-trunk/20120504T230101Z/ruby/lib/test/unit.rb:714:in run' /home/chkbuild/build/ruby-trunk/20120504T230101Z/ruby/lib/test/unit.rb:718:in run'
    ./test/runner.rb:15:in `'

Why don't you run tests before commit.

(2012/05/05 6:46), wrote:

ryan 2012-05-05 06:46:01 +0900 (Sat, 05 May 2012)

New Revision: 35541

http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=35541

Log:
Imported minitest 2.12.1 (r7323)

Added files:
trunk/test/minitest/metametameta.rb
Modified files:
trunk/ChangeLog
trunk/lib/minitest/README.txt
trunk/lib/minitest/autorun.rb
trunk/lib/minitest/benchmark.rb
trunk/lib/minitest/mock.rb
trunk/lib/minitest/pride.rb
trunk/lib/minitest/spec.rb
trunk/lib/minitest/unit.rb
trunk/test/minitest/test_minitest_benchmark.rb
trunk/test/minitest/test_minitest_mock.rb
trunk/test/minitest/test_minitest_spec.rb
trunk/test/minitest/test_minitest_unit.rb

--
NARUSE, Yui

Updated by ayumin (Ayumu AIZAWA) over 12 years ago

  • Assignee set to zenspider (Ryan Davis)
  • Target version set to 2.0.0
  • ruby -v set to trunk
Actions #2

Updated by ayumin (Ayumu AIZAWA) over 12 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r35543.
Yui, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • test/rubygems/test_gem_installer.rb: fix broken test for r35541.
    [ruby-core:44884][Bug #6405]
  • test/rubygems/test_gem_platform.rb: ditto.

Updated by ayumin (Ayumu AIZAWA) over 12 years ago

  • Status changed from Closed to Assigned

sorry, r35543 was wrong. ( reverted by r35544)

It should be fixed by mintiest side like as following:

--- a/lib/minitest/unit.rb
+++ b/lib/minitest/unit.rb
@@ -281,8 +281,8 @@ module MiniTest

 def assert_match matcher, obj, msg = nil
   msg = message(msg) { "Expected #{mu_pp matcher} to match #{mu_pp obj}" }
  •  assert_respond_to matcher, :"=~"
    
  •  matcher = Regexp.new Regexp.escape matcher if String === matcher
    
  •  assert_respond_to obj, :"=~"
    
  •  matcher = Regexp.new Regexp.escape matcher if String === matcher and String === obj
     assert matcher =~ obj, msg
    
    end

@@ -582,8 +582,8 @@ module MiniTest

 def refute_match matcher, obj, msg = nil
   msg = message(msg) {"Expected #{mu_pp matcher} to not match #{mu_pp obj}"}
  •  assert_respond_to matcher, :"=~"
    
  •  matcher = Regexp.new Regexp.escape matcher if String === matcher
    
  •  assert_respond_to obj, :"=~"
    
  •  matcher = Regexp.new Regexp.escape matcher if String === matcher and String === obj
     refute matcher =~ obj, msg
    
    end

Updated by ayumin (Ayumu AIZAWA) over 12 years ago

hi Ryan,

I just sent pull request.
https://github.com/seattlerb/minitest/pull/124

Thanks.

Updated by zenspider (Ryan Davis) over 12 years ago

=begin
This is why I don't run full tests before:

% egrep "= (E|F)" test.ruby.1.txt
TestBug4409#test_bug4409 = 76.40 s = E
TestDRbAry#test_01 = 75.83 s = E
TestDRbAry#test_02_collect = 76.00 s = E
TestDRbAry#test_03_redo = 76.25 s = E
TestDRbAry#test_05_break = 75.55 s = E
TestDRbAry#test_06_next = 76.66 s = E
TestDRbAry#test_07_break_18 = 76.10 s = E
TestGemInstaller#test_dir = 0.04 s = E
TestGemPlatform#test_equals_tilde = 0.01 s = E

I've brought it up on ruby-core before and it's been ignored. It makes running tests slow and full of false-negatives.

Also, currently the tests are completely hung on:

TestPathname#test_pathsubext_506 =

it's probably been 10 minutes now. This one seems like a new problem.

Total time?

TestPathname#test_pathsubext_506 = ^Crake aborted!
Command failed with status (130): [make test-all TESTS=-v 2>&1 | tee test.rub...]

Tasks: TOP => default => testall
(See full trace by running task with --trace)

real 26m21.703s
user 4m1.962s
sys 0m33.156s

That's a LOT of wasted time and false positives to sift through.

P.S. I'm not getting email from redmine on tickets assigned to me. Should I? [ETA: fixed? I hope]

=end

Updated by ayumin (Ayumu AIZAWA) over 12 years ago

Hi Ryan

We hope to you will run full-test before importing any change to keep ruby stable.
You can use parallel-test with -j option to run full-test faster.

Anyway, r35541 broke existing test of ruby-core. it should be a bug unless it is intend.
Could you fix the problem, or explain your intention of that change?

P.S. I'm not getting email from redmine on tickets assigned to me. Should I?
Please set your email into your redmine account to get email when ticket assigned.

Regards.


Ayumu

Actions #7

Updated by zenspider (Ryan Davis) over 12 years ago

How can I run the tests if the tests hang?

Updated by kosaki (Motohiro KOSAKI) over 12 years ago

On Sat, May 5, 2012 at 5:17 PM, zenspider (Ryan Davis)
wrote:

Issue #6405 has been updated by zenspider (Ryan Davis).

How can I run the tests if the tests hang?

fix a bug?

At least you can wait until hang was resolved or create new ticket for
hang. isn't it?

Updated by naruse (Yui NARUSE) over 12 years ago

(2012/05/06 5:05), zenspider (Ryan Davis) wrote:

Issue #6405 has been updated by zenspider (Ryan Davis).

=begin
This is why I don't run full tests before:

% egrep "= (E|F)" test.ruby.1.txt
TestBug4409#test_bug4409 = 76.40 s = E
TestDRbAry#test_01 = 75.83 s = E
TestDRbAry#test_02_collect = 76.00 s = E
TestDRbAry#test_03_redo = 76.25 s = E
TestDRbAry#test_05_break = 75.55 s = E
TestDRbAry#test_06_next = 76.66 s = E
TestDRbAry#test_07_break_18 = 76.10 s = E
TestGemInstaller#test_dir = 0.04 s = E
TestGemPlatform#test_equals_tilde = 0.01 s = E

I've brought it up on ruby-core before and it's been ignored. It makes running tests slow and full of false-negatives.

Oh, sorry, I missed it.
Can you reproduce it by 100% or randomly reproduced?
I can't produce such drb issues with
ruby 2.0.0dev (2012-05-05 tunk 35544) [x86_64-darwin11.3.0].
Could you make a new ticket of it and assign it to seki?

All test except 2 tests, TestGemInstaller and TestGemPlatform, should pass.
You can see CI by http://rubyci.org/ and know the status on other than yours.

Anyway you can exclude such tests by -x option for test/unit like

make RUBYOPT=-w TESTS='-qv -j3 -x drb' test-all

  • -q ignores skipped tests
  • -v shows detail of tests
  • -j runs tests in parallel
  • -x exclude tests

Also, currently the tests are completely hung on:

TestPathname#test_pathsubext_506 =

it's probably been 10 minutes now. This one seems like a new problem.

Total time?

TestPathname#test_pathsubext_506 = ^Crake aborted!
Command failed with status (130): [make test-all TESTS=-v 2>&1 | tee test.rub...]

Hmm, I can't reproduce it with ruby 2.0.0dev (2012-05-05 tunk 35544) [x86_64-darwin11.3.0]

P.S. I'm not getting email from redmine on tickets assigned to me. Should I?

Yes, you should see them unless you can notice what tickets are assigned to you.

--
NARUSE, Yui

Updated by akr (Akira Tanaka) over 12 years ago

2012/5/6 zenspider (Ryan Davis) :

This is why I don't run full tests before:

% egrep "= (E|F)" test.ruby.1.txt
TestBug4409#test_bug4409 = 76.40 s = E
TestDRbAry#test_01 = 75.83 s = E
TestDRbAry#test_02_collect = 76.00 s = E
TestDRbAry#test_03_redo = 76.25 s = E
TestDRbAry#test_05_break = 75.55 s = E
TestDRbAry#test_06_next = 76.66 s = E
TestDRbAry#test_07_break_18 = 76.10 s = E
TestGemInstaller#test_dir = 0.04 s = E
TestGemPlatform#test_equals_tilde = 0.01 s = E

I've brought it up on ruby-core before and it's been ignored. It makes running tests slow and full of false-negatives.

Also, currently the tests are completely hung on:

TestPathname#test_pathsubext_506 =

it's probably been 10 minutes now. This one seems like a new problem.

I guess the problem is caused by other test failures as [ruby-core:42831].

If backtrace can be shown, it may be useful to find a culprit.
(I doubt DRb tests.)

Tanaka Akira

Updated by naruse (Yui NARUSE) over 12 years ago

(2012/05/06 6:17), zenspider (Ryan Davis) wrote:

Issue #6405 has been updated by zenspider (Ryan Davis).

How can I run the tests if the tests hang?

make RUBYOPT=-w TESTS='-qv -j3 -x drb' test-all

or as sora_h said in [ruby-core:36693]

make TESTS='-qv rubygems' test-all

--
NARUSE, Yui

Updated by nobu (Nobuyoshi Nakada) over 12 years ago

  • % Done changed from 100 to 0

=begin
Another issue.

/Users/nobu/build/ruby/trunk/src/test/minitest/test_minitest_unit.rb: cannot load such file -- test/minitest/metametameta
=end

Actions #13

Updated by naruse (Yui NARUSE) over 12 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r35563.
Yui, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • lib/minitest/unit.rb (assert_match): replace matcher only if both
    matcher and obj are String. fix r35541. [Bug #6405]
    DON'T COMMIT IF YOU CAN'T RUN TEST.
    FIX AS SOON AS POSSIBLE YOU BREAK TESTS.
    patched by ayumin.
    https://github.com/seattlerb/minitest/pull/124

  • lib/minitest/unit.rb (refute_match): ditto.

Updated by nobu (Nobuyoshi Nakada) over 12 years ago

  • Status changed from Closed to Assigned
  • % Done changed from 100 to 0

r35563 is overwritten.

Updated by nobu (Nobuyoshi Nakada) over 12 years ago

Sorry, r35571.
Why don't you run even the test for the library which you are about to commit?

Updated by zenspider (Ryan Davis) over 12 years ago

  • Status changed from Assigned to Closed

I obviously ran the tests, as stated in my commit:

Imported minitest 3.0.0 (r7435) w/ fixes for rubygems. 10955 tests, 2253343 assertions, 1 failures, 1 errors, 28 skips minus drb tests on x86_64-darwin11.3.0 and reviewed by drbrain

I have no failures in minitest, rubygems, or anything else that wasn't already failing on osx.

Your changes to test/minitest/*.rb are not correct and fail on my side without changing my loadpath to include test/minitest. MRI tests run with -I. as you can see:

./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems "./test/runner.rb" --ruby="./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems" minitest

So my require lines were fine as-is and pass for me in svn's trunk and running on mri_trunk, 1.9.2-p320, 1.8.7-p249, 1.9.3-p194. With your change, my tests fail 100% w/o further changes to the load path:

TOTAL RESULT = 4 failures out of 4
Failed: 1.9.3-p194, mri_trunk, 1.8.7-p249, 1.9.2-p320

The only other require path that is valid would be "minitest/metametameta".

If you have a reproducible issue, please file a NEW ticket and provide proper details.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0