diff options
author | Darren Tucker <dtucker@zip.com.au> | 2003-06-18 22:35:11 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2003-06-18 22:35:11 +1000 |
commit | a4040f5904b2f7adc5fcf1656bf47a202b54ca45 (patch) | |
tree | 7837db0b321ecb2e21f724fc7651557c316f6cf5 /regress | |
parent | d57a76eec557a9ff43764f2fffdf994e0141ce5b (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/Makefile | 3 | ||||
-rw-r--r-- | regress/sftp-cmds.sh | 13 |
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 | ||
3 | REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7 | 3 | REGRESS_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" | |||
11 | DATA=/bin/ls | 11 | DATA=/bin/ls |
12 | COPY=${OBJ}/copy | 12 | COPY=${OBJ}/copy |
13 | 13 | ||
14 | rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd ${BATCH}.* | 14 | rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd ${COPY}.dd2 ${BATCH}.* |
15 | 15 | ||
16 | verbose "$tid: lls" | 16 | verbose "$tid: lls" |
17 | echo "lls ${OBJ}" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ | 17 | echo "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 \ | |||
66 | test -f ${COPY}.1 || fail "missing file after rename" | 66 | test -f ${COPY}.1 || fail "missing file after rename" |
67 | cmp $DATA ${COPY}.1 >/dev/null 2>&1 || fail "corrupted copy after rename" | 67 | cmp $DATA ${COPY}.1 >/dev/null 2>&1 || fail "corrupted copy after rename" |
68 | 68 | ||
69 | mkdir ${COPY}.dd | ||
70 | verbose "$tid: rename directory" | ||
71 | echo "rename ${COPY}.dd ${COPY}.dd2" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ | ||
72 | || fail "rename directory failed" | ||
73 | test -d ${COPY}.dd && fail "oldname exists after rename directory" | ||
74 | test -d ${COPY}.dd2 || fail "missing newname after rename directory" | ||
75 | |||
69 | verbose "$tid: ln" | 76 | verbose "$tid: ln" |
70 | echo "ln ${COPY}.1 ${COPY}.2" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 || fail "ln failed" | 77 | echo "ln ${COPY}.1 ${COPY}.2" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 || fail "ln failed" |
71 | test -L ${COPY}.2 || fail "missing file after ln" | 78 | test -L ${COPY}.2 || fail "missing file after ln" |
@@ -95,6 +102,6 @@ verbose "$tid: lchdir" | |||
95 | echo "lchdir ${COPY}.dd" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ | 102 | echo "lchdir ${COPY}.dd" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ |
96 | || fail "lchdir failed" | 103 | || fail "lchdir failed" |
97 | 104 | ||
98 | rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd ${BATCH}.* | 105 | rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd ${COPY}.dd2 ${BATCH}.* |
99 | 106 | ||
100 | 107 | ||