test: use regex for OpenSSL function name#28289
test: use regex for OpenSSL function name#28289danbev wants to merge 2 commits intonodejs:masterfrom
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.
sam-github
left a comment
There was a problem hiding this comment.
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 <vieuxtech@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
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 <vieuxtech@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
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