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:
- Execute nfd-status. Check the existence of udp4/udp6/ether multicast faces.
- Invoke nfdc create tcp://$IP4_B1. Pause 2 seconds for connection establishment.
- Execute nfd-status. Check the existence of new tcp4 face.
- Invoke nfdc create tcp://[$IP6_B1]. Pause 2 seconds for connection establishment.
- Execute nfd-status. Check the existence of new tcp6 face.
- Invoke nfdc create udp://$IP4_B1. Pause 2 seconds for connection establishment.
- Execute nfd-status. Check the existence of new udp4 face.
- Invoke nfdc create udp://[$IP6_B1]. Pause 2 seconds for connection establishment.
- Execute nfd-status. Check the existence of new udp6 face.
- Invoke nfdc to add a nexthop for ndn:/test-nfdc with cost 24 toward FaceId created in step 3.
- Invoke nfdc to add a nexthop for ndn:/test-nfdc with cost 26 toward FaceId created in step 5.
- Invoke nfdc to add a nexthop for ndn:/test-nfdc with cost 14 toward FaceId created in step 7.
- Invoke nfdc to add a nexthop for ndn:/test-nfdc with cost 16 toward FaceId created in step 9.
- Execute nfd-status. Check the existence of ndn:/test-nfdc FIB entry, and the correctness of cost on nexthop records.
- Invoke nfdc to choose BroadcastStrategy for ndn:/ namespace.
- Invoke ndnping to send 100 Interests under ndn:/test-nfdc prefix.
- Pause 50ms before sending each Interest.
- Execute nfd-status. Verify NOutInterests counters of faces created in step 3,5,7,9 are greater than 60.
- 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.
- Invoke nfdc to destroy FaceIds created in step 3,5.
- 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:
- Invoke nfdc add-nexthop -c 44 ndn:/test-nfdc udp4://$IP4_B1. Pause 2 seconds for connection establishment.
- 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.
- Invoke nfdc to remove the nexthop for FaceId seen in step 3.
- 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:
- run nrd on host A
- Invoke nfdc register -c 55 ndn:/test-nfdc udp4://$IP4_B1. Pause 2 seconds for connection establishment.
- 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.
- Invoke nfdc to unregister the prefix ndn:/test-nfdc for FaceId seen in step 3.
- Execute nfd-status. Check the non-existence of ndn:/test-nfdc FIB entry.