Bug #5370

[psych] test_yamldbm.rb failures/warnings on Win7/Arch

Added by Jon Forums almost 4 years ago. Updated almost 4 years ago.

[ruby-core:39730]
Status:Closed
Priority:Normal
Assignee:Aaron Patterson
ruby -v:ruby 1.9.4dev (2011-09-26 trunk 33339) [i386-mingw32] Backport:

Description

After building trunk@33339 on 32bit Win7 and Arch and running make test-all TESTS=psych I get the following.

Win7 Notes:
* using RubyInstaller build recipes
* using prebuilt GDBM v1.8.3-1 from http://sourceforge.net/projects/gnuwin32/files/gdbm/1.8.3-1/
* test build temp db files named like 'yamldbm.tmp.2948.{dir,pag} not '*.db' file as in *nix. Updating YAMLDBMTest#teardown on
Win7 to unlink both temp files did not affect the failures.

Arch Results

...
BDB3028 yamldbm.tmp.17034.db: unable to flush: No such file or directory
[ SNIP (13) more of the above messages]
...
431 tests, 1189 assertions, 0 failures, 0 errors, 0 skips

[jon@archee build]$ ruby -rdbm -v -e 'puts DBM::VERSION'
ruby 1.9.4dev (2011-09-26 trunk 33330) [i686-Linux]
Berkeley DB 5.2.28: (June 10, 2011)

Win7 Results

...
1) Error:
test_fetch(Psych::YAMLDBMTest):
Errno::EACCES: Permission denied - yamldbm.tmp.2948
c:/Users/Jon/Documents/RubyDev/ruby-git/test/psych/test_yamldbm.rb:11:in initialize'
c:/Users/Jon/Documents/RubyDev/ruby-git/test/psych/test_yamldbm.rb:11:in
new'
c:/Users/Jon/Documents/RubyDev/ruby-git/test/psych/test_yamldbm.rb:11:in `setup'

2) Error:
test_has_value?(Psych::YAMLDBMTest):
Errno::EACCES: Permission denied - yamldbm.tmp.2948
c:/Users/Jon/Documents/RubyDev/ruby-git/test/psych/test_yamldbm.rb:11:in initialize'
c:/Users/Jon/Documents/RubyDev/ruby-git/test/psych/test_yamldbm.rb:11:in
new'
c:/Users/Jon/Documents/RubyDev/ruby-git/test/psych/test_yamldbm.rb:11:in `setup'

3) Error:
test_invert(Psych::YAMLDBMTest):
Errno::EACCES: Permission denied - yamldbm.tmp.2948
c:/Users/Jon/Documents/RubyDev/ruby-git/test/psych/test_yamldbm.rb:11:in initialize'
c:/Users/Jon/Documents/RubyDev/ruby-git/test/psych/test_yamldbm.rb:11:in
new'
c:/Users/Jon/Documents/RubyDev/ruby-git/test/psych/test_yamldbm.rb:11:in `setup'

4) Error:
test_key(Psych::YAMLDBMTest):
Errno::EACCES: Permission denied - yamldbm.tmp.2948
c:/Users/Jon/Documents/RubyDev/ruby-git/test/psych/test_yamldbm.rb:11:in initialize'
c:/Users/Jon/Documents/RubyDev/ruby-git/test/psych/test_yamldbm.rb:11:in
new'
c:/Users/Jon/Documents/RubyDev/ruby-git/test/psych/test_yamldbm.rb:11:in `setup'

5) Error:
test_reject(Psych::YAMLDBMTest):
Errno::EACCES: Permission denied - yamldbm.tmp.2948
c:/Users/Jon/Documents/RubyDev/ruby-git/test/psych/test_yamldbm.rb:11:in initialize'
c:/Users/Jon/Documents/RubyDev/ruby-git/test/psych/test_yamldbm.rb:11:in
new'
c:/Users/Jon/Documents/RubyDev/ruby-git/test/psych/test_yamldbm.rb:11:in `setup'

6) Error:
test_replace(Psych::YAMLDBMTest):
Errno::EACCES: Permission denied - yamldbm.tmp.2948
c:/Users/Jon/Documents/RubyDev/ruby-git/test/psych/test_yamldbm.rb:11:in initialize'
c:/Users/Jon/Documents/RubyDev/ruby-git/test/psych/test_yamldbm.rb:11:in
new'
c:/Users/Jon/Documents/RubyDev/ruby-git/test/psych/test_yamldbm.rb:11:in `setup'

