diff options
Diffstat (limited to 'doc/developer')
| -rw-r--r-- | doc/developer/lists.rst | 10 | ||||
| -rw-r--r-- | doc/developer/topotests.rst | 12 |
2 files changed, 17 insertions, 5 deletions
diff --git a/doc/developer/lists.rst b/doc/developer/lists.rst index 86db788c0e..553bd1f596 100644 --- a/doc/developer/lists.rst +++ b/doc/developer/lists.rst @@ -108,6 +108,8 @@ Functions provided: | _first, _next, _next_safe, | yes | yes | yes | yes | yes | | _const_first, _const_next | | | | | | +------------------------------------+------+------+------+---------+------------+ +| _swap_all | yes | yes | yes | yes | yes | ++------------------------------------+------+------+------+---------+------------+ | _add_head, _add_tail, _add_after | yes | -- | -- | -- | -- | +------------------------------------+------+------+------+---------+------------+ | _add | -- | yes | yes | yes | yes | @@ -322,6 +324,14 @@ The following documentation assumes that a list has been defined using return ``item``. The function may also call ``assert()`` (but most don't.) +.. c:function:: itemtype *Z_swap_all(struct Z_head *, struct Z_head *) + + Swap the contents of 2 containers (of identical type). This exchanges the + contents of the two head structures and updates pointers if necessary for + the particular data structure. Fast for all structures. + + (Not currently available on atomic containers.) + .. todo:: ``Z_del_after()`` / ``Z_del_hint()``? diff --git a/doc/developer/topotests.rst b/doc/developer/topotests.rst index a86566dbb0..dd797a6949 100644 --- a/doc/developer/topotests.rst +++ b/doc/developer/topotests.rst @@ -59,7 +59,7 @@ there are some errors in the upstream MIBS which need to be patched up. The following steps will get you there on Ubuntu 20.04. .. code:: shell - + apt install libsnmp-dev apt install snmpd snmp apt install snmp-mibs-downloader @@ -68,9 +68,9 @@ following steps will get you there on Ubuntu 20.04. wget http://pastebin.com/raw.php?i=p3QyuXzZ -O /usr/share/snmp/mibs/ietf/SNMPv2-PDU wget http://pastebin.com/raw.php?i=gG7j8nyk -O /usr/share/snmp/mibs/ietf/IPATM-IPMC-MIB edit /etc/snmp/snmp.conf to look like this - # As the snmp packages come without MIB files due to license reasons, loading - # of MIBs is disabled by default. If you added the MIBs you can reenable - # loading them by commenting out the following line. + # As the snmp packages come without MIB files due to license reasons, loading + # of MIBs is disabled by default. If you added the MIBs you can reenable + # loading them by commenting out the following line. mibs +ALL @@ -485,7 +485,7 @@ Some things to keep in mind: in BGP, the test should look for the peers reconverging instead of just sleeping an arbitrary amount of time and continuing on. It is ok to use sleep in a tight loop with appropriate show commands to ensure that - the protocol reaches the desired state. This should be bounded by + the protocol reaches the desired state. This should be bounded by appropriate timeouts for the protocol in question though. See verify_bgp_convergence as a good example of this. If you are having troubles figuring out what to look for, please do not be afraid to ask. @@ -882,6 +882,8 @@ Example: Requirements: +- Directory name for a new topotest must not contain hyphen (``-``) characters. + To separate words, use underscores (``_``). For example, `tests/topotests/bgp_new_example`. - Test code should always be declared inside functions that begin with the ``test_`` prefix. Functions beginning with different prefixes will not be run by pytest. |
