tree: 1d3e1e0ef670a8b1f68fe14daa2efedcdc9e2deb [path history] [tgz]
  1. __init__.py
  2. include.sh
  3. nfdc-test.sh
  4. README.md
  5. test-B.sh
  6. test_nfdc.py
test_nfdc/README.md

Test Case - nfdc and nfd-status

Topology

A-B connected on same IPv4 subnet and same IPv6 subnet. Both are NDN nodes.

Script is invoked on host A. multi-host.conf defines: CTRL_B, IP4_A1, IP6_A1, IP4_B1, IP6_B1

Description

The script runs 3 test cases: A: Test nfdc create / add-nexthop / destroy test case B: Test nfdc add-nexthop / remove-nexthop test case C: Test nfdc register / unregister test case

In case of a failure, the detailed log can be found under: A: test_nfdc/log/nfdc_test_A.log B: test_nfdc/log/nfdc_test_B.log C: test_nfdc/log/nfdc_test_C.log

Test case A: Test nfdc create / add-nexthop / destroy test case

Start NFD on host A and B. On host A, run the following steps:

  1. Execute nfd-status. Check the existence of udp4/udp6/ether multicast faces.
  2. Invoke nfdc create tcp://$IP4_B1. Pause 2 seconds for connection establishment.
  3. Execute nfd-status. Check the existence of new tcp4 face.
  4. Invoke nfdc create tcp://[$IP6_B1]. Pause 2 seconds for connection establishment.
  5. Execute nfd-status. Check the existence of new tcp6 face.
  6. Invoke nfdc create udp://$IP4_B1. Pause 2 seconds for connection establishment.
  7. Execute nfd-status. Check the existence of new udp4 face.
  8. Invoke nfdc create udp://[$IP6_B1]. Pause 2 seconds for connection establishment.
  9. Execute nfd-status. Check the existence of new udp6 face.
  10. Invoke nfdc to add a nexthop for ndn:/test-nfdc with cost 24 toward FaceId created in step 3.
  11. Invoke nfdc to add a nexthop for ndn:/test-nfdc with cost 26 toward FaceId created in step 5.
  12. Invoke nfdc to add a nexthop for ndn:/test-nfdc with cost 14 toward FaceId created in step 7.
  13. Invoke nfdc to add a nexthop for ndn:/test-nfdc with cost 16 toward FaceId created in step 9.
  14. Execute nfd-status. Check the existence of ndn:/test-nfdc FIB entry, and the correctness of cost on nexthop records.
  15. Invoke nfdc to choose BroadcastStrategy for ndn:/ namespace.
  16. Invoke ndnping to send 100 Interests under ndn:/test-nfdc prefix.
  17. Pause 50ms before sending each Interest.
  18. Execute nfd-status. Verify NOutInterests counters of faces created in step 3,5,7,9 are greater than 60.
  19. On host B, execute nfd-status. Check the existence of tcp4, tcp6, udp4, udp6 faces with host A's address. Verify NInInterests counters for those faces are greater than 60.
  20. Invoke nfdc to destroy FaceIds created in step 3,5.
  21. Execute nfd-status. Check the non-existence of tcp4 and tcp6 faces.

Test case B: Test nfdc add-nexthop / remove-nexthop test case

Start NFD on host A and B. On host A, run the following steps:

  1. Invoke nfdc add-nexthop -c 44 ndn:/test-nfdc udp4://$IP4_B1. Pause 2 seconds for connection establishment.
  2. Execute nfd-status. Check the existence of new udp4 face. Check the existence of ndn:/test-nfdc FIB entry, and the correctness of cost on nexthop records.
  3. Invoke nfdc to remove the nexthop for FaceId seen in step 3.
  4. Execute nfd-status. Check the non-existence of ndn:/test-nfdc FIB entry.

Test case C: Test nfdc register / unregister test case

Start NFD on host A and B. On host A, run the following steps:

  1. run nrd on host A
  2. Invoke nfdc register -c 55 ndn:/test-nfdc udp4://$IP4_B1. Pause 2 seconds for connection establishment.
  3. Execute nfd-status. Check the existence of new udp4 face. Check the existence of ndn:/test-nfdc FIB entry, and the correctness of cost on nexthop records.
  4. Invoke nfdc to unregister the prefix ndn:/test-nfdc for FaceId seen in step 3.
  5. Execute nfd-status. Check the non-existence of ndn:/test-nfdc FIB entry.