Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
test: set umask for tests
#25213 proposes setting umask in the
Python test runner to avoid spurious test failures when running from a
shell with a restrictive umask. This is a good idea, but will only fix
the issue for tests run with the Python runner. Set it in
`common/index.js` as well so that it fixes it even when tests are run
directly with a `node` binary, bypassing the Python test runner.
  • Loading branch information
Trott committed Jan 9, 2019
commit c3c94c0943b9e5536d5adf243e9e6777594cb774
4 changes: 4 additions & 0 deletions test/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ const {
hasIntl
} = process.binding('config');

// Some tests assume a umask of 0o022 so set that up front. Tests that need a
// different umask will set it themselves.
process.umask(0o022);

const noop = () => {};

const hasCrypto = Boolean(process.versions.openssl);
Expand Down