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.
When reviewing #4695, I started to write increasingly complex perl one-long-liners to check that the new
requires_xxx
calls matched the needs. Eventually I decided that this was getting too complex for one-liners, so here's a reasonably well-structured script that does some analysis ofrequires_xxx
calls vsrun_test
parameters.This script has a framework that can be extended easily, but currently it only checks a few easy-to-identify boolean options and
requires_max_content_len
(with false positives).Typical usage (from a worktree with the
ssl-opt.sh
you want to check — note that the script defaults to checking its own worktree, not the worktree of the current directory):This is nowhere near production ready and I currently have no plans to do further work except to add further ad hoc checks or improve the documentation (I'll try to do that while it's still reasonably fresh in my mind). I think that rather than improve this script, we can improve the logic inside
ssl-opt.sh
itself to reduce the number of ad hoc requirements. There's already logic to analyzeciphersuite=
on the command line, and even with the limitations of shell scripting, it would be easy to analyze several other options.The output as of a0c54c3 is
and I am satisfied that these are false positives due to limitations of the analysis in this script (it doesn't understand the diversity of requirements related to mtu values, and it doesn't figure out the “factored out”
requires_max_content_len
call for the "Handshake memory usage" scripts).