dpdk-bond-mapping tests for DPDKTest bundle#1342
dpdk-bond-mapping tests for DPDKTest bundle#1342PanosKostopoulos wants to merge 1 commit intoopenstack-charmers:masterfrom
Conversation
| logging.info( | ||
| 'Verifying bond PCI addresses are whitelisted in dpdk-extra') | ||
| self._assert_dpdk_bond_pci_in_eal_args(bond_pci_addresses) | ||
|
|
There was a problem hiding this comment.
The PCI address is put in EAL args regardless of the use of dpdk-bond-mappings configuration option.
How is this a valid assertion?
| # self.disable_hugepages_vfio_on_hvs_in_vms() | ||
| # self._ovs_br_ex_port_is_system_interface() | ||
|
|
||
| def _test_dpdk_bond_mappings_pci_format(self): |
There was a problem hiding this comment.
Make this a separate def test_XXX method instead of this covert piggy-backing on existing tests.
The charm code will only actually populate the OVS database with bond configuration when there are more than one interface [0], so you likely need to enable the test harness to add multiple ports to the test VM as well as interrogate the environment and ensure there are enough ports available to run the test.
| """ | ||
| bond_pci_addresses = [] | ||
| for unit in zaza.model.get_units(self.application_name): | ||
| pci = self._get_br_ex_dpdk_pci_address(unit) |
There was a problem hiding this comment.
Basing input for your test assertion on data provided by the subject under test is not the safe thing to do, you should have the test code independently discover PCI addresses and/or MACs to use as input for the test so that you can accurately measure the output of the program.
| logging.warning( | ||
| 'Could not retrieve any PCI addresses for bond mapping test, ' | ||
| 'skipping') | ||
| return |
There was a problem hiding this comment.
This does not look safe, we'd likely want to know if this failed by having the test fail.
2daaedc to
ecd0056
Compare
ecd0056 to
0e5e0b1
Compare
DPDK tests for dpdk-bond-mappings ovn-chassis config option. This first iteration includes only PCI addresses, but should include also MAC addresses (the difference is there should be an extra lookup to get the PCI addresses from the mac).
The tests have extended the test_enable_dpdk function, in this first iteration, to avoid a second setup for dpdk. This could be moved (and maybe should) in a seperate test function.