Apply non-time-sensitive prerequisites for clang-format to 3.6#29243
Closed
bob-beck wants to merge 8 commits intoopenssl:openssl-3.6from
Closed
Apply non-time-sensitive prerequisites for clang-format to 3.6#29243bob-beck wants to merge 8 commits intoopenssl:openssl-3.6from
bob-beck wants to merge 8 commits intoopenssl:openssl-3.6from
Conversation
In particular fix the regex magic to be tolerant of different ways of formatting a main program. My past life had forgotten this magic 14 years ago when we converted it to just a table of commands in the forks. https://www.youtube.com/watch?v=mWbbjvYmN8A
(in it's final form it will work with either compiler because it's currently one line, but was tripped up before by the #ifdef, so redid it to be consistent with the other changes previously in this stack) While I am here correct the test to test for all possible return values of ERR_get_error_all, without the #ifdefs
Similar to the previous errtest.c fix this also is not broken by any reformatting today, but this change makes this follow the same pattern as the other things that test OPENSSL_LINE after the fact so we maintain the same paradigm everywhere.
They are not asm, but spit out stuff that is not C Clang-format gets confused and does bad things with them.
If OPENSSL_LINE ends up on a different line than the following call here, this test breaks. We should perhaps reconsider if testing the reporting of OPENSSL_LINE is what we want in a malloc test, but that's for another time than now.
we assume these to be order sensitive and not self contained, so as per our new style we disable clang format around them. we should consider renaming to .inc, or doing away with some of these and just putting the code inline, but that's for later consideration.
2b1d0bc to
9e982c6
Compare
t8m
approved these changes
Dec 3, 2025
Member
nhorman
approved these changes
Dec 3, 2025
Collaborator
|
This pull request is ready to merge |
Contributor
|
merged, thank you! |
openssl-machine
pushed a commit
that referenced
this pull request
Dec 4, 2025
Reviewed-by: Neil Horman <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from #29243)
openssl-machine
pushed a commit
that referenced
this pull request
Dec 4, 2025
In particular fix the regex magic to be tolerant of different ways of formatting a main program. My past life had forgotten this magic 14 years ago when we converted it to just a table of commands in the forks. https://www.youtube.com/watch?v=mWbbjvYmN8A Reviewed-by: Neil Horman <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from #29243)
openssl-machine
pushed a commit
that referenced
this pull request
Dec 4, 2025
(in it's final form it will work with either compiler because it's currently one line, but was tripped up before by the #ifdef, so redid it to be consistent with the other changes previously in this stack) While I am here correct the test to test for all possible return values of ERR_get_error_all, without the #ifdefs Reviewed-by: Neil Horman <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from #29243)
openssl-machine
pushed a commit
that referenced
this pull request
Dec 4, 2025
Similar to the previous errtest.c fix this also is not broken by any reformatting today, but this change makes this follow the same pattern as the other things that test OPENSSL_LINE after the fact so we maintain the same paradigm everywhere. Reviewed-by: Neil Horman <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from #29243)
openssl-machine
pushed a commit
that referenced
this pull request
Dec 4, 2025
They are not asm, but spit out stuff that is not C Clang-format gets confused and does bad things with them. Reviewed-by: Neil Horman <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from #29243)
openssl-machine
pushed a commit
that referenced
this pull request
Dec 4, 2025
If OPENSSL_LINE ends up on a different line than the following call here, this test breaks. We should perhaps reconsider if testing the reporting of OPENSSL_LINE is what we want in a malloc test, but that's for another time than now. Reviewed-by: Neil Horman <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from #29243)
openssl-machine
pushed a commit
that referenced
this pull request
Dec 4, 2025
we assume these to be order sensitive and not self contained, so as per our new style we disable clang format around them. we should consider renaming to .inc, or doing away with some of these and just putting the code inline, but that's for later consideration. Reviewed-by: Neil Horman <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from #29243)
openssl-machine
pushed a commit
that referenced
this pull request
Dec 4, 2025
Reviewed-by: Neil Horman <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from #29243)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This does the preparatory work for OPENSSL-3.6 to prepare for clang-format.
This is the 3.6 version of #29241
This is not sensitive to the repository being frozen, as it does not yet make format changes to any file. All this does is add the clang-format file, and clean up some of our things that get in the way of reformatting the source code.
For 1657
And can be done across branches to reduce the day-of-reformat load.
!--
Thank you for your pull request. Please review these requirements:
Contributors guide: https://github.com/openssl/openssl/blob/master/CONTRIBUTING.md
Other than that, provide a description above this comment if there isn't one already
If this fixes a GitHub issue, make sure to have a line saying 'Fixes #XXXX' (without quotes) in the commit message.
-->
Checklist