Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions lisa/tools/openssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,14 @@ def speed(self, sec: Optional[int] = None) -> ExecutableResult:
expected_exit_code_failure_message=("OpenSSL speed test failed."),
)

# Check for errors in the output - OpenSSL speed can return exit code 0
# even when some cryptographic operations fail, so we need to check
# stdout for error indicators
if ":error:" in result.stdout:
# Validate that the speed test actually produced benchmark results.
# openssl speed prints throughput tables with "bytes per second" on
# success. A non-zero exit code is already caught above; this guards
# against silent/empty runs.
if "bytes per second" not in result.stdout:
raise LisaException(
f"OpenSSL speed test failed - errors found in output: {result.stdout}"
"OpenSSL speed test produced no benchmark results. "
f"Output: {result.stdout}"
)

return result
Expand Down
Loading