Skip to content
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

Write tests to discover smidump files with invalid content #2501

Closed
lunkwill42 opened this issue Nov 10, 2022 · 0 comments · Fixed by #2521
Closed

Write tests to discover smidump files with invalid content #2501

lunkwill42 opened this issue Nov 10, 2022 · 0 comments · Fixed by #2521
Assignees

Comments

@lunkwill42
Copy link
Member

Sometimes, humans (and even machines) make mistakes, and the Python modules produced by the smidump program contain invalid data. E.g. if the MIB module being dumped depends on other modules that aren't available to smidump, it might produce a full dump that contains incomplete OIDs, such as was the case in #2494.

We should have at least one test generator that produces a test for every smidump module in NAV and test all the OIDs in that file for validity.

The issue with #2494 was that the OID's lacked a proper prefix, causing them all to start with 0.. The NET-SNMP library (underlying pynetsnmp-2) refused to build ASN.1 representations of these OIDs, so somehow utilizing NET-SNMP to verify valid OIDs would be prudent.

Originally posted by @lunkwill42 in #2494 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant