vmod_debug: add debug.chksha256 / debug.chkcrc32 VDPs #4208
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.
Usually we do not require PRs for vmod_debug additions, but in this case I feel more comfortable asking if anyone has better ideas:
Working on storage engines and delivery changes, I would like to have a simple way to ensure for longer tests (for example using wrk) that delivered body data is correct. While implementing checks in the http client would ensure proper end-to-end validation, the task of handling errors looks tedious, because, for hunting bugs efficiently, getting a core dump of varnishd for failing tests is basically a requirement.
Panicking varnishd from a VDP at the right place is easy and independent of protocols. So this is a suggestion to add body checksum check VDPs.
The code has some duplications, but with just SHA256 and CRC32 I consider the savings of generalizing not worthy.