[Rubygems-developers] Test failures for 0.9.4.4 beta on Windows

Daniel Berger djberg96 at gmail.com
Thu Sep 20 07:49:45 EDT 2007


Eric Hodel wrote:
> On Aug 31, 2007, at 07:27, Berger, Daniel wrote:

<snip>

>> Please see:
>>
>> http://rubyforge.org/tracker/index.php? 
>> func=detail&aid=13528&group_id=12
>> 6&atid=577
>> http://rubyforge.org/tracker/index.php? 
>> func=detail&aid=13529&group_id=12
>> 6&atid=577
>> http://rubyforge.org/tracker/index.php? 
>> func=detail&aid=13533&group_id=12
>> 6&atid=577
>> http://rubyforge.org/tracker/index.php? 
>> func=detail&aid=13535&group_id=12
>> 6&atid=577
>> http://rubyforge.org/tracker/index.php? 
>> func=detail&aid=13537&group_id=12
>> 6&atid=577
> 
> All applied!

Excellent! Eric and I worked on this last night a bit and we're down to 
two errors.

>> Here are the remaining issues:
>>
>>   1) Error:
>> test_execute(TestGemCommandsPristineCommand):
>> SecurityError: Insecure operation - initialize
>>     ./lib/rubygems/installer.rb:272:in `initialize'
>>     ./lib/rubygems/installer.rb:272:in `open'
>>     ./lib/rubygems/installer.rb:272:in `shebang'
>>     ./lib/rubygems/installer.rb:290:in `app_script_text'
>>     ./lib/rubygems/installer.rb:229:in `generate_bin_script'
>>     ./lib/rubygems/installer.rb:228:in `open'
>>     ./lib/rubygems/installer.rb:228:in `generate_bin_script'
>>     ./lib/rubygems/installer.rb:241:in `generate_bin_symlink'
>>     ./lib/rubygems/installer.rb:215:in `generate_bin'
>>     ./lib/rubygems/installer.rb:206:in `each'
>>     ./lib/rubygems/installer.rb:206:in `generate_bin'
>>     ./lib/rubygems/installer.rb:112:in `install'
>>     ./test/gemutilities.rb:117:in `install_gem'
>>     ./test/test_gem_commands_pristine_command.rb:19:in `test_execute'
>>
>> I may have introduced this bug in my attempt to fix the filehandle
>> closing issue in patch #13533. I haven't investigated further.
> 
> Not sure, I'm not getting the SecurityError with your patches.

This one is gone now.

> 
>>   2) Failure:
>> test_download_gem_local_read_only(TestGemDependencyInstaller)
>> [./test/test_gem_dependency_installer.rb:356]:
>> <"C:/WINNT/temp/test_rubygems_2032/a-1.gem"> expected but was
>> <"C:/WINNT/temp/test_rubygems_2032/gemhome/cache/a-1.gem">.
>>
>> I'm not sure if the patch is bad or the test is bad. See my comment in
>> patch #13537.
> 
> This test uses chmod which doesn't do anything on mswin.

This one is also gone.

>>   3) Error:
>> test_generate_index(TestGemIndexerIndexer):
>> Zlib::BufError: buffer error
>>     ./lib/rubygems/indexer/compressor.rb:22:in `inflate'
>>     ./lib/rubygems/indexer/compressor.rb:22:in `unzip'
>>     ./lib/rubygems/indexer/master_index_builder.rb:38:in `paranoid'
>>     ./lib/rubygems/indexer/master_index_builder.rb:20:in `cleanup'
>>     ./lib/rubygems/indexer/abstract_index_builder.rb:42:in `build'
>>     ./lib/rubygems/indexer/indexer.rb:34:in `build_index'
>>     ./lib/rubygems/indexer/indexer.rb:91:in `generate_index'
>>     ./test/test_gem_indexer_indexer.rb:34:in `test_generate_index'
>>     ./lib/rubygems/user_interaction.rb:45:in `use_ui'
>>     ./lib/rubygems/user_interaction.rb:27:in `use_ui'
>>     ./test/test_gem_indexer_indexer.rb:33:in `test_generate_index'
>>
>> No clue. Will require diving into some ugly C code with a wet suit  
>> and a
>> spear gun.
> 
> Is this repeatable?  I had one of these go by once in the last day.

Eric smoked out the problem in 
lib/rubygems/indexer/master_index_builder.rb - we needed a binary read. 
Yay, Eric!

>>   4) Failure:
>> test_self_match_version(TestGemPlatform)
>> [./test/test_gem_platform.rb:74]:
>> versionless == any.
>> <false> is not true.
>>
>> This failure is caused by changing the architecture in patch  
>> #13529, but
>> the lack of a release number in Config::CONFIG['arch'] for MS Windows
>> made me unsure how the tests should be refactored.

Also fixed.

We're down to these two, which both appear to be caused by an old stub 
(I think):

   1) Failure:
test_class_build(TestGemExtRakeBuilder) 
[./test/test_gem_ext_rake_builder.rb:41]:
<["ruby mkrf_conf.rb",
  "",
  "rake 
RUBYARCHDIR=C:/DOCUME~1/djberge/LOCALS~1/Temp/test_rubygems_3360/prefix 
RUBYLIBDIR=C:/DOCUME~1/djberge/LOCALS~1/T
emp/test_rubygems_3360/prefix",
  "(in C:/DOCUME~1/djberge/LOCALS~1/Temp/test_rubygems_3360/ext)\n"]> 
expected but was
<["ruby mkrf_conf.rb",
  "",
  "rake 
RUBYARCHDIR=C:/DOCUME~1/djberge/LOCALS~1/Temp/test_rubygems_3360/prefix 
RUBYLIBDIR=C:/DOCUME~1/djberge/LOCALS~1/T
emp/test_rubygems_3360/prefix",
  "(in 
C:/DOCUME~1/djberge/LOCALS~1/Temp/test_rubygems_3360/ext)\nC:0:Warning: 
require_gem is obsolete.  Use gem instead.
\n"]>.

   2) Failure:
test_class_build_fail(TestGemExtRakeBuilder) 
[./test/test_gem_ext_rake_builder.rb:55]:
<Gem::InstallError> exception expected but none was thrown.

452 tests, 1569 assertions, 2 failures, 0 errors
rake aborted!
Command failed with status (1): [C:/ruby/bin/ruby -w -Ilib 
"C:/ruby/lib/rub...]

Attempts to clean it with 'gem pristine --all' or 'gem pristine rake' 
didn't work, and Eric is working on that now I believe.

Regards,

Dan


More information about the Rubygems-developers mailing list