-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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: use regex for OpenSSL function name #28289
Conversation
This commit modifies test-crypt-scrypt.js to use a regular expression for the function name in the error message, similar to what is done for the error code. The motivation for this change comes from a case where we (Red Hat) patch OpenSSL and the memory limit checking is done in a different function, meaning that the function name from which this error originates differs from that when linking to the OpenSSL version shipped with Node.js.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm OK with this as-is, but wonder if might be better to just switch the test to assert on the .code instead of the .message, which should be more stable going forward, even openssl might move the check around to a different code location.
I like that, I'll make the changes. Thanks! |
@sam-github Before I start I just wanted to mention that there currently is no
But in the I'm happy to look into a solution but wanted to make sure this is what we actually want to do here and that the lack of |
There aren't |
Re-build of failing node-test-commit-aix (✔️) |
Landed in c1ee668. |
This commit modifies test-crypt-scrypt.js to use a regular expression for the function name in the error message, similar to what is done for the error code. The motivation for this change comes from a case where we (Red Hat) patch OpenSSL and the memory limit checking is done in a different function, meaning that the function name from which this error originates differs from that when linking to the OpenSSL version shipped with Node.js. PR-URL: #28289 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
This commit modifies test-crypt-scrypt.js to use a regular expression for the function name in the error message, similar to what is done for the error code. The motivation for this change comes from a case where we (Red Hat) patch OpenSSL and the memory limit checking is done in a different function, meaning that the function name from which this error originates differs from that when linking to the OpenSSL version shipped with Node.js. PR-URL: #28289 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
This commit modifies test-crypt-scrypt.js to use a regular expression
for the function name in the error message, similar to what is done for
the error code.
The motivation for this change comes from a case where we (Red Hat)
patch OpenSSL and the memory limit checking is done in a different
function, meaning that the function name from which this error
originates differs from that when linking to the OpenSSL version shipped
with Node.js.
make -j4 test
(UNIX), orvcbuild test
(Windows) passes