Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Truffle] Issue passing arg in test runner #2963

Closed
bjfish opened this issue May 20, 2015 · 19 comments
Closed

[Truffle] Issue passing arg in test runner #2963

bjfish opened this issue May 20, 2015 · 19 comments
Assignees
Milestone

Comments

@bjfish
Copy link
Contributor

bjfish commented May 20, 2015

I had a hard time to create a minimal case for this but it should be easy to recreate with jt test ruby/test_pipe.rb which gives the following errors here and in a number of other MRI tests. The NilClass argument should be the argument :empty?.

  1) Error:
TestPipe#test_eof_0_rw:
TypeError: Truffle doesn't have a case for the org.jruby.truffle.nodes.core.KernelNodesFactory$RespondToNodeFactory$RespondToNodeGen node with values of type  Array(org.jruby.truffle.runtime.core.RubyArray)[null,0] NilClass(org.jruby.truffle.runtime.core.RubyBasicObject) org.jruby.truffle.runtime.UndefinedPlaceholder
        from /Users/brandonfish/Documents/jruby/test/mri/lib/test/unit/assertions.rb:364:in `assert_respond_to'
        from test/mri/runner.rb:25:in `after_teardown'
        from /Users/brandonfish/Documents/jruby/test/mri/lib/test/unit/testcase.rb:17:in `run'
        from /Users/brandonfish/Documents/jruby/test/mri/lib/test/unit.rb:682:in `block in _run_suites'
        from /Users/brandonfish/Documents/jruby/test/mri/lib/test/unit.rb:680:in `_run_suites'
        from /Users/brandonfish/Documents/jruby/test/mri/lib/test/unit.rb:31:in `run'
        from /Users/brandonfish/Documents/jruby/test/mri/lib/test/unit.rb:799:in `run'
        from /Users/brandonfish/Documents/jruby/test/mri/lib/test/unit.rb:859:in `run'
        from /Users/brandonfish/Documents/jruby/test/mri/lib/test/unit.rb:863:in `run'
        from test/mri/runner.rb:41:in `<main>'

  2) Error:
TestPipe::WithConversion#test_eof_0_rw:
TypeError: Truffle doesn't have a case for the org.jruby.truffle.nodes.core.KernelNodesFactory$RespondToNodeFactory$RespondToNodeGen node with values of type  Array(org.jruby.truffle.runtime.core.RubyArray)[null,0] NilClass(org.jruby.truffle.runtime.core.RubyBasicObject) org.jruby.truffle.runtime.UndefinedPlaceholder
        from /Users/brandonfish/Documents/jruby/test/mri/lib/test/unit/assertions.rb:364:in `assert_respond_to'
        from test/mri/runner.rb:25:in `after_teardown'
        from /Users/brandonfish/Documents/jruby/test/mri/lib/test/unit/testcase.rb:17:in `run'
        from /Users/brandonfish/Documents/jruby/test/mri/lib/test/unit.rb:682:in `block in _run_suites'
        from /Users/brandonfish/Documents/jruby/test/mri/lib/test/unit.rb:680:in `_run_suites'
        from /Users/brandonfish/Documents/jruby/test/mri/lib/test/unit.rb:31:in `run'
        from /Users/brandonfish/Documents/jruby/test/mri/lib/test/unit.rb:799:in `run'
        from /Users/brandonfish/Documents/jruby/test/mri/lib/test/unit.rb:859:in `run'
        from /Users/brandonfish/Documents/jruby/test/mri/lib/test/unit.rb:863:in `run'
        from test/mri/runner.rb:41:in `<main>'

@eregon
Copy link
Member

eregon commented May 20, 2015

Yeah I noticed it recently as well on all mri tests I tried.
I think doing a bisect here could help to know what went wrong.

@bjfish
Copy link
Contributor Author

bjfish commented May 20, 2015

@eregon @chrisseaton It looks like it started happening at this commit:
79eee3f

Or one of the related commits:
7b90b2f
1714c0b
f262415

The commit previous to these looked green.

All the MRI tests started to fail:
https://travis-ci.org/jruby/jruby/jobs/63194822

@eregon
Copy link
Member

eregon commented May 21, 2015

Thanks for looking into it! I'll assign Chris then.

@bjfish
Copy link
Contributor Author

bjfish commented May 21, 2015

It looks like there is another new separate issue when jt test mri is run which results in the following error:

