Repository navigation
#299: Test that a throwing fnmatch callback reaches the awaiter - #300
Merged
Merged
Conversation
The exception left in EG(exception) escaped outside the coroutine as an uncaught fatal error while the awaiter was woken with a cancellation. The test drives a wildcard FTP transfer against the server from ext/ftp/tests/server.inc with a callback that throws once.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #299. Carries the test and the CHANGELOG entry for true-async/php-src#37.
tests/curl/072-fnmatch_exception.phptdrives a wildcard FTP transfer against the server fromext/ftp/tests/server.incwith aCURLOPT_FNMATCH_FUNCTIONcallback that throws on its first call. Without the php-src change the awaiter catchesAsync\AsyncCancellation: Graceful shutdownand the throw surfaces afterwards as an uncaught fatal error; with it the awaiter catches theRuntimeException.The callback throws once and answers
CURL_FNMATCHFUNC_NOMATCHafterwards, so the assertion names one exception: libcurl calls the callback once per listed entry regardless of what the previous call did, and the exceptions chain throughprevious. The synchronous path behaves the same way, which is upstream php-src behaviour and untouched here.The host-key half of #299 has no test. This machine's libcurl carries neither
sftpnorscpincurl_version()['protocols'], soCURLOPT_SSH_HOSTKEYFUNCTIONcannot be reached.Merge order: the CI job clones php-src
true-async-stable, so true-async/php-src#37 has to reach that branch first. Until then this test fails on CI, which is the same failure it was written to prove.Testing
ext/curl/tests+ext/async/tests+ext/async/fuzzy-tests/_generated, ZTS debug, libcurl 8.12.1: 2116 passed, 0 failed.