-
Notifications
You must be signed in to change notification settings - Fork 1.6k
dpdk: add initial unittests for DPDK codebase v10 #13971
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
Conversation
To better control the values within the variables and to prepare for the follow-up unit tests, the variable was moved into global scope and should accessed only by functions. This allows reinstantination of the variable value - needed for unit tests. Ticket: 6927
Needed by unit tests to properly reset the device list. Ticket: 6927
For the upcoming changes, skipping a unit test might be beneficial when testing a function that retrieves hardware data. This can e.g. depend on the number of CPU cores and systems that does not meet the required test criteria will need to omit the tests. The tests should always target minimal system requirements Ticket: 6927
The commit adds unit tests for mempool cache calculation. The DPDK mempool cache can be automatically calculated from the size of the mempool. The commit also adds unit tests for automatic thread distribution when multiple interfaces are present and when there is a possible overlap with management threads. Ticket: 6927
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #13971 +/- ##
==========================================
+ Coverage 83.87% 83.89% +0.02%
==========================================
Files 1011 1011
Lines 275561 275850 +289
==========================================
+ Hits 231128 231434 +306
+ Misses 44433 44416 -17
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
Information: QA ran without warnings. Pipeline = 27884 |
|
In what environment would I see tests skipped? |
|
In this case, it would be in environments with not enough CPUs to try some of the CPU affinity functions. |
|
Follow-up in #14113 |
Follow-up of #13957
Link to ticket: https://redmine.openinfosecfoundation.org/issues/6927
The PR is adding unit tests tailored to verify CPU threading logic and the automatic calculation of mempool cache of the interface.
Describe changes:
v2:
v1: