blob: 3e33002bff58e18d0cfd64f629b7330778ef93d3 [file] [log] [blame]
#!/usr/bin/env bash
workDir=$1
testLog=$workDir/logs/nfdc_test.log
source $workDir/../multi-host.conf
source $workDir/include.sh
#compress IPv6
IP6_A1=$(python -c "import sys; import socket; result = socket.getaddrinfo('$IP6_A1', None); family, socktype, proto, canonname,(address, port, flow_info, scope_id) = result[0]; print address")
remoteFaceIdUdp4=$(check_nfdc_face_existence none udp4://$IP4_A1)
if [[ -z "$remoteFaceIdUdp4" ]]; then
exit 3
fi
remoteFaceIdTcp4=$(check_nfdc_face_existence none tcp4://$IP4_A1)
if [[ -z "$remoteFaceIdTcp4" ]]; then
exit 3
fi
remoteFaceIdUdp6=$(check_nfdc_face_existence none udp6://[$IP6_A1])
if [[ -z "$remoteFaceIdUdp6" ]]; then
exit 3
fi
remoteFaceIdTcp6=$(check_nfdc_face_existence none tcp6://[$IP6_A1])
if [[ -z "$remoteFaceIdTcp6" ]]; then
exit 3
fi
check_nfdc_face_counters $remoteFaceIdUdp4 udp4://$IP4_A1 'in' $NUM_OF_PINGS
if [[ $? -ne 0 ]]; then
exit 3
fi
check_nfdc_face_counters $remoteFaceIdTcp4 tcp4://$IP4_A1 'in' $NUM_OF_PINGS
if [[ $? -ne 0 ]]; then
exit 3
fi
check_nfdc_face_counters $remoteFaceIdUdp6 udp6://[$IP6_A1] 'in' $NUM_OF_PINGS
if [[ $? -ne 0 ]]; then
exit 3
fi
check_nfdc_face_counters $remoteFaceIdTcp6 tcp6://[$IP6_A1] 'in' $NUM_OF_PINGS
if [[ $? -ne 0 ]]; then
exit 3
fi
exit 0