From 60c86297bf81235c18eec68f7ddf1a30f21aa1b7 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 6 Nov 2015 10:52:19 +0100 Subject: tftp tests: verify sent options too The tftpd test server now logs all received options and thus all TFTP test cases need to match them exactly. Extended test 283 to use and verify --tftp-blksize. --- tests/data/test1007 | 5 ++++- tests/data/test1009 | 5 ++++- tests/data/test1049 | 5 ++++- tests/data/test1093 | 5 ++++- tests/data/test1094 | 5 ++++- tests/data/test1099 | 10 ++++++++-- tests/data/test1238 | 5 ++++- tests/data/test2002 | 5 ++++- tests/data/test2003 | 10 ++++++++-- tests/data/test2004 | 10 ++++++++-- tests/data/test271 | 5 ++++- tests/data/test283 | 7 +++++-- tests/data/test284 | 5 ++++- tests/data/test285 | 5 ++++- tests/data/test286 | 5 ++++- 15 files changed, 73 insertions(+), 19 deletions(-) (limited to 'tests/data') diff --git a/tests/data/test1007 b/tests/data/test1007 index 5966ab366..6baf221eb 100644 --- a/tests/data/test1007 +++ b/tests/data/test1007 @@ -32,8 +32,11 @@ This data will not be sent opcode: 2 -filename: /invalid-file mode: octet +tsize: 27 +blksize: 512 +timeout: 6 +filename: /invalid-file diff --git a/tests/data/test1009 b/tests/data/test1009 index b0a93e5e0..e1929beb2 100644 --- a/tests/data/test1009 +++ b/tests/data/test1009 @@ -37,8 +37,11 @@ tftp://%HOSTIP:%TFTPPORT//1009 --local-port 44444-45444 opcode: 1 -filename: /1009 mode: octet +tsize: 0 +blksize: 512 +timeout: 6 +filename: /1009 diff --git a/tests/data/test1049 b/tests/data/test1049 index e6054a478..60f41366d 100644 --- a/tests/data/test1049 +++ b/tests/data/test1049 @@ -37,8 +37,11 @@ tftp://%HOSTIP:%TFTPPORT//1049 --trace-ascii log/traceit --interface %CLIENTIP opcode: 1 -filename: /1049 mode: octet +tsize: 0 +blksize: 512 +timeout: 6 +filename: /1049 diff --git a/tests/data/test1093 b/tests/data/test1093 index dbcfd9f7a..2087c8278 100644 --- a/tests/data/test1093 +++ b/tests/data/test1093 @@ -37,8 +37,11 @@ TFTP retrieve with mode=i opcode: 1 -filename: /1093 mode: octet +tsize: 0 +blksize: 512 +timeout: 6 +filename: /1093 diff --git a/tests/data/test1094 b/tests/data/test1094 index 29965505f..913172260 100644 --- a/tests/data/test1094 +++ b/tests/data/test1094 @@ -43,8 +43,11 @@ TFTP retrieve with mode=netascii opcode: 1 -filename: /1094 mode: netascii +tsize: 0 +blksize: 512 +timeout: 6 +filename: /1094 diff --git a/tests/data/test1099 b/tests/data/test1099 index cde403974..7aacc11d0 100644 --- a/tests/data/test1099 +++ b/tests/data/test1099 @@ -32,11 +32,17 @@ tftp://%HOSTIP:%TFTPPORT/an/invalid-file tftp://%HOSTIP:%TFTPPORT//1099 --trace- opcode: 1 -filename: an/invalid-file mode: octet +tsize: 0 +blksize: 512 +timeout: 6 +filename: an/invalid-file opcode: 1 -filename: /1099 mode: octet +tsize: 0 +blksize: 512 +timeout: 6 +filename: /1099 data for 1099 diff --git a/tests/data/test1238 b/tests/data/test1238 index 18593398a..4c976c776 100644 --- a/tests/data/test1238 +++ b/tests/data/test1238 @@ -38,8 +38,11 @@ tftp://%HOSTIP:%TFTPPORT//1238 -Y1000 -y2 opcode: 1 -filename: /1238 mode: octet +tsize: 0 +blksize: 512 +timeout: 6 +filename: /1238 # 28 = CURLE_OPERATION_TIMEDOUT diff --git a/tests/data/test2002 b/tests/data/test2002 index f39cd60f1..db96bfea8 100644 --- a/tests/data/test2002 +++ b/tests/data/test2002 @@ -88,8 +88,11 @@ TYPE I SIZE 20020002 RETR 20020002 opcode: 1 -filename: /20020003 mode: octet +tsize: 0 +blksize: 512 +timeout: 6 +filename: /20020003 QUIT diff --git a/tests/data/test2003 b/tests/data/test2003 index 57c0d24e6..59a743f85 100644 --- a/tests/data/test2003 +++ b/tests/data/test2003 @@ -88,11 +88,17 @@ TYPE I SIZE 20030002 RETR 20030002 opcode: 1 -filename: /20030003 mode: octet -opcode: 1 +tsize: 0 +blksize: 512 +timeout: 6 filename: /20030003 +opcode: 1 mode: octet +tsize: 0 +blksize: 512 +timeout: 6 +filename: /20030003 EPSV SIZE 20030002 RETR 20030002 diff --git a/tests/data/test2004 b/tests/data/test2004 index bad6f7b90..8035183bb 100644 --- a/tests/data/test2004 +++ b/tests/data/test2004 @@ -43,11 +43,17 @@ for several protocols opcode: 1 -filename: /2004 mode: octet -opcode: 1 +tsize: 0 +blksize: 512 +timeout: 6 filename: /2004 +opcode: 1 mode: octet +tsize: 0 +blksize: 512 +timeout: 6 +filename: /2004 Test data file diff --git a/tests/data/test271 b/tests/data/test271 index af5a6c603..06d5a8b43 100644 --- a/tests/data/test271 +++ b/tests/data/test271 @@ -36,8 +36,11 @@ tftp://%HOSTIP:%TFTPPORT//271 --trace-ascii log/traceit opcode: 1 -filename: /271 mode: octet +tsize: 0 +blksize: 512 +timeout: 6 +filename: /271 diff --git a/tests/data/test283 b/tests/data/test283 index 922de51e0..0dc1270fd 100644 --- a/tests/data/test283 +++ b/tests/data/test283 @@ -17,7 +17,7 @@ tftp TFTP retrieve on invalid file -tftp://%HOSTIP:%TFTPPORT//invalid-file --trace-ascii log/traceit +tftp://%HOSTIP:%TFTPPORT//invalid-file --trace-ascii log/traceit --tftp-blksize 1024 @@ -29,8 +29,11 @@ tftp://%HOSTIP:%TFTPPORT//invalid-file --trace-ascii log/traceit opcode: 1 -filename: /invalid-file mode: octet +tsize: 0 +blksize: 1024 +timeout: 6 +filename: /invalid-file diff --git a/tests/data/test284 b/tests/data/test284 index 0c2a66560..954c90260 100644 --- a/tests/data/test284 +++ b/tests/data/test284 @@ -60,8 +60,11 @@ tftp://%HOSTIP:%TFTPPORT//284 --trace-ascii log/traceit opcode: 1 -filename: /284 mode: octet +tsize: 0 +blksize: 512 +timeout: 6 +filename: /284 diff --git a/tests/data/test285 b/tests/data/test285 index 75a19991d..d7a4a3900 100644 --- a/tests/data/test285 +++ b/tests/data/test285 @@ -37,8 +37,11 @@ sent opcode: 2 -filename: /test285.txt mode: octet +tsize: 32 +blksize: 512 +timeout: 6 +filename: /test285.txt diff --git a/tests/data/test286 b/tests/data/test286 index 841ee1e2a..b909fd3d5 100644 --- a/tests/data/test286 +++ b/tests/data/test286 @@ -85,8 +85,11 @@ condition in the TFTP transmit code. opcode: 2 -filename: /test286.txt mode: octet +tsize: 512 +blksize: 512 +timeout: 6 +filename: /test286.txt -- cgit v1.2.3