7) Error:
test_shift(Psych::YAMLDBMTest):
Errno::EACCES: Permission denied - yamldbm.tmp.2948
c:/Users/Jon/Documents/RubyDev/ruby-git/test/psych/test_yamldbm.rb:11:in initialize'
c:/Users/Jon/Documents/RubyDev/ruby-git/test/psych/test_yamldbm.rb:11:in
new'
c:/Users/Jon/Documents/RubyDev/ruby-git/test/psych/test_yamldbm.rb:11:in `setup'

8) Error:
test_store(Psych::YAMLDBMTest):
Errno::EACCES: Permission denied - yamldbm.tmp.2948
c:/Users/Jon/Documents/RubyDev/ruby-git/test/psych/test_yamldbm.rb:11:in initialize'
c:/Users/Jon/Documents/RubyDev/ruby-git/test/psych/test_yamldbm.rb:11:in
new'
c:/Users/Jon/Documents/RubyDev/ruby-git/test/psych/test_yamldbm.rb:11:in `setup'

9) Error:
test_store_using_carret(Psych::YAMLDBMTest):
Errno::EACCES: Permission denied - yamldbm.tmp.2948
c:/Users/Jon/Documents/RubyDev/ruby-git/test/psych/test_yamldbm.rb:11:in initialize'
c:/Users/Jon/Documents/RubyDev/ruby-git/test/psych/test_yamldbm.rb:11:in
new'
c:/Users/Jon/Documents/RubyDev/ruby-git/test/psych/test_yamldbm.rb:11:in `setup'

10) Error:
test_to_a(Psych::YAMLDBMTest):
Errno::EACCES: Permission denied - yamldbm.tmp.2948
c:/Users/Jon/Documents/RubyDev/ruby-git/test/psych/test_yamldbm.rb:11:in initialize'
c:/Users/Jon/Documents/RubyDev/ruby-git/test/psych/test_yamldbm.rb:11:in
new'
c:/Users/Jon/Documents/RubyDev/ruby-git/test/psych/test_yamldbm.rb:11:in `setup'

11) Error:
test_to_hash(Psych::YAMLDBMTest):
Errno::EACCES: Permission denied - yamldbm.tmp.2948
c:/Users/Jon/Documents/RubyDev/ruby-git/test/psych/test_yamldbm.rb:11:in initialize'
c:/Users/Jon/Documents/RubyDev/ruby-git/test/psych/test_yamldbm.rb:11:in
new'
c:/Users/Jon/Documents/RubyDev/ruby-git/test/psych/test_yamldbm.rb:11:in `setup'

12) Error:
test_update(Psych::YAMLDBMTest):
Errno::EACCES: Permission denied - yamldbm.tmp.2948
c:/Users/Jon/Documents/RubyDev/ruby-git/test/psych/test_yamldbm.rb:11:in initialize'
c:/Users/Jon/Documents/RubyDev/ruby-git/test/psych/test_yamldbm.rb:11:in
new'
c:/Users/Jon/Documents/RubyDev/ruby-git/test/psych/test_yamldbm.rb:11:in `setup'

431 tests, 1157 assertions, 0 failures, 12 errors, 0 skips

sh-3.1$ ruby -rdbm -v -e 'puts DBM::VERSION'
ruby 1.9.4dev (2011-09-26 trunk 33339) [i386-mingw32]
unknown

sh-3.1$ irb -rdbm
irb(main):001:0> db = DBM.open('my_testdb')
=> #DBM:0x1f7e260
irb(main):002:0> db['happy'] = 'no'
=> "no"
irb(main):003:0> puts db['happy']
no
=> nil
irb(main):004:0> db.close
=> nil
irb(main):005:0> db.closed?
=> true
irb(main):006:0> db.inspect
=> "#DBM:0x1f7e260"
irb(main):007:0> RUBY_DESCRIPTION
=> "ruby 1.9.4dev (2011-09-26 trunk 33339) [i386-mingw32]"

Associated revisions

Revision 33340
Added by Ayumu AIZAWA almost 4 years ago

  • test/psych/test_yamldbm.rb (require): fix #setup and #terdown. [Bug #5370]
  • test/syck/test_yamldbm.rb (require): ditto.

Revision 33340
Added by Ayumu AIZAWA almost 4 years ago

  • test/psych/test_yamldbm.rb (require): fix #setup and #terdown. [Bug #5370]
  • test/syck/test_yamldbm.rb (require): ditto.

History

#1 Updated by Jon Forums almost 4 years ago

Another Win7 snippet indicating it could be a test code/setup specific problem:

C:\Users\Jon\Documents>ripl

RUBY_DESCRIPTION
=> "ruby 1.9.4dev (2011-09-26 trunk 33339) [i386-mingw32]"
require 'psych'
=> true
require 'yaml'
=> true
YAML::ENGINE.yamler
=> "psych"
require 'yaml/dbm'
=> true
db = YAML::DBM.new('my_testdb')
=> #Psych::DBM:0x20d55c8
db['foo']='bar'
=> "bar"
db.fetch('foo')
=> "bar"
db.close
=> nil
db.closed?
=> true

#2 Updated by Ayumu AIZAWA almost 4 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r33340.
Jon, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • test/psych/test_yamldbm.rb (require): fix #setup and #terdown. [Bug #5370]
  • test/syck/test_yamldbm.rb (require): ditto.

Also available in: Atom PDF