[ruby-core:90719] [Ruby trunk Bug#15466] test_self_install_permissions tests fail when compiled with --program-suffix

From: john@...
Date: 2018-12-25 20:01:57 UTC
List: ruby-core #90719
Issue #15466 has been reported by johnl (John Leach).

----------------------------------------
Bug #15466: test_self_install_permissions tests fail when compiled with --program-suffix
https://bugs.ruby-lang.org/issues/15466

* Author: johnl (John Leach)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-linux]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
compiling ruby 2.6.0p0 with --program-suffix=2.6 causes 3 tests to fail:

~~~
  1) Error:
TestGem#test_self_install_permissions_umask_077:
Errno::ENOENT: No such file or directory @ rb_file_s_stat - bin/foo.cmd2.6
    test/rubygems/test_gem.rb:196:in `stat'
    test/rubygems/test_gem.rb:196:in `block (2 levels) in assert_self_install_permissions'
    test/rubygems/test_gem.rb:195:in `each_key'
    test/rubygems/test_gem.rb:195:in `block in assert_self_install_permissions'
    test/rubygems/test_gem.rb:194:in `chdir'
    test/rubygems/test_gem.rb:194:in `assert_self_install_permissions'
    test/rubygems/test_gem.rb:148:in `test_self_install_permissions_umask_077'

  2) Error:
TestGem#test_self_install_permissions_umask_0:
Errno::ENOENT: No such file or directory @ rb_file_s_stat - bin/foo.cmd2.6
    test/rubygems/test_gem.rb:196:in `stat'
    test/rubygems/test_gem.rb:196:in `block (2 levels) in assert_self_install_permissions'
    test/rubygems/test_gem.rb:195:in `each_key'
    test/rubygems/test_gem.rb:195:in `block in assert_self_install_permissions'
    test/rubygems/test_gem.rb:194:in `chdir'
    test/rubygems/test_gem.rb:194:in `assert_self_install_permissions'
    test/rubygems/test_gem.rb:141:in `test_self_install_permissions_umask_0'

  3) Error:
TestGem#test_self_install_permissions:
Errno::ENOENT: No such file or directory @ rb_file_s_stat - bin/foo.cmd2.6
    test/rubygems/test_gem.rb:196:in `stat'
    test/rubygems/test_gem.rb:196:in `block (2 levels) in assert_self_install_permissions'
    test/rubygems/test_gem.rb:195:in `each_key'
    test/rubygems/test_gem.rb:195:in `block in assert_self_install_permissions'
    test/rubygems/test_gem.rb:194:in `chdir'
    test/rubygems/test_gem.rb:194:in `assert_self_install_permissions'
    test/rubygems/test_gem.rb:136:in `test_self_install_permissions'
~~~

the installed file is actually called bin/foo.cmd on disk, so is missing the expected prefix.

These tests were changed to test for this 9 days ago: https://github.com/rubygems/rubygems/pull/2529

My understanding is that rubygems only adds the suffix to gem commands if you explicitly use the --format-executable option.

So I'm not sure whether the tests are broken or the actual behaviour is broken.





-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next