#!/usr/bin/env bash ################################################################################ # Test objective: check if we can send packets through netmap pipes while using # extra buffers. # Operations: # 0) restart fd_server to have a clean starting state # 1) create a pair of netmap pipes (pipeA{1, pipeA}1). # 2) send from pipeA{1 using extra buffers and check if pipeA}1 receives. ################################################################################ source test_lib parse_send_recv_arguments "$@" verbosity="${verbosity:-}" fill="${fill:-c}" len="${len:-274}" num="${num:-1}" seq="${seq:-}" e_buf_num="${e_buf_num:-12}" restart_fd_server # Pre-opening interface that will be needed. This is needed to avoid a race # condition between the sending and receiving ports. functional $verbosity -i "netmap:pipeA{1" check_success $? "pre-open netmap:pipeA{1" # pipeA}1 ---> pipeA{1 functional $verbosity -i "netmap:pipeA{1" -r "${len}:${fill}:${num}" $seq & p1=$! functional $verbosity -I "netmap:pipeA}1" -t "${len}:${fill}:${num}" -e "$e_buf_num" $seq e2=$? wait $p1 e1=$? check_success $e1 "receive-${num} netmap:pipeA{1" check_success $e2 "send-${num} netmap:pipeA}1" test_successful "$0"