xref: /freebsd/crypto/openssh/regress/transfer.sh (revision 59c8e88e72633afbc47a4ace0d2170d00d51f7dc)
1#	$OpenBSD: transfer.sh,v 1.4 2017/04/30 23:34:55 djm Exp $
2#	Placed in the Public Domain.
3
4tid="transfer data"
5
6rm -f ${COPY}
7${SSH} -n -q -F $OBJ/ssh_proxy somehost cat ${DATA} > ${COPY}
8if [ $? -ne 0 ]; then
9	fail "ssh cat $DATA failed"
10fi
11cmp ${DATA} ${COPY}		|| fail "corrupted copy"
12
13for s in 10 100 1k 32k 64k 128k 256k; do
14	trace "dd-size ${s}"
15	rm -f ${COPY}
16	dd if=$DATA obs=${s} 2> /dev/null | \
17		${SSH} -q -F $OBJ/ssh_proxy somehost "cat > ${COPY}"
18	if [ $? -ne 0 ]; then
19		fail "ssh cat $DATA failed"
20	fi
21	cmp $DATA ${COPY}		|| fail "corrupted copy"
22done
23rm -f ${COPY}
24