diff options
author | pmikus <pmikus@cisco.com> | 2020-09-23 12:44:06 +0000 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2020-09-23 12:52:07 +0000 |
commit | 632c71b4d20c9e775b1578c628879fa0f9dfdfb4 (patch) | |
tree | 6e0d45610588cfd31e4fe976d735043a523de313 /resources | |
parent | 025fae19ec43dc3f6bde367614c4a90168c85d7b (diff) |
FIX: Race condition
avf tests works, but vfio-pci tests are following, the interfaces must
be in down state (ideally unbind, as vpp cannot pick them).
Signed-off-by: pmikus <pmikus@cisco.com>
Change-Id: I77af85ec4239059a5455ef68683ca129548bd7bd
Diffstat (limited to 'resources')
-rw-r--r-- | resources/libraries/python/DUTSetup.py | 12 | ||||
-rw-r--r-- | resources/libraries/robot/shared/interfaces.robot | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/resources/libraries/python/DUTSetup.py b/resources/libraries/python/DUTSetup.py index ec0a796202..ad3f67b846 100644 --- a/resources/libraries/python/DUTSetup.py +++ b/resources/libraries/python/DUTSetup.py @@ -430,6 +430,18 @@ class DUTSetup: ) @staticmethod + def pci_driver_unbind_list(node, *pci_addrs): + """Unbind PCI devices from current driver on node. + + :param node: DUT node. + :param pci_addrs: PCI device addresses. + :type node: dict + :type pci_addrs: list + """ + for pci_addr in pci_addrs: + DUTSetup.pci_driver_unbind(node, pci_addr) + + @staticmethod def pci_driver_bind(node, pci_addr, driver): """Bind PCI device to driver on node. diff --git a/resources/libraries/robot/shared/interfaces.robot b/resources/libraries/robot/shared/interfaces.robot index cd14e8937e..4fdc1ee0a6 100644 --- a/resources/libraries/robot/shared/interfaces.robot +++ b/resources/libraries/robot/shared/interfaces.robot @@ -117,6 +117,8 @@ | | ${index}= | Get Index From List | ${TEST TAGS} | DPDK | | Run Keyword If | ${index} >= 0 | Return From Keyword | | FOR | ${dut} | IN | @{duts} +| | | Stop VPP Service | ${nodes['${dut}']} +| | | PCI Driver Unbind List | ${nodes['${dut}']} | @{${dut}_pf_pci} | | | Run keyword | ${dut}.Add DPDK Dev | @{${dut}_pf_pci} | | | Run Keyword If | ${dpdk_no_tx_checksum_offload} | | | ... | ${dut}.Add DPDK No Tx Checksum Offload |