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.
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
Remove AclMatchedName from ACL::ParseAclLine() #239
Remove AclMatchedName from ACL::ParseAclLine() #239
Changes from 7 commits
7493545
7e0237b
f577b68
9300f69
26917d3
754f7b0
a0bda44
8d8b7a0
f705d5e
b76b76b
988e062
7f4c9ba
c71e2b2
5047883
7283c34
9ad99d2
4ccfdbe
83d8c36
567290a
6a796cc
0a182f4
5dbf871
931c505
b41958e
abf8097
662f661
56609b9
56364c5
4030d00
e9f6009
5decf4f
7b81eb6
68a0d95
e8781bb
941d688
50d9e50
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAICT, there is a typo in this expect-message value (missing space), and the instruction file name is misspelled.
BTW, if you can think of a simple way to catch mismatching instruction files, we should post the corresponding improvement in a dedicated PR. Otherwise, such twin errors may go unnoticed for a long time!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we are going to keep to the "bad-" for negative tests, we can require that each "bad-" had an instruction file - that should be easy to adjust, I think. If positive tests (i.e., all other ones) do not need instruction files, then we can also prohibit such files for them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "bad" prefix is for test cases that contain problematic configurations that should not be used as a starting point for deployed configurations. I expect all of them to have instruction files because Squid should warn about problems (at least). If this is easy to check, we probably should, but it is not a high priority, and I am afraid that it may trigger wasteful discussions. Let's not do that just yet.
The lack of a "bad" prefix does not imply the lack of instructions file. Some instructions are purely "positive".
Ideally, we should catch instruction files that do not have the corresponding configuration file. That check, AFAICT, will catch most of the problems that are very difficult for a human to spot during review (and that do not result in "make check" failures today). Perhaps there is some simple Makefile.am (dependency) trick that can require a configuration file for each instruction file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you know of such a trick, let's discuss adding it (in a dedicated minimal PR). There is no rush with this, of course. I just did not want this accidentally discovered problem to be forgotten if it has a simple solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately I could not find a simple (one-liner?) solution. However, we have already some logic in test-suite/Makefile.am for squid-conf-tests target. What if we enhance it with an additional check:
We can either abort the test (as in this snippet) upon spotting the first missing file or just warn about all missing .conf files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Please post a dedicated official "Maintenance: Detect mismatching .instructions files" PR with the following adjustments:
git grep basename '*.am'
. If you prefer, save the basename result into a local cfgBasename variable and use that variable to setcfg
.@failed=...rm...
line (below the new loop) intact.