diff options
Diffstat (limited to 'regress/sftp-cmds.sh')
-rw-r--r-- | regress/sftp-cmds.sh | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/regress/sftp-cmds.sh b/regress/sftp-cmds.sh index a7d552972..c747988d1 100644 --- a/regress/sftp-cmds.sh +++ b/regress/sftp-cmds.sh | |||
@@ -7,7 +7,7 @@ | |||
7 | 7 | ||
8 | tid="sftp commands" | 8 | tid="sftp commands" |
9 | 9 | ||
10 | DATA=/bin/ls | 10 | DATA=/bin/ls${EXEEXT} |
11 | COPY=${OBJ}/copy | 11 | COPY=${OBJ}/copy |
12 | # test that these files are readable! | 12 | # test that these files are readable! |
13 | for i in `(cd /bin;echo l*)` | 13 | for i in `(cd /bin;echo l*)` |
@@ -70,7 +70,7 @@ rm -f ${COPY}.dd/* | |||
70 | verbose "$tid: get to directory" | 70 | verbose "$tid: get to directory" |
71 | echo "get $DATA ${COPY}.dd" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ | 71 | echo "get $DATA ${COPY}.dd" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ |
72 | || fail "get failed" | 72 | || fail "get failed" |
73 | cmp $DATA ${COPY}.dd/ls || fail "corrupted copy after get" | 73 | cmp $DATA ${COPY}.dd/`basename $DATA` || fail "corrupted copy after get" |
74 | 74 | ||
75 | rm -f ${COPY}.dd/* | 75 | rm -f ${COPY}.dd/* |
76 | verbose "$tid: glob get to directory" | 76 | verbose "$tid: glob get to directory" |
@@ -82,13 +82,13 @@ done | |||
82 | 82 | ||
83 | rm -f ${COPY}.dd/* | 83 | rm -f ${COPY}.dd/* |
84 | verbose "$tid: get to local dir" | 84 | verbose "$tid: get to local dir" |
85 | echo "lcd ${COPY}.dd\nget $DATA" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ | 85 | (echo "lcd ${COPY}.dd"; echo "get $DATA" ) | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ |
86 | || fail "get failed" | 86 | || fail "get failed" |
87 | cmp $DATA ${COPY}.dd/ls || fail "corrupted copy after get" | 87 | cmp $DATA ${COPY}.dd/`basename $DATA` || fail "corrupted copy after get" |
88 | 88 | ||
89 | rm -f ${COPY}.dd/* | 89 | rm -f ${COPY}.dd/* |
90 | verbose "$tid: glob get to local dir" | 90 | verbose "$tid: glob get to local dir" |
91 | echo "lcd ${COPY}.dd\nget /bin/l*" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ | 91 | (echo "lcd ${COPY}.dd"; echo "get /bin/l*") | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ |
92 | || fail "get failed" | 92 | || fail "get failed" |
93 | for x in $GLOBFILES; do | 93 | for x in $GLOBFILES; do |
94 | cmp /bin/$x ${COPY}.dd/$x || fail "corrupted copy after get" | 94 | cmp /bin/$x ${COPY}.dd/$x || fail "corrupted copy after get" |
@@ -110,7 +110,7 @@ rm -f ${COPY}.dd/* | |||
110 | verbose "$tid: put to directory" | 110 | verbose "$tid: put to directory" |
111 | echo "put $DATA ${COPY}.dd" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ | 111 | echo "put $DATA ${COPY}.dd" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ |
112 | || fail "put failed" | 112 | || fail "put failed" |
113 | cmp $DATA ${COPY}.dd/ls || fail "corrupted copy after put" | 113 | cmp $DATA ${COPY}.dd/`basename $DATA` || fail "corrupted copy after put" |
114 | 114 | ||
115 | rm -f ${COPY}.dd/* | 115 | rm -f ${COPY}.dd/* |
116 | verbose "$tid: glob put to directory" | 116 | verbose "$tid: glob put to directory" |
@@ -122,13 +122,13 @@ done | |||
122 | 122 | ||
123 | rm -f ${COPY}.dd/* | 123 | rm -f ${COPY}.dd/* |
124 | verbose "$tid: put to local dir" | 124 | verbose "$tid: put to local dir" |
125 | echo "cd ${COPY}.dd\nput $DATA" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ | 125 | (echo "cd ${COPY}.dd"; echo "put $DATA") | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ |
126 | || fail "put failed" | 126 | || fail "put failed" |
127 | cmp $DATA ${COPY}.dd/ls || fail "corrupted copy after put" | 127 | cmp $DATA ${COPY}.dd/`basename $DATA` || fail "corrupted copy after put" |
128 | 128 | ||
129 | rm -f ${COPY}.dd/* | 129 | rm -f ${COPY}.dd/* |
130 | verbose "$tid: glob put to local dir" | 130 | verbose "$tid: glob put to local dir" |
131 | echo "cd ${COPY}.dd\nput /bin/l*" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ | 131 | (echo "cd ${COPY}.dd"; echo "put /bin/l*") | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ |
132 | || fail "put failed" | 132 | || fail "put failed" |
133 | for x in $GLOBFILES; do | 133 | for x in $GLOBFILES; do |
134 | cmp /bin/$x ${COPY}.dd/$x || fail "corrupted copy after put" | 134 | cmp /bin/$x ${COPY}.dd/$x || fail "corrupted copy after put" |