Added tests 633 through 637 to test the new file range support for SFTP.

All but the first test cause an infinite loop or other failure and so
are added to DISABLED.
This commit is contained in:
Dan Fandrich 2008-10-09 05:16:06 +00:00
parent b2ca0babeb
commit f6d80d66a2
8 changed files with 224 additions and 2 deletions

View File

@ -9,6 +9,10 @@
Daniel Fandrich (8 Oct 2008)
- Added tests 1082 through 1085 to test symbolic --interface parameters
- Added tests 633 through 637 to test the new file range support for SFTP.
All but the first test cause an infinite loop or other failure and so
are added to DISABLED.
Daniel Stenberg (8 Oct 2008)
- Bug #2152270 (http://curl.haxx.se/bug/view.cgi?id=2152270) identified and
fixed a CURLINFO_REDIRECT_URL memory leak and an additional wrong-doing:

View File

@ -3,4 +3,7 @@
# test cases are run by runtests.pl. Just add the plain test case numbers, one
# per line.
# Lines starting with '#' letters are treated as comments.
634
635
636
637

View File

@ -58,7 +58,8 @@ EXTRA_DIST = test1 test108 test117 test127 test20 test27 test34 test46 \
test1056 test1057 test1058 test1059 test1060 test1061 test1062 test1063 \
test1064 test1065 test1066 test1067 test1068 test1069 test1070 test1071 \
test1072 test1073 test1074 test1075 test1076 test1077 test1078 test1079 \
test1080 test1081 test1082 test1083 test1084 test1085
test1080 test1081 test1082 test1083 test1084 test1085 test633 test634 \
test635 test636 test637
filecheck:
@mkdir test-place; \

42
tests/data/test633 Normal file
View File

@ -0,0 +1,42 @@
<testcase>
<info>
<keywords>
SFTP
Range
</keywords>
</info>
#
# Server-side
<reply>
<data>
data
</data>
</reply>
#
# Client-side
<client>
<server>
sftp
</server>
<name>
SFTP retrieval with byte range
</name>
<command>
--key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%PWD/log/file633.txt -r 5-9
</command>
<file name="log/file633.txt">
Test data
for ssh test
</file>
</client>
#
# Verify data after the test has been "shot"
<verify>
<valgrind>
disable
</valgrind>
</verify>
</testcase>

43
tests/data/test634 Normal file
View File

@ -0,0 +1,43 @@
<testcase>
<info>
<keywords>
SFTP
Range
</keywords>
</info>
#
# Server-side
<reply>
<data>
data
for ssh test
</data>
</reply>
#
# Client-side
<client>
<server>
sftp
</server>
<name>
SFTP retrieval with byte range past end of file
</name>
<command>
--key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%PWD/log/file634.txt -r 5-99
</command>
<file name="log/file634.txt">
Test data
for ssh test
</file>
</client>
#
# Verify data after the test has been "shot"
<verify>
<valgrind>
disable
</valgrind>
</verify>
</testcase>

42
tests/data/test635 Normal file
View File

@ -0,0 +1,42 @@
<testcase>
<info>
<keywords>
SFTP
Range
</keywords>
</info>
#
# Server-side
<reply>
<data>
ssh test
</data>
</reply>
#
# Client-side
<client>
<server>
sftp
</server>
<name>
SFTP retrieval with byte range relative to end of file
</name>
<command>
--key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%PWD/log/file635.txt -r -9
</command>
<file name="log/file635.txt">
Test data
for ssh test
</file>
</client>
#
# Verify data after the test has been "shot"
<verify>
<valgrind>
disable
</valgrind>
</verify>
</testcase>

43
tests/data/test636 Normal file
View File

@ -0,0 +1,43 @@
<testcase>
<info>
<keywords>
SFTP
Range
</keywords>
</info>
#
# Server-side
<reply>
<data>
data
for ssh test
</data>
</reply>
#
# Client-side
<client>
<server>
sftp
</server>
<name>
SFTP retrieval with X- byte range
</name>
<command>
--key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%PWD/log/file636.txt -r 5-
</command>
<file name="log/file636.txt">
Test data
for ssh test
</file>
</client>
#
# Verify data after the test has been "shot"
<verify>
<valgrind>
disable
</valgrind>
</verify>
</testcase>

44
tests/data/test637 Normal file
View File

@ -0,0 +1,44 @@
<testcase>
<info>
<keywords>
SFTP
Range
</keywords>
</info>
#
# Server-side
<reply>
<data>
</data>
</reply>
#
# Client-side
<client>
<server>
sftp
</server>
<name>
SFTP retrieval with invalid X- range
</name>
<command>
--key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%PWD/log/file637.txt -r 99-
</command>
<file name="log/file637.txt">
Test data
for ssh test
</file>
</client>
#
# Verify data after the test has been "shot"
<verify>
<errorcode>
36
</errorcode>
<valgrind>
disable
</valgrind>
</verify>
</testcase>