-
Notifications
You must be signed in to change notification settings - Fork 25
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
RFE: filter_exclude search by syscall/key, syncmarker fix, comments #102
base: main
Are you sure you want to change the base?
RFE: filter_exclude search by syscall/key, syncmarker fix, comments #102
Conversation
…ments - Add key and syscall to exit list rules. - Update 2nd syncmarker search. - Add comments to each check. See: linux-audit#58 Signed-off-by: Richard Guy Briggs <[email protected]> --- Rebased on linux-audit#96
@@ -69,55 +69,55 @@ $subj_clr = $subj_sen unless defined $subj_clr; | |||
# try adding rule for each supported field type and test for (a few) | |||
# unsupported types | |||
$result = system("auditctl -a exclude,always -F msgtype=$msgtype"); | |||
ok( $result, 0 ); | |||
ok( $result, 0 ); # add msgtype ok? |
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.
Please don't do this; the operation which is being checked is the line directly above this one. This is comment noise and it detracts from other comments in the test suite.
This applies to all the other similar comments you've added in this PR; please remove them and leave the code as-is.
On 2021-03-14 11:54, Paul Moore wrote:
-ok( $result, 0 );
+ok( $result, 0 ); # add msgtype ok?
Please don't do this; the operation which is being checked is the line **directly above this one**. This is comment noise and it detracts from other comments in the test suite.
This isn't a code comment but rather a failed output comment. This is deliberate since the test output doesn't show the operation being checked and otherwise gives *no* indication what failed without going in to find the line that failed. This has been discussed, justified and accepted in the past. It is a very simple but helpful debugging tool. The alternative is to use ATS_DEBUG so that it is possible to enable diagnostics, which adds significant overhead to labour and code when in most cases just knowing what failed rather than the more detailed how will help resolve the failure.
git grep "^[ ^I]*ok("
|
"Please don't do this." |
Let me add to this, I think it is a good thing to have people look at the test source when the test fails; I actually would encourage that in most cases. This is one of the reasons why I've fought against a lot of the overly verbose output, "debugging" messages, etc. |
Hi @rgbriggs, I'm just checking in on this PR; are you planning to make the requested change above? |
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.
See comment #102 (comment)
See: #58
Signed-off-by: Richard Guy Briggs [email protected]
Rebased on #96