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

Make tests pass with umask #6541

Merged
merged 1 commit into from May 30, 2012
Merged

Make tests pass with umask #6541

merged 1 commit into from May 30, 2012

Conversation

ghost
Copy link

@ghost ghost commented May 29, 2012

Assertions on file permissions only pass with some combinations of
file create mode and the process file mode creation mask. This mask
should be applied on the file create mode before related assertions.

I needed to raise the permissions allowed by my file mode creation
mask to make the tests on File#atomic_write pass. It fix these tests
for any umask value.

  Assertions on file permissions only pass with some combinations of
file create mode and the process file mode creation mask. This mask
should be applied on the file create mode before related assertions.
@ghost
Copy link
Author

ghost commented May 29, 2012

Here is an extract of a dump (some parts removed) from standard output
when tests are failing:

% cd activesupport
% rake test
[...]
Finished tests in 4.649657s, 552.9441 tests/s, 1789.5945 assertions/s.

  1) Failure:
test_atomic_write_preserves_default_file_permissions(AtomicWriteTest) [.../rails/activesupport/test/core_ext/file_test.rb:54]:
Expected: 33161
  Actual: 33152

  2) Failure:
test_atomic_write_preserves_file_permissions(AtomicWriteTest) [.../rails/activesupport/test/core_ext/file_test.rb:33]:
Expected: 33261
  Actual: 33216

2571 tests, 8321 assertions, 2 failures, 0 errors, 0 skips
[...]

rafaelfranca added a commit that referenced this pull request May 30, 2012
…ring-unsafe-umask

Make  tests pass with umask
@rafaelfranca rafaelfranca merged commit d5025f1 into rails:master May 30, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant