Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On Solaris, some File#flock specs failed #122

Closed
ngoto opened this issue Sep 7, 2015 · 1 comment
Closed

On Solaris, some File#flock specs failed #122

ngoto opened this issue Sep 7, 2015 · 1 comment

Comments

@ngoto
Copy link

ngoto commented Sep 7, 2015

On Solaris, some specs about File#flock failed.
On Solaris, the following specs in core/file/flock_spec.rb failed.

3)
File#flock returns false if trying to lock an exclusively locked file FAILED
Expected 0
 to equal false

/XXXXX/trunk-51741/spec/rubyspec/core/file/flock_spec.rb:34:in `block (3 levels) in <top (required)>'
/XXXXX/trunk-51741/spec/rubyspec/core/file/flock_spec.rb:33:in `open'
/XXXXX/trunk-51741/spec/rubyspec/core/file/flock_spec.rb:33:in `block (2 levels) in <top (required)>'
/XXXXX/trunk-51741/spec/rubyspec/core/file/flock_spec.rb:3:in `<top (required)>'

4)
File#flock blocks if trying to lock an exclusively locked file FAILED
Expected [:before, :after]
 to equal [:before]

/XXXXX/trunk-51741/spec/rubyspec/core/file/flock_spec.rb:59:in `block (2 levels) in <top (required)>'
/XXXXX/trunk-51741/spec/rubyspec/core/file/flock_spec.rb:3:in `<top (required)>'

On Solaris, file locks by using File#flock belong to its process, not belong to file descriptors.
So, flock to the same file in a single process always succeeds.
To examine flock on Solaris, locking a file from different process is needed.

@ngoto
Copy link
Author

ngoto commented Sep 7, 2015

split from ruby/mspec#12

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants