-
Notifications
You must be signed in to change notification settings - Fork 192
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
Adds/corrects more SNMP sysDescr fingerprints #58
Conversation
<description>Digital/Compaq/HP Tru64 Unix</description> | ||
<example>clima.igpsdfpe COMPAQ AlphaServer DS20E 500 MHz Digital UNIX V4.0F (Rev. 1229); Mon Apr 12 13:30:41 EDT 1999 TCP/IP</example> |
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.
What was the driver for removing these examples?
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.
My preference is to have as many examples as possible that test what the regular expression is designed to handle but as few as necessary. All of these are basically the same in that they don't each test something particular in the fingerprint that others don't. For example, if all that differs between two examples it the version and the hostname, and the regular expression captures both fields the same way in both examples, there is little point in having the second example.
There is also a performance hit here. Part of the unit tests test that any given example
only matches the fingerprint
in which it was specified, which means trying to match every example
against every fingerprint
pattern specified before its enclosing fingerprint
.
I don't believe we are losing any test coverage here but feel free to point out any instances that you see.
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.
Got it thanks, will eyeball them once more for unique test cases that might have been lost
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.
A few unique examples are lost, but they don't make a difference to the pattern.
Adds/corrects more SNMP sysDescr fingerprints
/CC @alynn71 @gwiseman-r7