Skip to content
Closed
Changes from all commits
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
4 changes: 4 additions & 0 deletions test/parallel/test-module-loading-error.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ var error_desc = {
linux: 'file too short',
sunos: 'unknown file type'
};
var musl_errno_enoexec = 'Exec format error';

var dlerror_msg = error_desc[process.platform];

Expand All @@ -20,6 +21,9 @@ if (!dlerror_msg) {
try {
require('../fixtures/module-loading-error.node');
} catch (e) {
if (platform === 'linux' && e.toString().indexOf(musl_errno_enoexec) !== -1) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: platform should be process.platfom here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Embarrassed! Sorry about that.

dlerror_msg = musl_errno_enoexec;
}
assert.notEqual(e.toString().indexOf(dlerror_msg), -1);
}

Expand Down