diff options
author | Darren Tucker <dtucker@cvs.openbsd.org> | 2013-05-17 04:29:15 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@cvs.openbsd.org> | 2013-05-17 04:29:15 +0000 |
commit | 8f5d94d6e07b03186eb05fbda73848d4d2eced31 (patch) | |
tree | 9a19ee43838caf149c37cb88c0a0e5bec580114e | |
parent | f72fa7ada1c97e947992c262ebfcf4bfd85023fe (diff) |
Move the setting of DATA and COPY into test-exec.sh
-rw-r--r-- | regress/usr.bin/ssh/cipher-speed.sh | 4 | ||||
-rw-r--r-- | regress/usr.bin/ssh/conch-ciphers.sh | 5 | ||||
-rw-r--r-- | regress/usr.bin/ssh/dynamic-forward.sh | 8 | ||||
-rw-r--r-- | regress/usr.bin/ssh/forwarding.sh | 8 | ||||
-rw-r--r-- | regress/usr.bin/ssh/multiplex.sh | 4 | ||||
-rw-r--r-- | regress/usr.bin/ssh/putty-ciphers.sh | 5 | ||||
-rw-r--r-- | regress/usr.bin/ssh/putty-kex.sh | 5 | ||||
-rw-r--r-- | regress/usr.bin/ssh/putty-transfer.sh | 5 | ||||
-rw-r--r-- | regress/usr.bin/ssh/reexec.sh | 4 | ||||
-rw-r--r-- | regress/usr.bin/ssh/rekey.sh | 7 | ||||
-rw-r--r-- | regress/usr.bin/ssh/scp.sh | 4 | ||||
-rw-r--r-- | regress/usr.bin/ssh/sftp-badcmds.sh | 4 | ||||
-rw-r--r-- | regress/usr.bin/ssh/sftp-batch.sh | 4 | ||||
-rw-r--r-- | regress/usr.bin/ssh/sftp-chroot.sh | 4 | ||||
-rw-r--r-- | regress/usr.bin/ssh/sftp-cmds.sh | 4 | ||||
-rw-r--r-- | regress/usr.bin/ssh/sftp.sh | 5 | ||||
-rw-r--r-- | regress/usr.bin/ssh/ssh-com-client.sh | 6 | ||||
-rw-r--r-- | regress/usr.bin/ssh/ssh-com-sftp.sh | 5 | ||||
-rw-r--r-- | regress/usr.bin/ssh/stderr-after-eof.sh | 6 | ||||
-rw-r--r-- | regress/usr.bin/ssh/stderr-data.sh | 6 | ||||
-rw-r--r-- | regress/usr.bin/ssh/test-exec.sh | 11 | ||||
-rw-r--r-- | regress/usr.bin/ssh/transfer.sh | 5 |
22 files changed, 38 insertions, 81 deletions
diff --git a/regress/usr.bin/ssh/cipher-speed.sh b/regress/usr.bin/ssh/cipher-speed.sh index 262cb2cf771..63d59b3bea3 100644 --- a/regress/usr.bin/ssh/cipher-speed.sh +++ b/regress/usr.bin/ssh/cipher-speed.sh @@ -1,4 +1,4 @@ -# $OpenBSD: cipher-speed.sh,v 1.8 2013/05/17 00:37:40 dtucker Exp $ +# $OpenBSD: cipher-speed.sh,v 1.9 2013/05/17 04:29:14 dtucker Exp $ # Placed in the Public Domain. tid="cipher speed" @@ -9,8 +9,6 @@ getbytes () } tries="1 2" -DATA=/bin/ls -DATA=/bsd ciphers="aes128-cbc 3des-cbc blowfish-cbc cast128-cbc arcfour128 arcfour256 arcfour diff --git a/regress/usr.bin/ssh/conch-ciphers.sh b/regress/usr.bin/ssh/conch-ciphers.sh index 84b19061892..1b48e79b442 100644 --- a/regress/usr.bin/ssh/conch-ciphers.sh +++ b/regress/usr.bin/ssh/conch-ciphers.sh @@ -1,11 +1,8 @@ -# $OpenBSD: conch-ciphers.sh,v 1.2 2008/06/30 10:43:03 djm Exp $ +# $OpenBSD: conch-ciphers.sh,v 1.3 2013/05/17 04:29:14 dtucker Exp $ # Placed in the Public Domain. tid="conch ciphers" -DATA=/bin/ls -COPY=${OBJ}/copy - if test "x$REGRESS_INTEROP_CONCH" != "xyes" ; then fatal "conch interop tests not enabled" fi diff --git a/regress/usr.bin/ssh/dynamic-forward.sh b/regress/usr.bin/ssh/dynamic-forward.sh index bfb518d65b3..607c8472cb2 100644 --- a/regress/usr.bin/ssh/dynamic-forward.sh +++ b/regress/usr.bin/ssh/dynamic-forward.sh @@ -1,4 +1,4 @@ -# $OpenBSD: dynamic-forward.sh,v 1.9 2011/06/03 00:29:52 dtucker Exp $ +# $OpenBSD: dynamic-forward.sh,v 1.10 2013/05/17 04:29:14 dtucker Exp $ # Placed in the Public Domain. tid="dynamic forwarding" @@ -41,9 +41,9 @@ for p in 1 2; do trace "testing ssh protocol $p socks version $s host $h" ${SSH} -F $OBJ/ssh_config \ -o "ProxyCommand ${proxycmd}${s} $h $PORT" \ - somehost cat /bin/ls > $OBJ/ls.copy - test -f $OBJ/ls.copy || fail "failed copy /bin/ls" - cmp /bin/ls $OBJ/ls.copy || fail "corrupted copy of /bin/ls" + somehost cat ${DATA} > ${COPY} + test -f ${COPY} || fail "failed copy ${DATA}" + cmp ${DATA} ${COPY} || fail "corrupted copy of ${DATA}" done done diff --git a/regress/usr.bin/ssh/forwarding.sh b/regress/usr.bin/ssh/forwarding.sh index c64ef5c87a5..2ba140feedc 100644 --- a/regress/usr.bin/ssh/forwarding.sh +++ b/regress/usr.bin/ssh/forwarding.sh @@ -1,4 +1,4 @@ -# $OpenBSD: forwarding.sh,v 1.9 2013/04/07 02:16:03 dtucker Exp $ +# $OpenBSD: forwarding.sh,v 1.10 2013/05/17 04:29:14 dtucker Exp $ # Placed in the Public Domain. tid="local and remote forwarding" @@ -25,9 +25,9 @@ for p in 1 2; do trace "transfer over forwarded channels and check result" ${SSH} -$q -F $OBJ/ssh_config -p$last -o 'ConnectionAttempts=4' \ - somehost cat /bin/ls > $OBJ/ls.copy - test -f $OBJ/ls.copy || fail "failed copy /bin/ls" - cmp /bin/ls $OBJ/ls.copy || fail "corrupted copy of /bin/ls" + somehost cat ${DATA} > ${COPY} + test -f ${COPY} || fail "failed copy of ${DATA}" + cmp ${DATA} ${COPY} || fail "corrupted copy of ${DATA}" sleep 10 done diff --git a/regress/usr.bin/ssh/multiplex.sh b/regress/usr.bin/ssh/multiplex.sh index bdf68e69073..41d9ad2bae8 100644 --- a/regress/usr.bin/ssh/multiplex.sh +++ b/regress/usr.bin/ssh/multiplex.sh @@ -1,12 +1,10 @@ -# $OpenBSD: multiplex.sh,v 1.20 2013/04/22 07:28:53 dtucker Exp $ +# $OpenBSD: multiplex.sh,v 1.21 2013/05/17 04:29:14 dtucker Exp $ # Placed in the Public Domain. CTL=$OBJ/ctl-sock tid="connection multiplexing" -DATA=/bin/ls -COPY=$OBJ/ls.copy P=3301 # test port wait_for_mux_master_ready() diff --git a/regress/usr.bin/ssh/putty-ciphers.sh b/regress/usr.bin/ssh/putty-ciphers.sh index 44105362742..2b32196bfac 100644 --- a/regress/usr.bin/ssh/putty-ciphers.sh +++ b/regress/usr.bin/ssh/putty-ciphers.sh @@ -1,11 +1,8 @@ -# $OpenBSD: putty-ciphers.sh,v 1.3 2008/11/10 02:06:35 djm Exp $ +# $OpenBSD: putty-ciphers.sh,v 1.4 2013/05/17 04:29:14 dtucker Exp $ # Placed in the Public Domain. tid="putty ciphers" -DATA=/bin/ls -COPY=${OBJ}/copy - if test "x$REGRESS_INTEROP_PUTTY" != "xyes" ; then fatal "putty interop tests not enabled" fi diff --git a/regress/usr.bin/ssh/putty-kex.sh b/regress/usr.bin/ssh/putty-kex.sh index 2534b857532..72d8eb59c7c 100644 --- a/regress/usr.bin/ssh/putty-kex.sh +++ b/regress/usr.bin/ssh/putty-kex.sh @@ -1,11 +1,8 @@ -# $OpenBSD: putty-kex.sh,v 1.2 2008/06/30 10:31:11 djm Exp $ +# $OpenBSD: putty-kex.sh,v 1.3 2013/05/17 04:29:14 dtucker Exp $ # Placed in the Public Domain. tid="putty KEX" -DATA=/bin/ls -COPY=${OBJ}/copy - if test "x$REGRESS_INTEROP_PUTTY" != "xyes" ; then fatal "putty interop tests not enabled" fi diff --git a/regress/usr.bin/ssh/putty-transfer.sh b/regress/usr.bin/ssh/putty-transfer.sh index 6b21f3be72b..ec212d7136c 100644 --- a/regress/usr.bin/ssh/putty-transfer.sh +++ b/regress/usr.bin/ssh/putty-transfer.sh @@ -1,11 +1,8 @@ -# $OpenBSD: putty-transfer.sh,v 1.2 2008/06/30 10:31:11 djm Exp $ +# $OpenBSD: putty-transfer.sh,v 1.3 2013/05/17 04:29:14 dtucker Exp $ # Placed in the Public Domain. tid="putty transfer data" -DATA=/bin/ls -COPY=${OBJ}/copy - if test "x$REGRESS_INTEROP_PUTTY" != "xyes" ; then fatal "putty interop tests not enabled" fi diff --git a/regress/usr.bin/ssh/reexec.sh b/regress/usr.bin/ssh/reexec.sh index d69b8c57798..726effcdd2e 100644 --- a/regress/usr.bin/ssh/reexec.sh +++ b/regress/usr.bin/ssh/reexec.sh @@ -1,10 +1,8 @@ -# $OpenBSD: reexec.sh,v 1.5 2004/10/08 02:01:50 djm Exp $ +# $OpenBSD: reexec.sh,v 1.6 2013/05/17 04:29:14 dtucker Exp $ # Placed in the Public Domain. tid="reexec tests" -DATA=/bin/ls -COPY=${OBJ}/copy SSHD_ORIG=$SSHD SSHD_COPY=$OBJ/sshd diff --git a/regress/usr.bin/ssh/rekey.sh b/regress/usr.bin/ssh/rekey.sh index 458c15952d6..8eb7efaf9e4 100644 --- a/regress/usr.bin/ssh/rekey.sh +++ b/regress/usr.bin/ssh/rekey.sh @@ -1,14 +1,11 @@ -# $OpenBSD: rekey.sh,v 1.7 2013/05/16 05:48:31 dtucker Exp $ +# $OpenBSD: rekey.sh,v 1.8 2013/05/17 04:29:14 dtucker Exp $ # Placed in the Public Domain. tid="rekey" -DATA=${OBJ}/data -COPY=${OBJ}/copy LOG=${TEST_SSH_LOGFILE} -rm -f ${COPY} ${LOG} ${DATA} -dd if=/dev/zero of=${DATA} bs=1k count=512 > /dev/null 2>&1 +rm -f ${LOG} for s in 16 1k 128k 256k; do verbose "client rekeylimit ${s}" diff --git a/regress/usr.bin/ssh/scp.sh b/regress/usr.bin/ssh/scp.sh index 5e653158452..1cc05c96022 100644 --- a/regress/usr.bin/ssh/scp.sh +++ b/regress/usr.bin/ssh/scp.sh @@ -1,12 +1,10 @@ -# $OpenBSD: scp.sh,v 1.7 2006/01/31 10:36:33 djm Exp $ +# $OpenBSD: scp.sh,v 1.8 2013/05/17 04:29:14 dtucker Exp $ # Placed in the Public Domain. tid="scp" #set -x -DATA=/bin/ls -COPY=${OBJ}/copy COPY2=${OBJ}/copy2 DIR=${COPY}.dd DIR2=${COPY}.dd2 diff --git a/regress/usr.bin/ssh/sftp-badcmds.sh b/regress/usr.bin/ssh/sftp-badcmds.sh index 3d46b48f143..d6f104ff7a0 100644 --- a/regress/usr.bin/ssh/sftp-badcmds.sh +++ b/regress/usr.bin/ssh/sftp-badcmds.sh @@ -1,12 +1,10 @@ -# $OpenBSD: sftp-badcmds.sh,v 1.4 2009/08/13 01:11:55 djm Exp $ +# $OpenBSD: sftp-badcmds.sh,v 1.5 2013/05/17 04:29:14 dtucker Exp $ # Placed in the Public Domain. tid="sftp invalid commands" -DATA=/bin/ls DATA2=/bin/cat NONEXIST=/NONEXIST.$$ -COPY=${OBJ}/copy GLOBFILES=`(cd /bin;echo l*)` rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd ${BATCH}.* diff --git a/regress/usr.bin/ssh/sftp-batch.sh b/regress/usr.bin/ssh/sftp-batch.sh index 2a251507c05..41011549bc4 100644 --- a/regress/usr.bin/ssh/sftp-batch.sh +++ b/regress/usr.bin/ssh/sftp-batch.sh @@ -1,10 +1,8 @@ -# $OpenBSD: sftp-batch.sh,v 1.4 2009/08/13 01:11:55 djm Exp $ +# $OpenBSD: sftp-batch.sh,v 1.5 2013/05/17 04:29:14 dtucker Exp $ # Placed in the Public Domain. tid="sftp batchfile" -DATA=/bin/ls -COPY=${OBJ}/copy BATCH=${OBJ}/sftp.bb rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd ${BATCH}.* diff --git a/regress/usr.bin/ssh/sftp-chroot.sh b/regress/usr.bin/ssh/sftp-chroot.sh index 8c07979b4a0..98a364ebf82 100644 --- a/regress/usr.bin/ssh/sftp-chroot.sh +++ b/regress/usr.bin/ssh/sftp-chroot.sh @@ -1,9 +1,8 @@ -# $OpenBSD: sftp-chroot.sh,v 1.1 2013/04/18 02:46:12 djm Exp $ +# $OpenBSD: sftp-chroot.sh,v 1.2 2013/05/17 04:29:14 dtucker Exp $ # Placed in the Public Domain. tid="sftp in chroot" -COPY=${OBJ}/copy CHROOT=/var/run FILENAME=testdata_${USER} PRIVDATA=${CHROOT}/${FILENAME} @@ -18,7 +17,6 @@ $SUDO sh -c "echo mekmitastdigoat > $PRIVDATA" || \ start_sshd -oChrootDirectory=$CHROOT -oForceCommand="internal-sftp -d /" verbose "test $tid: get" -rm -f ${COPY} ${SFTP} -qS "$SSH" -F $OBJ/ssh_config host:/${FILENAME} $COPY || \ fatal "Fetch ${FILENAME} failed" cmp $PRIVDATA $COPY || fail "$PRIVDATA $COPY differ" diff --git a/regress/usr.bin/ssh/sftp-cmds.sh b/regress/usr.bin/ssh/sftp-cmds.sh index d5ddc2d6867..eefeb20ddd0 100644 --- a/regress/usr.bin/ssh/sftp-cmds.sh +++ b/regress/usr.bin/ssh/sftp-cmds.sh @@ -1,4 +1,4 @@ -# $OpenBSD: sftp-cmds.sh,v 1.12 2012/06/01 00:52:52 djm Exp $ +# $OpenBSD: sftp-cmds.sh,v 1.13 2013/05/17 04:29:14 dtucker Exp $ # Placed in the Public Domain. # XXX - TODO: @@ -7,8 +7,6 @@ tid="sftp commands" -DATA=/bin/ls -COPY=${OBJ}/copy GLOBFILES=`(cd /bin;echo l*)` # Path with embedded quote diff --git a/regress/usr.bin/ssh/sftp.sh b/regress/usr.bin/ssh/sftp.sh index 08c365fba6e..37a06cab3b0 100644 --- a/regress/usr.bin/ssh/sftp.sh +++ b/regress/usr.bin/ssh/sftp.sh @@ -1,11 +1,8 @@ -# $OpenBSD: sftp.sh,v 1.3 2009/08/13 01:11:55 djm Exp $ +# $OpenBSD: sftp.sh,v 1.4 2013/05/17 04:29:14 dtucker Exp $ # Placed in the Public Domain. tid="basic sftp put/get" -DATA=/bin/ls -COPY=${OBJ}/copy - BUFFERSIZE="5 1000 32000 64000" REQUESTS="1 2 10" diff --git a/regress/usr.bin/ssh/ssh-com-client.sh b/regress/usr.bin/ssh/ssh-com-client.sh index 7dbe18de8ba..e4f80cf0aad 100644 --- a/regress/usr.bin/ssh/ssh-com-client.sh +++ b/regress/usr.bin/ssh/ssh-com-client.sh @@ -1,4 +1,4 @@ -# $OpenBSD: ssh-com-client.sh,v 1.6 2004/02/24 17:06:52 markus Exp $ +# $OpenBSD: ssh-com-client.sh,v 1.7 2013/05/17 04:29:14 dtucker Exp $ # Placed in the Public Domain. tid="connect with ssh.com client" @@ -67,10 +67,6 @@ EOF # we need a real server (no ProxyConnect option) start_sshd -DATA=/bin/ls -COPY=${OBJ}/copy -rm -f ${COPY} - # go for it for v in ${VERSIONS}; do ssh2=${TEST_COMBASE}/${v}/ssh2 diff --git a/regress/usr.bin/ssh/ssh-com-sftp.sh b/regress/usr.bin/ssh/ssh-com-sftp.sh index d2ddf348505..947ace06fd9 100644 --- a/regress/usr.bin/ssh/ssh-com-sftp.sh +++ b/regress/usr.bin/ssh/ssh-com-sftp.sh @@ -1,11 +1,8 @@ -# $OpenBSD: ssh-com-sftp.sh,v 1.6 2009/08/20 18:43:07 djm Exp $ +# $OpenBSD: ssh-com-sftp.sh,v 1.7 2013/05/17 04:29:14 dtucker Exp $ # Placed in the Public Domain. tid="basic sftp put/get with ssh.com server" -DATA=/bin/ls -COPY=${OBJ}/copy - BUFFERSIZE="5 1000 32000 64000" REQUESTS="1 2 10" diff --git a/regress/usr.bin/ssh/stderr-after-eof.sh b/regress/usr.bin/ssh/stderr-after-eof.sh index cd1e66d571b..218ac6b68e1 100644 --- a/regress/usr.bin/ssh/stderr-after-eof.sh +++ b/regress/usr.bin/ssh/stderr-after-eof.sh @@ -1,12 +1,8 @@ -# $OpenBSD: stderr-after-eof.sh,v 1.1 2002/03/23 16:38:09 markus Exp $ +# $OpenBSD: stderr-after-eof.sh,v 1.2 2013/05/17 04:29:14 dtucker Exp $ # Placed in the Public Domain. tid="stderr data after eof" -DATA=/etc/motd -DATA=${OBJ}/data -COPY=${OBJ}/copy - # setup data rm -f ${DATA} ${COPY} cp /dev/null ${DATA} diff --git a/regress/usr.bin/ssh/stderr-data.sh b/regress/usr.bin/ssh/stderr-data.sh index 0157690b0c7..b0bd2355cc9 100644 --- a/regress/usr.bin/ssh/stderr-data.sh +++ b/regress/usr.bin/ssh/stderr-data.sh @@ -1,12 +1,8 @@ -# $OpenBSD: stderr-data.sh,v 1.2 2002/03/27 22:39:52 markus Exp $ +# $OpenBSD: stderr-data.sh,v 1.3 2013/05/17 04:29:14 dtucker Exp $ # Placed in the Public Domain. tid="stderr data transfer" -DATA=/bin/ls -COPY=${OBJ}/copy -rm -f ${COPY} - for n in '' -n; do for p in 1 2; do verbose "test $tid: proto $p ($n)" diff --git a/regress/usr.bin/ssh/test-exec.sh b/regress/usr.bin/ssh/test-exec.sh index f2e2c0f8d3e..f8a043afeb5 100644 --- a/regress/usr.bin/ssh/test-exec.sh +++ b/regress/usr.bin/ssh/test-exec.sh @@ -1,4 +1,4 @@ -# $OpenBSD: test-exec.sh,v 1.41 2013/05/17 00:37:40 dtucker Exp $ +# $OpenBSD: test-exec.sh,v 1.42 2013/05/17 04:29:14 dtucker Exp $ # Placed in the Public Domain. USER=`id -un` @@ -124,6 +124,15 @@ echo "exec ${SSH} -E${TEST_SSH_LOGFILE} "'"$@"' >>$SSHLOGWRAP chmod a+rx $OBJ/ssh-log-wrapper.sh SSH="$SSHLOGWRAP" +# Some test data. We make a copy because some tests will overwrite it. +# The tests may assume that $DATA exists and is writable and $COPY does +# not exist. +DATA=$OBJ/data +cp /bin/ls ${DATA} +chmod u+w ${DATA} +COPY=$OBJ/copy +rm -f ${COPY} + # these should be used in tests export SSH SSHD SSHAGENT SSHADD SSHKEYGEN SSHKEYSCAN SFTP SFTPSERVER SCP #echo $SSH $SSHD $SSHAGENT $SSHADD $SSHKEYGEN $SSHKEYSCAN $SFTP $SFTPSERVER $SCP diff --git a/regress/usr.bin/ssh/transfer.sh b/regress/usr.bin/ssh/transfer.sh index 31cdc0ce36b..1ae3ef5bf50 100644 --- a/regress/usr.bin/ssh/transfer.sh +++ b/regress/usr.bin/ssh/transfer.sh @@ -1,11 +1,8 @@ -# $OpenBSD: transfer.sh,v 1.1 2002/03/27 00:03:37 markus Exp $ +# $OpenBSD: transfer.sh,v 1.2 2013/05/17 04:29:14 dtucker Exp $ # Placed in the Public Domain. tid="transfer data" -DATA=/bin/ls -COPY=${OBJ}/copy - for p in 1 2; do verbose "$tid: proto $p" rm -f ${COPY} |