Bug #10643
closed2.2: TestRubyOptions#test_command_line_progname_nonascii test failure (MinGW)
Description
Hello,
Running tests against ruby_2_2 branch, the following failures were detected (mingw-w64 4.7.2 32bits, GCC 4.7.2, Windows 7 x64):
TestRubyOptions#test_command_line_progname_nonascii [C:/Users/Luis/Code/ruby/ruby/test/ruby/test_rubyoptions.rb:719]:
[ruby-dev:48752] [Bug #10555].
<["?.rb"]> expected but was
<[]>.
---
<[]> expected but was
<["C:\\Users\\Luis\\Code\\oneclick\\rubyinstaller\\sandbox\\ruby21_build\\ruby.exe: Invalid argument -- ?.rb (LoadError)"]>.
Files
Updated by luislavena (Luis Lavena) almost 10 years ago
Forgot to add, in this test codepage is 1252.
Updated by naruse (Yui NARUSE) almost 10 years ago
- Assignee changed from naruse (Yui NARUSE) to nobu (Nobuyoshi Nakada)
- Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN to 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
Updated by naruse (Yui NARUSE) almost 10 years ago
- Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN to 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: REQUIRED
Updated by nobu (Nobuyoshi Nakada) almost 10 years ago
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
Applied in changeset r49091.
test_rubyoptions.rb: locale name
- test/ruby/test_rubyoptions.rb: try locale encoding name.
[ruby-core:67109] [Bug #10643]
Updated by luislavena (Luis Lavena) almost 10 years ago
- Status changed from Closed to Assigned
Hello Nobu,
Just tested trunk, this is still happening:
TestRubyOptions#test_command_line_progname_nonascii [C:/Users/Luis/Code/ruby/ruby/test/ruby/test_rubyoptions.rb:726]:
[ruby-dev:48752] [Bug #10555].
<[" .rb"]> expected but was
<[]>.
---
<[]> expected but was
<["C:\\Users\\Luis\\Code\\oneclick\\rubyinstaller\\sandbox\\ruby22_build\\ruby.exe: No such file or directory -- .rb (LoadError)"]>.
ruby -v: ruby 2.3.0dev (2015-01-02) [i386-mingw32]
Updated by naruse (Yui NARUSE) almost 7 years ago
- Target version deleted (
2.2.0)
Updated by MSP-Greg (Greg L) almost 7 years ago
Just checked TestRubyOptions#test_command_line_progname_nonascii
with three recent builds:
Passed:
ruby 2.6.0dev (2018-01-08 trunk 61671) [x64-mingw32]
ruby 2.5.0p0 (2017-12-25 revision 61468) [x64-mingw32]
Failed:
ruby 2.4.3p205 (2017-12-14 revision 61247) [x64-mingw32]
Thanks, Greg
Updated by nagachika (Tomoyuki Chikanaga) almost 7 years ago
- Status changed from Assigned to Closed
- Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: REQUIRED to 2.4: REQUIRED, 2.5: DONTNEED
Thank you MSP-Greg,
So the issue was fixed on trunk during 2.5.0 development.
I have to find which revisions fixed this failure.
I roughly seek related revisions and found r58767.
But I don't have environment to confirm the result.
I have confirmed the patch from r58767 can be cleanly applied into ruby_2_4.
Could you check if the following patch fixes the test failure?
https://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ruby.c?r1=58767&r2=58766&pathrev=58767&view=patch
Best Regard,
Updated by MSP-Greg (Greg L) almost 7 years ago
@nagachika (Tomoyuki Chikanaga),
Sorry for not reporting more. I think this issue was fixed sometime around 01-June, but I'm not totally sure, which was why I thought I'd look into it further.
Here's what I found from my saved builds:
TestRubyOptions#test_command_line_progname_nonascii
Bad
ruby 2.5.0dev (2017-04-02 trunk 58232) [x64-mingw32]
ruby 2.5.0dev (2017-04-30 trunk 58514) [x64-mingw32]
ruby 2.5.0dev (2017-05-27 trunk 58926) [x64-mingw32]
Passed
ruby 2.5.0dev (2017-06-01 trunk 58985) [x64-mingw32]
ruby 2.5.0dev (2017-06-08 trunk 59041) [x64-mingw32]
ruby 2.5.0dev (2017-06-14 trunk 59096) [x64-mingw32]
ruby 2.5.0dev (2017-06-30 trunk 59213) [x64-mingw32]
This was before I started rolling ruby-loco builds, and I did all the builds locally. It wasn't in a git repo, so I don't know if the passing builds were due to my patching around the test method. I suspect not. I think @nobu (Nobuyoshi Nakada) was responsible for many (or all) of the encoding related fixes...
Thanks, Greg
Updated by MSP-Greg (Greg L) almost 7 years ago
@nagachika (Tomoyuki Chikanaga)
First of all, I'd like to apologize for the above, as it is incorrect. I revisited this (ruby-loco 'broke' due to the renaming of configure.in to configure.ac), and the commit that fixed the failure was 59040 aac0b43 (by @nobu (Nobuyoshi Nakada)). I tried to apply it to ruby_2_4, but could not do so, as there was an issue in dir.c. Also, I believe 59061 ff5e3b9 moves some of the code.
Not being fluent in c, I'd probably stumble around for quite a while trying to determine what additional previous commits would need to be in place for 59040 to work with ruby_2_4.
Question - Ruby 2.4 - AFAIK, no one has shown test-all results for '2.4.x' or the stable branch. Would that be helpful in terms of determining what to backport? The last time I ran 2.4 (2_4.2 p173 2017-08-05), there were six failures.
Thanks, Greg
Updated by nagachika (Tomoyuki Chikanaga) almost 7 years ago
Hello, Grep
Thank you very much for your investigation!
I confirmed that the revision r59040 was depend on some other changesets, and it isn't clear that it can be backported without unexpected behavior change.
Anyway please show up the error message of test_command_line_progname_nonascii on ruby_2_4.
We don't know exactly what was happened there.
Updated by MSP-Greg (Greg L) almost 7 years ago
Hello,
Below are the two failures for test_rubyoptions.rb
, using ruby 2.4.4p228 (2018-01-15 revision 61854) [x64-mingw32]
and test_rubyoptions.rb
at the same commit:
# Note - Two skips for 'platform dependent feature'
3) Failure:
TestRubyOptions#test_search [E:/GitHub/ruby-loco/src/ruby/test/ruby/test_rubyoptions.rb:300]:
1. [1/2] Assertion for "stdout"
| <["1"]> expected but was
| <[]>.
4) Failure:
TestRubyOptions#test_command_line_progname_nonascii [E:/GitHub/ruby-loco/src/ruby/test/ruby/test_rubyoptions.rb:754]:
[ruby-dev:48752] [Bug #10555].
1. [1/2] Assertion for "stdout"
| <["\xFF.rb"]> expected but was
| <[]>.
2. [2/2] Assertion for "stderr"
| <[]> expected but was
| <["E:\\GitHub\\ruby-loco\\src\\build24_64\\ruby.exe: No such file or directory -- .rb (LoadError)"]>.
55 tests, 686 assertions, 2 failures, 0 errors, 2 skips
Using test_ruby_options.rb
from the repo checked out at 2018-01-16 61858 03bbc4ed5, both trunk have no failures/errors, and two matching skips as above.
I've attached the results of test_ruby_options.rb
using ruby 2.4.4p228 (2018-01-15 revision 61854) [x64-mingw32]
. Summary is:
58 tests, 689 assertions, 9 failures, 2 errors, 2 skips
Some of these appear to be frozen string related, some encoding, and some may be ruby options that exist in 2.4.x, but additional tests were added in trunk.
If you'd like me to find commits related to any of these, please let me know.
Thanks, Greg