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

tool_operate: don't discard failed parallel transfer result #6921

Merged
merged 1 commit into from Apr 20, 2021

Conversation

@jay
Copy link
Member

@jay jay commented Apr 20, 2021

  • Save a parallel transfer's result code only when it fails.

Prior to this change the result code was always set which meant that a
failed result could be erroneously discarded if a later result was
successful.

Before:

curl --fail -Z https://httpbin.org/status/404 https://httpbin.org/delay/10
echo %ERRORLEVEL%
0

After:

curl --fail -Z https://httpbin.org/status/404 https://httpbin.org/delay/10
echo %ERRORLEVEL%
22

Closes #xxxx


While I was testing this I noticed that --fail --fail-early will not cause curl to exit immediately and instead it will wait for the 10 second delay transfer to complete. I'm not sure whether that could be considered a bug or not.

- Save a parallel transfer's result code only when it fails and the
  transfer is not being retried.

Prior to this change the result code was always set which meant that a
failed result could be erroneously discarded if a different transfer
later had a successful result (CURLE_OK).

Before:

> curl --fail -Z https://httpbin.org/status/404 https://httpbin.org/delay/10
> echo %ERRORLEVEL%
0

After:

> curl --fail -Z https://httpbin.org/status/404 https://httpbin.org/delay/10
> echo %ERRORLEVEL%
22

Closes #xxxx
@jay jay force-pushed the jay:fix_parallel_result branch from 9b61bf9 to 711879c Apr 20, 2021
@jay
Copy link
Member Author

@jay jay commented Apr 20, 2021

I modified this slightly so that result isn't set by a failed transfer that is being retried.

@bagder
bagder approved these changes Apr 20, 2021
@jay jay merged commit 711879c into curl:master Apr 20, 2021
39 of 48 checks passed
39 of 48 checks passed
@github-actions
codeql
Details
@github-actions
fuzzing
Details
@github-actions
macos normal
Details
@github-actions
macos debug
Details
@github-actions
macos libssh2
Details
@github-actions
macos c-ares
Details
@github-actions
macos HTTP only
Details
@github-actions
macos SecureTransport metalink
Details
@github-actions
macos OpenSSL metalink
Details
@github-actions
macos LibreSSL metalink
Details
@github-actions
macos torture
Details
@github-actions
macos torture-ftp
Details
@github-actions
macos macOS 10.15
Details
@github-actions
macos cmake clang OpenSSL
Details
@github-actions
macos cmake clang LibreSSL
Details
@github-actions
macos cmake gcc-8 OpenSSL
Details
@github-actions
macos cmake gcc-8 LibreSSL
Details
@github-actions
macos cmake gcc-9 OpenSSL
Details
@github-actions
macos cmake gcc-9 LibreSSL
Details
continuous-integration/appveyor/pr AppVeyor build failed
Details
@azure-pipelines
curl.curl Build #20210420.4 failed
Details
@azure-pipelines
curl.curl (windows windows msys1_mingw32_debug_schannel) windows windows msys1_mingw32_debug_schannel failed
Details
@azure-pipelines
curl.curl (windows windows msys1_mingw64_debug_schannel) windows windows msys1_mingw64_debug_schannel failed
Details
@azure-pipelines
curl.curl (windows windows msys1_mingw_debug_schannel) windows windows msys1_mingw_debug_schannel failed
Details
@azure-pipelines
curl.curl (windows windows msys2_mingw32_debug_openssl) windows windows msys2_mingw32_debug_openssl failed
Details
@azure-pipelines
curl.curl (windows windows msys2_mingw32_debug_schannel) windows windows msys2_mingw32_debug_schannel failed
Details
@azure-pipelines
curl.curl (windows windows msys2_mingw64_debug_openssl) windows windows msys2_mingw64_debug_openssl failed
Details
@azure-pipelines
curl.curl (windows windows msys2_mingw64_debug_schannel) windows windows msys2_mingw64_debug_schannel failed
Details
@lgtm-com
LGTM analysis: Python No code changes detected
Details
@cirrus-ci
FreeBSD freebsd_instance:family/freebsd-11-4 Task Summary
Details
@cirrus-ci
FreeBSD freebsd_instance:family/freebsd-12-2 Task Summary
Details
@lgtm-com
LGTM analysis: C/C++ No new or fixed alerts
Details
@mback2k
buildbot/curl_winssl_cross_x64 Build done.
Details
@mback2k
buildbot/curl_winssl_cross_x64_dbg Build done.
Details
@mback2k
buildbot/curl_winssl_cross_x86 Build done.
Details
@mback2k
buildbot/curl_winssl_cross_x86_dbg Build done.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@azure-pipelines
curl.curl (linux ubuntu default) linux ubuntu default succeeded
Details
@azure-pipelines
curl.curl (linux ubuntu disable_http_smtp_imap) linux ubuntu disable_http_smtp_imap succeeded
Details
@azure-pipelines
curl.curl (linux ubuntu disable_ipv6) linux ubuntu disable_ipv6 succeeded
Details
@azure-pipelines
curl.curl (linux ubuntu disable_thredres) linux ubuntu disable_thredres succeeded
Details
@azure-pipelines
curl.curl (linux ubuntu http_only) linux ubuntu http_only succeeded
Details
@azure-pipelines
curl.curl (linux ubuntu torture) linux ubuntu torture succeeded
Details
@azure-pipelines
curl.curl (windows windows msys1_mingw32_debug_openssl) windows windows msys1_mingw32_debug_openssl succeeded
Details
@azure-pipelines
curl.curl (windows windows msys1_mingw64_debug_openssl) windows windows msys1_mingw64_debug_openssl succeeded
Details
@azure-pipelines
curl.curl (windows windows msys1_mingw_debug_openssl) windows windows msys1_mingw_debug_openssl succeeded
Details
@deepcode-ci-bot
deepcode-ci-bot Well done, no issues found!
Details
@muse-dev
musedev Complete (12 min, 6/6 checks) no new bugs found
Details
@jay

This comment has been minimized.

Copy link
Member Author

@jay jay commented on 711879c Apr 20, 2021

Ref: #6921

jay added a commit to jay/curl that referenced this pull request Apr 20, 2021
- Save a parallel transfer's result code only when it fails and the
  transfer is not being retried.

Prior to this change the result code was always set which meant that a
failed result could be erroneously discarded if a different transfer
later had a successful result (CURLE_OK).

Before:

> curl --fail -Z https://httpbin.org/status/404 https://httpbin.org/delay/10
> echo %ERRORLEVEL%
0

After:

> curl --fail -Z https://httpbin.org/status/404 https://httpbin.org/delay/10
> echo %ERRORLEVEL%
22

Closes curl#6921
@jay jay deleted the jay:fix_parallel_result branch Apr 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants