-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
detect/secresult: convert unittest to FAIL/PASS APIs #6563
detect/secresult: convert unittest to FAIL/PASS APIs #6563
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6563 +/- ##
==========================================
- Coverage 77.04% 77.02% -0.02%
==========================================
Files 613 613
Lines 186693 186686 -7
==========================================
- Hits 143833 143793 -40
- Misses 42860 42893 +33
Flags with carried forward coverage won't be shown. Click here to find out more. |
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.
Thanks for this PR, a few nit comments.
I'm not sure if it is ok or not to suppress the rfb
here in the commit message, so that might need change...
@@ -1,4 +1,4 @@ | |||
/* Copyright (C) 2020 Open Information Security Foundation | |||
/* Copyright (C) 2021 Open Information Security Foundation |
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.
Thanks for taking the time to also update the copyright year :)
One thing is that they must be updated in such a way that it covers their existence, if I can put it that way. That means that here we should have 2020-2021
, not erasing 2020
.
@@ -268,14 +268,13 @@ void DetectRfbSecresultFree(DetectEngineCtx *de_ctx, void *de_ptr) | |||
*/ |
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.
It is preferred to remove the retvals, now.
(so, deleting lines 266 and 267)
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.
Same applies to the other test. :)
|
||
FAIL_IF_NOT_NULL(de); | ||
|
||
DetectRfbSecresultFree(NULL, de); |
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.
One review I received just the other day and which I believe applies here is that we can remove this DetectRfbSecresultFree
call. The reasoning behind it is that if it is not null, we won't reach this call, and if we reach it... then it should be null, already...
It would be better if it was still in there: |
Followed by: #6565 |
Make sure these boxes are signed before submitting your Pull Request -- thank you.
Link to redmine ticket:
https://redmine.openinfosecfoundation.org/issues/4055
Ticket: #4055
Previous PR: #6562
Describe changes: