|
5 | 5 |
|
6 | 6 | from mctp_test_utils import (
|
7 | 7 | mctpd_mctp_iface_obj,
|
| 8 | + mctpd_mctp_network_obj, |
8 | 9 | mctpd_mctp_endpoint_common_obj,
|
9 | 10 | mctpd_mctp_endpoint_control_obj
|
10 | 11 | )
|
@@ -455,3 +456,30 @@ async def test_query_message_types(dbus, mctpd):
|
455 | 456 | query_types.sort()
|
456 | 457 |
|
457 | 458 | assert ep_types == query_types
|
| 459 | + |
| 460 | +""" Network1.LocalEIDs should reflect locally-assigned EID state """ |
| 461 | +async def test_network_local_eids_single(dbus, mctpd): |
| 462 | + iface = mctpd.system.interfaces[0] |
| 463 | + |
| 464 | + net = await mctpd_mctp_network_obj(dbus, iface.net) |
| 465 | + eids = list(await net.get_local_eids()) |
| 466 | + |
| 467 | + assert eids == [8] |
| 468 | + |
| 469 | +async def test_network_local_eids_multiple(dbus, mctpd): |
| 470 | + iface = mctpd.system.interfaces[0] |
| 471 | + await mctpd.system.add_address(mctpd.system.Address(iface, 9)) |
| 472 | + |
| 473 | + net = await mctpd_mctp_network_obj(dbus, iface.net) |
| 474 | + eids = list(await net.get_local_eids()) |
| 475 | + |
| 476 | + assert eids == [8, 9] |
| 477 | + |
| 478 | +async def test_network_local_eids_none(dbus, mctpd): |
| 479 | + iface = mctpd.system.interfaces[0] |
| 480 | + await mctpd.system.del_address(mctpd.system.Address(iface, 8)) |
| 481 | + |
| 482 | + net = await mctpd_mctp_network_obj(dbus, iface.net) |
| 483 | + eids = list(await net.get_local_eids()) |
| 484 | + |
| 485 | + assert eids == [] |
0 commit comments