24 echo 2 | update-alternatives --config nc &> /dev/null
26 [ -d $OUTPUT_DIR ] || mkdir -p $OUTPUT_DIR
28 #increase tests debugging
31 # listen for UDP packets on localhost, port 50000 (run in background)
32 for port in "${LISTENERS_PORTS[@]}"; do
33 $SERVER $IP $port $OUTPUT_DIR/testfile.$port &
35 ARGUMENTS="$IP $port $ARGUMENTS"
38 # wait for netcat to start listening
43 $CLIENT $FILE $ARGUMENTS
46 [ -e $file ] || continue
47 $CLIENT $file $ARGUMENTS
54 kill -9 $pid &> /dev/null