-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[WebCryptoAPI] Remove race condition #14291
Conversation
Configure testharness.js to wait until the global `done` function is invoked before reporting results. This ensures that all asynchronously-declared tests are defined and subsequently executed regardless of variations in timing.
I would just like to verify that it does not matter when the call to setup is made. Specifically that it does not matter if it is not called from all of the run_test functions. |
I'm glad you mentioned the other |
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.
This is good. However, the tests are written as
var promise = importVectorKeys(vector, ["verify"], ["sign"]).then(function(vectors) {
promise_test(function(test) { /* test stuff */ });
}, function(err) {
promise_test(function(test) { assert_unreached(/* ... */) });
});
… while I would expect
promise_test(function(test) {
return importVectorKeys(vector, ["verify"], ["sign"]).then(function(vectors) {
/* test stuff */
});
});
Why is that?
The reason is that not all algorithms and not all sizes may be supported. This provides a uniform error in those cases. |
@jimsch Thanks for the review. Would you mind merging on my behalf? |
I am used to this happening automatically, but two of the tests never finished |
Those "checks" are intended to produce test results to assist in review. They're still under development, though, which is why they are not required for merging. @lukebjerring Would you like me to let you know when/if I see issues with those checks? |
Yep; this bad state shouldn't occur anymore, and I've also updated the body of the check summary to include a link for reporting issues, e.g. https://github.com/web-platform-tests/wpt/pull/14291/checks?check_run_id=39572969
|
Very nice! Thanks, Luke |
Configure testharness.js to wait until the global
done
function isinvoked before reporting results. This ensures that all
asynchronously-declared tests are defined and subsequently executed
regardless of variations in timing.
The instability is apparent when comparing the test results between Chrome, Firefox, and Safari, e.g. https://wpt.fyi/results/WebCryptoAPI/sign_verify?sha=58523789a0
Firefox and Safari are missing results from tests that depend on
WebCryptoAPI/sign_verify/ecdsa.js
due to the race condition which this patch corrects.