Unverified Commit 4c2bb680 authored by Jakob Görgen's avatar Jakob Görgen
Browse files

fixed nic eth vs pci interface bug

parent 6b024ca7
...@@ -67,15 +67,15 @@ class NICSim(PCIDevSim): ...@@ -67,15 +67,15 @@ class NICSim(PCIDevSim):
cmd = f"{inst.join_repo_base(relative_path=self._executable)} " cmd = f"{inst.join_repo_base(relative_path=self._executable)} "
pci_devices = self.filter_components_by_type(ty=sys_eth.EthSimpleNIC) pci_devices = self.filter_components_by_type(ty=sys_pcie.PCIeSimpleDevice)
assert len(pci_devices) == 1 assert len(pci_devices) == 1
socket = self._get_socket(inst=inst, interface=pci_devices[0]._eth_if) socket = self._get_socket(inst=inst, interface=pci_devices[0]._pci_if)
assert socket is not None and socket._type == inst_base.SockType.LISTEN assert socket is not None and socket._type == inst_base.SockType.LISTEN
cmd += f"{socket._path} " cmd += f"{socket._path} "
eth_devices = self.filter_components_by_type(ty=sys_pcie.PCIeSimpleDevice) eth_devices = self.filter_components_by_type(ty=sys_eth.EthSimpleNIC)
assert len(eth_devices) == 1 assert len(eth_devices) == 1
socket = self._get_socket(inst=inst, interface=eth_devices[0]._pci_if) socket = self._get_socket(inst=inst, interface=eth_devices[0]._eth_if)
assert socket is not None and socket._type == inst_base.SockType.LISTEN assert socket is not None and socket._type == inst_base.SockType.LISTEN
cmd += f"{socket._path} " cmd += f"{socket._path} "
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment