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

test: fix test-module-loading-error for AlpineLinux #3657

Closed
wants to merge 1 commit into from
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