1#!/bin/sh 2# $FreeBSD$ 3 4cd `dirname $0` 5cmd="./`basename $0 .t`" 6 7make ${cmd} >/dev/null 2>&1 8 9IFS= 10n=0 11 12run() 13{ 14 result=`${cmd} -t $2 $3 $4 2>&1` 15 if [ $? -eq 0 ]; then 16 echo -n "ok $1" 17 else 18 echo -n "not ok $1" 19 fi 20 echo " -" $5 21 echo ${result} | grep -E "SERVER|CLIENT" | while read line; do 22 echo "# ${line}" 23 done 24} 25 26echo "1..15" 27 28for desc in \ 29 "Sending, receiving cmsgcred" \ 30 "Receiving sockcred (listening socket has LOCAL_CREDS) # TODO" \ 31 "Receiving sockcred (accepted socket has LOCAL_CREDS) # TODO" \ 32 "Sending cmsgcred, receiving sockcred # TODO" \ 33 "Sending, receiving timestamp" 34do 35 n=`expr ${n} + 1` 36 run ${n} stream "" ${n} "STREAM ${desc}" 37done 38 39i=0 40for desc in \ 41 "Sending, receiving cmsgcred" \ 42 "Receiving sockcred # TODO" \ 43 "Sending cmsgcred, receiving sockcred # TODO" \ 44 "Sending, receiving timestamp" 45do 46 i=`expr ${i} + 1` 47 n=`expr ${n} + 1` 48 run ${n} dgram "" ${i} "DGRAM ${desc}" 49done 50 51run 10 stream -z 1 "STREAM Sending, receiving cmsgcred (no control data)" 52run 11 stream -z 4 "STREAM Sending cmsgcred, receiving sockcred (no control data) # TODO" 53run 12 stream -z 5 "STREAM Sending, receiving timestamp (no control data)" 54 55run 13 dgram -z 1 "DGRAM Sending, receiving cmsgcred (no control data)" 56run 14 dgram -z 3 "DGRAM Sending cmsgcred, receiving sockcred (no control data) # TODO" 57run 15 dgram -z 4 "DGRAM Sending, receiving timestamp (no control data)" 58