-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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-id: convert unittests to FAIL/PASS APIs #6621
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6621 +/- ##
==========================================
+ Coverage 77.05% 77.08% +0.02%
==========================================
Files 613 613
Lines 186203 186179 -24
==========================================
+ Hits 143482 143512 +30
+ Misses 42721 42667 -54
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.
Looking good, except for DetectIdTestMatch01
which needs some adjustment :)
const char *sigs[3]; | ||
sigs[0]= "alert ip any any -> any any (msg:\"Testing id 1\"; id:1234; sid:1;)"; | ||
sigs[1]= "alert ip any any -> any any (msg:\"Testing id 2\"; id:5678; sid:2;)"; | ||
sigs[2]= "alert ip any any -> any any (msg:\"Testing id 3\"; id:5101; sid:3;)"; | ||
|
||
uint32_t sid[3] = {1, 2, 3}; | ||
|
||
uint32_t results[3][3] = { | ||
/* packet 0 match sid 1 but should not match sid 2 */ | ||
{1, 0, 0}, | ||
/* packet 1 should not match */ | ||
{0, 1, 0}, | ||
/* packet 2 should not match */ | ||
{0, 0, 1} }; | ||
|
||
result = UTHGenericTest(p, 3, sigs, sid, (uint32_t *) results, 3); | ||
|
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 deleted these, we would be deleting the core of this test ;)
/* packet 2 should not match */ | ||
{0, 0, 1} }; | ||
|
||
result = UTHGenericTest(p, 3, sigs, sid, (uint32_t *) results, 3); |
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.
I think a check like
FAIL_IF_NOT(UTHGenericTest(p, 3, sigs, sid, (uint32_t *) results, 3));
here would work :)
Followed by: #6626 |
dns: add dns.rcode keyword Feature OISF#6621 It matches the rcode field in DNS It's an integer match valid ranges = 0-23 Does not support prefilter Supports flow in client direction
Feature OISF#6621 It matches the rcode field in DNS It's an integer match valid ranges = 0-23 Does not support prefilter Supports flow in client direction
Feature OISF#6621 It matches the rcode field in DNS It's an unsigned integer match valid ranges = [0-23] Does not support prefilter Supports flow in client direction
Feature OISF#6621 It matches the rcode field in DNS It's an unsigned integer match valid ranges = [0-23] Does not support prefilter Supports flow in client direction
Feature OISF#6621 It matches the rcode field in DNS It's an unsigned integer match valid ranges = [0-23] Does not support prefilter Supports flow in client direction
Feature OISF#6621 It matches the rcode field in DNS It's an unsigned integer match valid ranges = [0-23] Does not support prefilter Supports flow in both directions
Feature OISF#6621 It matches the rcode field in DNS It's an unsigned integer match valid ranges = [0-15] Does not support prefilter Supports flow in both directions
Feature OISF#6621 It matches the rcode field in DNS It's an unsigned integer match valid ranges = [0-15] Does not support prefilter Supports flow in both directions
Feature OISF#6621 It matches the rcode field in DNS It's an unsigned integer match valid ranges = [0-15] Does not support prefilter Supports flow in both directions
Feature OISF#6621 It matches the rcode field in DNS It's an unsigned integer match valid ranges = [0-15] Does not support prefilter Supports flow in both directions
Feature OISF#6621 It matches the rcode field in DNS It's an unsigned integer match valid ranges = [0-15] Does not support prefilter Supports flow in both directions
dns.rcode matches the rcode header field in DNS messages It's an unsigned integer valid ranges = [0-15] Does not support prefilter Supports matches in both flow directions Task OISF#6621
dns.rcode matches the rcode header field in DNS messages It's an unsigned integer valid ranges = [0-15] Does not support prefilter Supports matches in both flow directions Task OISF#6621
Make sure these boxes are signed before submitting your Pull Request -- thank you.
Link to redmine ticket:
https://redmine.openinfosecfoundation.org/issues/4046
Ticket: #4046
Previous PR: #6619
Describe changes: