~ubuntu-branches/ubuntu/edgy/openssh/edgy

« back to all changes in this revision

Viewing changes to regress/transfer.sh

  • Committer: Bazaar Package Importer
  • Author(s): Noah Meyerhans
  • Date: 2006-10-31 17:53:38 UTC
  • Revision ID: james.westby@ubuntu.com-20061031175338-kh299ada2qc2kzlb
Tags: upstream-3.8.1p1
ImportĀ upstreamĀ versionĀ 3.8.1p1

Show diffs side-by-side

added added

removed removed

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