transfer.sh revision 295367
1#	$OpenBSD: transfer.sh,v 1.3 2015/03/03 22:35:19 markus Exp $
2#	Placed in the Public Domain.
3
4tid="transfer data"
5
6for p in ${SSH_PROTOCOLS}; do
7	verbose "$tid: proto $p"
8	rm -f ${COPY}
9	${SSH} -n -q -$p -F $OBJ/ssh_proxy somehost cat ${DATA} > ${COPY}
10	if [ $? -ne 0 ]; then
11		fail "ssh cat $DATA failed"
12	fi
13	cmp ${DATA} ${COPY}		|| fail "corrupted copy"
14
15	for s in 10 100 1k 32k 64k 128k 256k; do
16		trace "proto $p dd-size ${s}"
17		rm -f ${COPY}
18		dd if=$DATA obs=${s} 2> /dev/null | \
19			${SSH} -q -$p -F $OBJ/ssh_proxy somehost "cat > ${COPY}"
20		if [ $? -ne 0 ]; then
21			fail "ssh cat $DATA failed"
22		fi
23		cmp $DATA ${COPY}		|| fail "corrupted copy"
24	done
25done
26rm -f ${COPY}
27