Skip to content

Order tool output by options provided - x509 #2454

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

justsmth
Copy link
Contributor

@justsmth justsmth commented Jun 2, 2025

Context

  • The OpenSSL CLI tool orders its output based on the order of the options passed to it.
  • Our tool was using a static order that was unaffected by the order of the options.

Description of changes:

  • This change adds an alternative suite of functions to parse options in a way that preserves their order.
  • The new argument parser was integrated into the "X509" subcommand logic for the tool.

Call-outs:

  • The new parser still needs to be integrated with the other subcommands as well.

Testing:

Added new tests that vary the order of the parameters provided.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

@codecov-commenter
Copy link

codecov-commenter commented Jun 2, 2025

Codecov Report

Attention: Patch coverage is 69.69697% with 70 lines in your changes missing coverage. Please review.

Project coverage is 78.81%. Comparing base (9ee8ec8) to head (e0a8fda).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
tool-openssl/ordered_args.cc 54.68% 29 Missing ⚠️
tool-openssl/x509.cc 84.44% 21 Missing ⚠️
tool-openssl/x509_test.cc 9.09% 20 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2454      +/-   ##
==========================================
- Coverage   78.88%   78.81%   -0.07%     
==========================================
  Files         621      625       +4     
  Lines      108675   108846     +171     
  Branches    15421    15456      +35     
==========================================
+ Hits        85725    85784      +59     
- Misses      22278    22382     +104     
- Partials      672      680       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@justsmth justsmth force-pushed the fix-openssl-comparison branch from 742c51d to e0a8fda Compare June 3, 2025 12:32
@justsmth justsmth changed the title [DRAFT] Order tool output by options provided - x509 Order tool output by options provided - x509 Jun 3, 2025
@justsmth justsmth marked this pull request as ready for review June 3, 2025 14:11
@justsmth justsmth requested a review from a team as a code owner June 3, 2025 14:11
@justsmth justsmth requested review from andrewhop and skmcgrail June 3, 2025 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants