https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112018-03-23T09:11:57ZRuby Issue Tracking SystemRuby master - Bug #14626: One failing test on trunk 58fbe69a5b and OSXhttps://bugs.ruby-lang.org/issues/14626?journal_id=711702018-03-23T09:11:57ZBenoit_Tigeot (Benoit Tigeot)
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/71170/diff?detail_id=48745">diff</a>)</li></ul> Ruby master - Bug #14626: One failing test on trunk 58fbe69a5b and OSXhttps://bugs.ruby-lang.org/issues/14626?journal_id=711712018-03-23T09:12:13ZBenoit_Tigeot (Benoit Tigeot)
<ul></ul><p>I will follow this guide <a href="http://engineering.appfolio.com/appfolio-engineering/2016/6/7/git-bisect-to-find-a-ruby-regression" class="external">http://engineering.appfolio.com/appfolio-engineering/2016/6/7/git-bisect-to-find-a-ruby-regression</a></p> Ruby master - Bug #14626: One failing test on trunk 58fbe69a5b and OSXhttps://bugs.ruby-lang.org/issues/14626?journal_id=711902018-03-24T15:27:48ZMSP-Greg (Greg L)
<ul></ul><blockquote>
<p>but do I need to run</p>
</blockquote>
<p>Most build systems do perform <code>configure</code>, <code>make</code>, and <code>make install</code> before testing.</p>
<p>If you want to run tests on an existing build, you can run something like the following (when in the test folder):</p>
<pre><code>ruby runner.rb --show-skip -I./lib rubygems
ruby runner.rb --show-skip -I./lib rubygems/test_require.rb
</code></pre>
<p>Re your particular issue, it's odd, as this test is passing in many other builds, but as I recall (I'm a windows guy), MacOS uses clang(?)</p>
<p>Anyway, the assert immediately before your failure is requiring the file defining the HELLO constant, and it's not generating a failure. So, either a different file is being loaded (unlikely), or your build isn't parsing the file generated by the following:</p>
<pre><code>File.open(c_rb, 'w') { |f| f.write "class Object; HELLO = 'world' end" }
</code></pre>
<p>You might try using that statement with an appropriate filename, require the file, and see if the constant exists. Then again, I keep thinking something is really strange, or, I'm missing something. There have been changes that involve parsing, maybe the string needs a "\n" at the end? Just a wild guess...</p>
<p>Greg</p> Ruby master - Bug #14626: One failing test on trunk 58fbe69a5b and OSXhttps://bugs.ruby-lang.org/issues/14626?journal_id=712182018-03-26T07:56:58ZBenoit_Tigeot (Benoit Tigeot)
<ul></ul><p>Thanks a lot for the help.</p>
<p>Localy I have this setup <a href="https://github.com/ko1/rubyhackchallenge/blob/master/EN/2_mri_structure.md#assumptions" class="external">https://github.com/ko1/rubyhackchallenge/blob/master/EN/2_mri_structure.md#assumptions</a></p>
<pre><code>
code/
ruby/ <- git cloned directory
build/ <- build directory (*.o files and other compilation artifacts are stored here)
install/ <- install directory (workdir/install/bin/ruby is the installed binary)
</code></pre>
<p>The naive command I run is<br>
<code>cd ~/code/ruby && autoconf && cd ~/code/build && ../ruby/configure --prefix=$PWD/../install --enable-shared --with-openssl-dir="$(brew --prefix openssl)" --with-readline-dir="$(brew --prefix readline)" --disable-libedit && make -j && make install-nodoc && clear; make test-all TESTS='rubygems/test_require.rb'</code></p>
<p>The failing test appears between ruby version v2_2_9 and v2_3_0 when this tests was introduced. I will stop bisecting and instead ask rubygems team. :)</p>
<p><a href="https://github.com/rubygems/rubygems/issues/2251" class="external">https://github.com/rubygems/rubygems/issues/2251</a></p> Ruby master - Bug #14626: One failing test on trunk 58fbe69a5b and OSXhttps://bugs.ruby-lang.org/issues/14626?journal_id=712192018-03-26T10:22:41Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Assigned</i></li><li><strong>Assignee</strong> set to <i>ko1 (Koichi Sasada)</i></li></ul><p>I couldn't reproduce with <code>make -C build_dir test-all TESTS="rubygems/test_require.rb"</code></p>
<pre><code>~/D/g/r/ruby (trunk) > mk test-all TESTS="rubygems/test_require.rb"
make: Entering directory '/Users/hsbt/Documents/github.com/ruby/ruby/.x86_64-darwin'
Run options: "--ruby=./miniruby -I../lib -I. -I.ext/common ../tool/runruby.rb --extout=.ext -- --disable-gems" --excludes-dir=../test/excludes --name=!/memory_leak/
# Running tests:
Finished tests in 0.784839s, 26.7571 tests/s, 114.6732 assertions/s.
21 tests, 90 assertions, 0 failures, 0 errors, 1 skips
ruby -v: ruby 2.6.0dev (2018-03-26 trunk 62923) [x86_64-darwin17]
make: Leaving directory '/Users/hsbt/Documents/github.com/ruby/ruby/.x86_64-darwin'
</code></pre> Ruby master - Bug #14626: One failing test on trunk 58fbe69a5b and OSXhttps://bugs.ruby-lang.org/issues/14626?journal_id=712242018-03-26T12:53:38ZMSP-Greg (Greg L)
<ul></ul><p>Benoit_Tigeot (Benoit Tigeot) wrote:</p>
<blockquote>
<p>The failing test appears between ruby version v2_2_9 and v2_3_0 when this tests was introduced.</p>
</blockquote>
<p>Thanks for rechecking. On Windows, using <code>ruby 2.3.7p407 (2018-02-01 revision 62148) [x64-mingw32]</code>, I ran the file using the current trunk test suite (commented out MJIT statements), and the test passed.</p>
<blockquote>
<p>I will stop bisecting and instead ask rubygems team. :)</p>
</blockquote>
<p>Re my previous post, part of what I was trying to point out is that a failed test may not necessarily show a bug in the code it was designed to test. It may, sometimes just by chance, show a bug in methods unrelated to the test's purpose.</p>
<p>Regardless, since I can't repo, I can't help any further. Hopefully, someone else can repo it or you can provide more information clarifying the cause.</p>
<p>Greg</p> Ruby master - Bug #14626: One failing test on trunk 58fbe69a5b and OSXhttps://bugs.ruby-lang.org/issues/14626?journal_id=820052019-10-13T17:03:26Zjeremyevans0 (Jeremy Evans)merch-redmine@jeremyevans.net
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li></ul>