$ jt test mri
core:/core/rubinius/common/type.rb:62:in `coerce_to_failed': Coercion error: nil.to_str => String failed (TypeError)
    from core:/core/rubinius/common/type.rb:52:in `execute_coerce_to'
    from core:/core/rubinius/common/type.rb:45:in `coerce_to'
    from core:/core/rubinius/common/kernel.rb:155:in `StringValue'
    from core:/core/rubinius/common/type.rb:419:in `coerce_to_path'
    from core:/core/rubinius/common/file.rb:381:in `dirname'
    from /Users/brandonfish/Documents/jruby/test/mri/ruby/envutil.rb:558:in `RbConfig'
    from /Users/brandonfish/Documents/jruby/test/mri/ruby/envutil.rb:552:in `<main>'
    from test/mri/runner.rb:8:in `<main>'

This was the first build with this error: https://travis-ci.org/jruby/jruby/builds/63422709

So it is probably one of the following commits for the new issue:
7a9d17c
f25eec8
af92b09
ded007d
a27a469

@chrisseaton
Copy link
Contributor

jt test ruby/test_pipe.rb works for me at the moment - but with 0 files, 0 examples, 0 expectations, 0 failures, 0 errors, 0 tagged - can you confirm or close?

@eregon
Copy link
Member

eregon commented May 24, 2015

This is due to a change of jt to run specs by default. Try with the full path to the test.

@eregon
Copy link
Member

eregon commented May 24, 2015

(Or jt test mri ...)

@chrisseaton
Copy link
Contributor

I see it now.

@chrisseaton
Copy link
Contributor

This stack trace makes no sense to me: we're on a line with a call to assert_empty and then we're in assert_respond_to. Does anyone understand the logic here?

        from /Users/chrisseaton/Documents/ruby/jruby/test/mri/lib/test/unit/assertions.rb:362:in `assert_respond_to'
        from test/mri/runner.rb:25:in `after_teardown'

@bjfish
Copy link
Contributor Author

bjfish commented May 24, 2015

@chrisseaton It looks like the stack trace is missing a line, it should probably look like this:

       from /Users/chrisseaton/Documents/ruby/jruby/test/mri/lib/test/unit/assertions.rb:362:in `assert_respond_to'
       from test/mri/lib/minitest/unit.rb:216:in `assert_empty' 
       from test/mri/runner.rb:25:in `after_teardown'

@chrisseaton
Copy link
Contributor

Test case:

class A
  def foo(a, b, c)
    p [a, b, c]
  end
end

class B < A
  def foo(a, (b, c), d = nil)
    super
  end
end

B.new.foo(:a, :b)

@chrisseaton
Copy link
Contributor

This broke when I fixed other things that were more badly broken in super calls.

@bjfish
Copy link
Contributor Author

bjfish commented May 24, 2015

@chrisseaton Yes, i think it's one of the four commits mentioned here based on what I saw in travis: #2963 (comment)

@chrisseaton
Copy link
Contributor

Yeah but I mean the fix won't be found by looking at those commits - but I think I know how to fix it now.

@chrisseaton
Copy link
Contributor

Fixed in 209bc65

@chrisseaton chrisseaton added this to the truffle-dev milestone May 24, 2015
@bjfish
Copy link
Contributor Author

bjfish commented May 25, 2015

There is a little regression in the mri tests.

  1) Failure:
TestSuper#test_array2 [ from /Users/brandonfish/Documents/jruby/test/mri/ruby/test_super.rb:88]:
Failed assertion, no message given.

  2) Failure:
TestSuper#test_array3 [ from /Users/brandonfish/Documents/jruby/test/mri/ruby/test_super.rb:92]:
Failed assertion, no message given.

  3) Failure:
TestSuper#test_array4 [ from /Users/brandonfish/Documents/jruby/test/mri/ruby/test_super.rb:96]:
Failed assertion, no message given.

  4) Error:
TestSuper#test_double2:
ArgumentError: wrong number of arguments (1 for 2)
    /Users/brandonfish/Documents/jruby/test/mri/ruby/test_super.rb:7:in `double': wrong number of arguments (1 for 2) (ArgumentError)
        from /Users/brandonfish/Documents/jruby/test/mri/ruby/test_super.rb:22:in `double'
        from /Users/brandonfish/Documents/jruby/test/mri/ruby/test_super.rb:77:in `test_double2'
        from /Users/brandonfish/Documents/jruby/test/mri/lib/test/unit.rb:888:in `run_test'

@chrisseaton
Copy link
Contributor

We've got a few failing super specs in RubySpec as well - unless they are blocking something I wasn't going to prioritise them now (even if they were working before).

@bjfish
Copy link
Contributor Author

bjfish commented May 26, 2015

@eregon @chrisseaton @nirvdrum I'll mention regressions in MRI tests if I see them just for informational purposes. Feel free to fix them or not.

@eregon
Copy link
Member

eregon commented Jul 22, 2015

Regressions fixed in 911a6f0 (and parents).
Will merge after the release.

@enebo enebo added this to the Non-Release milestone Dec 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants