summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2003-06-18 22:35:11 +1000
committerDarren Tucker <dtucker@zip.com.au>2003-06-18 22:35:11 +1000
commita4040f5904b2f7adc5fcf1656bf47a202b54ca45 (patch)
tree7837db0b321ecb2e21f724fc7651557c316f6cf5 /regress
parentd57a76eec557a9ff43764f2fffdf994e0141ce5b (diff)
- (dtucker) OpenBSD CVS Sync (regress/)
- djm@cvs.openbsd.org 2003/04/04 09:34:22 [Makefile sftp-cmds.sh] More regression tests, including recent directory rename bug; ok markus@
Diffstat (limited to 'regress')
-rw-r--r--regress/Makefile3
-rw-r--r--regress/sftp-cmds.sh13
2 files changed, 12 insertions, 4 deletions
diff --git a/regress/Makefile b/regress/Makefile
index 938b7d3de..2b8dbd6f6 100644
--- a/regress/Makefile
+++ b/regress/Makefile
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile,v 1.21 2003/04/02 12:21:13 markus Exp $ 1# $OpenBSD: Makefile,v 1.22 2003/04/04 09:34:22 djm Exp $
2 2
3REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7 3REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7
4 4
@@ -25,6 +25,7 @@ LTESTS= connect \
25 keygen-change \ 25 keygen-change \
26 sftp \ 26 sftp \
27 sftp-cmds \ 27 sftp-cmds \
28 sftp-badcmds \
28 sftp-batch \ 29 sftp-batch \
29 forwarding 30 forwarding
30 31
diff --git a/regress/sftp-cmds.sh b/regress/sftp-cmds.sh
index 462c6802f..987887ff0 100644
--- a/regress/sftp-cmds.sh
+++ b/regress/sftp-cmds.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: sftp-cmds.sh,v 1.2 2003/01/10 07:52:41 djm Exp $ 1# $OpenBSD: sftp-cmds.sh,v 1.3 2003/04/04 09:34:22 djm Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4# XXX - TODO: 4# XXX - TODO:
@@ -11,7 +11,7 @@ tid="sftp commands"
11DATA=/bin/ls 11DATA=/bin/ls
12COPY=${OBJ}/copy 12COPY=${OBJ}/copy
13 13
14rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd ${BATCH}.* 14rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd ${COPY}.dd2 ${BATCH}.*
15 15
16verbose "$tid: lls" 16verbose "$tid: lls"
17echo "lls ${OBJ}" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 17echo "lls ${OBJ}" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \
@@ -66,6 +66,13 @@ echo "rename $COPY ${COPY}.1" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \
66test -f ${COPY}.1 || fail "missing file after rename" 66test -f ${COPY}.1 || fail "missing file after rename"
67cmp $DATA ${COPY}.1 >/dev/null 2>&1 || fail "corrupted copy after rename" 67cmp $DATA ${COPY}.1 >/dev/null 2>&1 || fail "corrupted copy after rename"
68 68
69mkdir ${COPY}.dd
70verbose "$tid: rename directory"
71echo "rename ${COPY}.dd ${COPY}.dd2" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \
72 || fail "rename directory failed"
73test -d ${COPY}.dd && fail "oldname exists after rename directory"
74test -d ${COPY}.dd2 || fail "missing newname after rename directory"
75
69verbose "$tid: ln" 76verbose "$tid: ln"
70echo "ln ${COPY}.1 ${COPY}.2" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 || fail "ln failed" 77echo "ln ${COPY}.1 ${COPY}.2" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 || fail "ln failed"
71test -L ${COPY}.2 || fail "missing file after ln" 78test -L ${COPY}.2 || fail "missing file after ln"
@@ -95,6 +102,6 @@ verbose "$tid: lchdir"
95echo "lchdir ${COPY}.dd" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 102echo "lchdir ${COPY}.dd" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \
96 || fail "lchdir failed" 103 || fail "lchdir failed"
97 104
98rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd ${BATCH}.* 105rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd ${COPY}.dd2 ${BATCH}.*
99 106
100 107