-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Exit Value of iperf while using --json output #1405
Labels
bug:json
Bugs related to JSON output
Comments
Reproduced this behavior on iperf-3.12, and you're right, it shouldn't do that. |
matt9j
added a commit
to matt9j/iperf
that referenced
this issue
May 20, 2023
Previously on error, the client API would return 0 (success) in the cleanup and fail error handling path when outputting json to avoid double-closing the JSON output. With iperf_json_finish now idempotent, the client api can faithfully return an error when it fails, and the calling context will not double-close the output if it has already been closed. This addresses esnet#1405 .
matt9j
added a commit
to matt9j/iperf
that referenced
this issue
May 20, 2023
Previously on error, the client API would return 0 (success) in the cleanup and fail error handling path when outputting json to avoid double-closing the JSON output. With iperf_json_finish now idempotent, the client api can faithfully return an error when it fails, and the calling context will not double-close the output if it has already been closed. This addresses esnet#1405 .
coolshou
pushed a commit
to coolshou/iperf
that referenced
this issue
Jul 13, 2023
Previously on error, the client API would return 0 (success) in the cleanup and fail error handling path when outputting json to avoid double-closing the JSON output. With iperf_json_finish now idempotent, the client api can faithfully return an error when it fails, and the calling context will not double-close the output if it has already been closed. This addresses esnet#1405 .
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Context
Version of iperf3:
since version 3.11
Hardware:
any
Operating system (and distribution, if any):
any
Other relevant information (for example, non-default compilers,
libraries, cross-compiling, etc.):
nothing just plain ./configure;sudo make;sudo make install
Bug Report
Expected Behavior
when calling iperf (and the server is not reachable) with
iperf3 -c localhost --json
it's exit value should be 1when calling iperf (and the server is not reachable) with
iperf3 -c localhost
it's exit value is 1Actual Behavior
when calling iperf (and the server is not reachable) with
iperf3 -c localhost --json
it's exit value is 0when calling iperf (and the server is not reachable) with
iperf3 -c localhost
it's exit value is 1Possible Solution
change the cleanup_and_fail in
iperf_client_api.c
toThe text was updated successfully, but these errors were encountered: