Skip to content

return error code when benchmark fails#3480

Merged
Cyan4973 merged 3 commits intodevfrom
benchFail
Feb 7, 2023
Merged

return error code when benchmark fails#3480
Cyan4973 merged 3 commits intodevfrom
benchFail

Conversation

@Cyan4973
Copy link
Contributor

@Cyan4973 Cyan4973 commented Feb 7, 2023

such scenario can happen, for example,
when trying a decompression-only benchmark on invalid data.
Other possibilities include an allocation error in an intermediate step.

Up to now, the benchmark would return immediately, and exit the program, but still return 0.
When operation outcome is checked by command line, this is confusing, as the program appears successful.

Now it returns !0, which can be interpreted as an error by command line.

Required to validate #3476 .

Potential follow up in #3481 .

such scenario can happen, for example,
when trying a decompression-only benchmark on invalid data.
Other possibilities include an allocation error in an intermediate step.

So far, the benchmark would return immediately, but still return 0.
On command line, this would be confusing, as the program appears successful (though it does not display any successful message).

Now it returns !0, which can be interpreted as an error by command line.
@Cyan4973 Cyan4973 requested a review from terrelln February 7, 2023 18:51
@Cyan4973 Cyan4973 merged commit df21ace into dev Feb 7, 2023
@Cyan4973 Cyan4973 deleted the benchFail branch February 10, 2023 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants