]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tests: adjust the tftpd output to work with hyper mode
authorDaniel Stenberg <daniel@haxx.se>
Wed, 1 Sep 2021 13:51:06 +0000 (15:51 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 1 Sep 2021 21:40:28 +0000 (23:40 +0200)
By making them look less like http headers, the hyper mode "tweak"
doesn't interfere.

Enable test 2002 and 2003 in hyper builds (and 1280 which is unrelated
but should be enabled).

Closes #7658

20 files changed:
tests/data/DISABLED
tests/data/test1007
tests/data/test1009
tests/data/test1049
tests/data/test1093
tests/data/test1094
tests/data/test1099
tests/data/test1238
tests/data/test1242
tests/data/test1243
tests/data/test2002
tests/data/test2003
tests/data/test2004
tests/data/test271
tests/data/test283
tests/data/test284
tests/data/test285
tests/data/test286
tests/data/test332
tests/server/tftpd.c

index c34594d19a9d840f625ace47162cf9ff338329d0..9744ac062844d380550f6b93eb874e1f09771b59 100644 (file)
@@ -79,7 +79,6 @@
 1176
 1266
 1267
-1280
 1287
 1288
 1294
 1701
 1702
 1800
-2002
-2003
 %endif
index e3c12b8d1f5965563d93ff17b8a64bd00e1b9070..c50e97d513e36c41a4b9129c198c7b97de67b25e 100644 (file)
@@ -31,12 +31,12 @@ This data will not be sent
 69
 </errorcode>
 <protocol>
-opcode: 2
-mode: octet
-tsize: 27
-blksize: 512
-timeout: 6
-filename: /invalid-file
+opcode = 2
+mode = octet
+tsize = 27
+blksize = 512
+timeout = 6
+filename = /invalid-file
 </protocol>
 </verify>
 </testcase>
index 223fcdbd079beabd5228dbd2fee8232b7931502d..9e1fa55f580809996ec62c80d53e8f818e38de97 100644 (file)
@@ -36,12 +36,12 @@ tftp://%HOSTIP:%TFTPPORT//%TESTNUMBER --local-port 44444-45444
 # Verify pseudo protocol after the test has been "shot"
 <verify>
 <protocol>
-opcode: 1
-mode: octet
-tsize: 0
-blksize: 512
-timeout: 6
-filename: /%TESTNUMBER
+opcode = 1
+mode = octet
+tsize = 0
+blksize = 512
+timeout = 6
+filename = /%TESTNUMBER
 </protocol>
 </verify>
 </testcase>
index 713b4bb19f84a808888500aba6fc5a7e91ae6adf..54d23903a8fa97f327ceff260d778fd9a61c5aca 100644 (file)
@@ -36,12 +36,12 @@ tftp://%HOSTIP:%TFTPPORT//%TESTNUMBER --interface %CLIENTIP
 # Verify pseudo protocol after the test has been "shot"
 <verify>
 <protocol>
-opcode: 1
-mode: octet
-tsize: 0
-blksize: 512
-timeout: 6
-filename: /%TESTNUMBER
+opcode = 1
+mode = octet
+tsize = 0
+blksize = 512
+timeout = 6
+filename = /%TESTNUMBER
 </protocol>
 </verify>
 </testcase>
index 5e1484d16bb082413e4cbe6b6450ae8371d38ae8..4fbc7b81b7befb70731fde726bdc6eaa01f1f40b 100644 (file)
@@ -36,12 +36,12 @@ TFTP retrieve with mode=i
 # Verify pseudo protocol after the test has been "shot"
 <verify>
 <protocol>
-opcode: 1
-mode: octet
-tsize: 0
-blksize: 512
-timeout: 6
-filename: /%TESTNUMBER
+opcode = 1
+mode = octet
+tsize = 0
+blksize = 512
+timeout = 6
+filename = /%TESTNUMBER
 </protocol>
 </verify>
 </testcase>
index 3ed53f281bbc7cbff5a76dbeecfd67ef0bd25e67..dd1452bb53374e398b98d601e5ffa5cb589e27da 100644 (file)
@@ -42,12 +42,12 @@ TFTP retrieve with mode=netascii
 # Verify pseudo protocol after the test has been "shot"
 <verify>
 <protocol>
-opcode: 1
-mode: netascii
-tsize: 0
-blksize: 512
-timeout: 6
-filename: /%TESTNUMBER
+opcode = 1
+mode = netascii
+tsize = 0
+blksize = 512
+timeout = 6
+filename = /%TESTNUMBER
 </protocol>
 </verify>
 </testcase>
index f2fa2f28b19e490b7058122460c24a3608960f6f..77099916f2553fe07c90f368a3627e924e17ccf9 100644 (file)
@@ -31,18 +31,18 @@ tftp://%HOSTIP:%TFTPPORT/an/invalid-file tftp://%HOSTIP:%TFTPPORT//%TESTNUMBER
 # Verify pseudo protocol after the test has been "shot"
 <verify>
 <protocol>
-opcode: 1
-mode: octet
-tsize: 0
-blksize: 512
-timeout: 6
-filename: an/invalid-file
-opcode: 1
-mode: octet
-tsize: 0
-blksize: 512
-timeout: 6
-filename: /%TESTNUMBER
+opcode = 1
+mode = octet
+tsize = 0
+blksize = 512
+timeout = 6
+filename = an/invalid-file
+opcode = 1
+mode = octet
+tsize = 0
+blksize = 512
+timeout = 6
+filename = /%TESTNUMBER
 </protocol>
 <stdout>
 data for %TESTNUMBER
index 606dd1fe47ff58861b870d528d1e8af43763ddc0..cfb541c9c382dbe9e443d19504e0506b8899ec97 100644 (file)
@@ -45,12 +45,12 @@ tftp://%HOSTIP:%TFTPPORT//%TESTNUMBER -Y1000 -y2
 # Verify pseudo protocol after the test has been "shot"
 <verify>
 <protocol>
-opcode: 1
-mode: octet
-tsize: 0
-blksize: 512
-timeout: 6
-filename: /%TESTNUMBER
+opcode = 1
+mode = octet
+tsize = 0
+blksize = 512
+timeout = 6
+filename = /%TESTNUMBER
 </protocol>
 # 28 = CURLE_OPERATION_TIMEDOUT
 <errorcode>
index 9f573a7568926fbda904f3166e385b7a3d7c8c4d..61938a041756a31c38e3c389911a297fe355d07c 100644 (file)
@@ -35,9 +35,9 @@ tftp://%HOSTIP:%TFTPPORT//%TESTNUMBER --tftp-no-options
 # Verify pseudo protocol after the test has been "shot"
 <verify>
 <protocol>
-opcode: 1
-mode: octet
-filename: /%TESTNUMBER
+opcode = 1
+mode = octet
+filename = /%TESTNUMBER
 </protocol>
 </verify>
 </testcase>
index f8b246fe7dcd1501f53f1ce0f7dce2676f134643..ba08a837f8dd558c9046920866bf2290aeb2c46d 100644 (file)
@@ -36,9 +36,9 @@ sent
  to server
 </upload>
 <protocol>
-opcode: 2
-mode: octet
-filename: /test%TESTNUMBER.txt
+opcode = 2
+mode = octet
+filename = /test%TESTNUMBER.txt
 </protocol>
 </verify>
 </testcase>
index 68144f8cf477563700366801995b1ce114d303b9..2cd28016b902f7223f334af15fa5b80ae366eaa5 100644 (file)
@@ -85,12 +85,12 @@ EPSV
 TYPE I\r
 SIZE %TESTNUMBER0002\r
 RETR %TESTNUMBER0002\r
-opcode: 1
-mode: octet
-tsize: 0
-blksize: 512
-timeout: 6
-filename: /%TESTNUMBER0003
+opcode = 1
+mode = octet
+tsize = 0
+blksize = 512
+timeout = 6
+filename = /%TESTNUMBER0003
 QUIT\r
 </protocol>
 <stdout>
index 76d85211ac15449faf1bd2d6e9d61b564c2147a6..a1d5a9fc22a5ff9a9bca9c5b509b8d038d6f48a0 100644 (file)
@@ -85,18 +85,18 @@ EPSV
 TYPE I\r
 SIZE %TESTNUMBER0002\r
 RETR %TESTNUMBER0002\r
-opcode: 1
-mode: octet
-tsize: 0
-blksize: 512
-timeout: 6
-filename: /%TESTNUMBER0003
-opcode: 1
-mode: octet
-tsize: 0
-blksize: 512
-timeout: 6
-filename: /%TESTNUMBER0003
+opcode = 1
+mode = octet
+tsize = 0
+blksize = 512
+timeout = 6
+filename = /%TESTNUMBER0003
+opcode = 1
+mode = octet
+tsize = 0
+blksize = 512
+timeout = 6
+filename = /%TESTNUMBER0003
 EPSV\r
 SIZE %TESTNUMBER0002\r
 RETR %TESTNUMBER0002\r
index 6ef9c6cfd3865830e2007a8bdbbe66f8a5470b53..17a73167ae5c34a6eaf7fe7f140f01e1c4e50c4a 100644 (file)
@@ -42,18 +42,18 @@ for several protocols
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-opcode: 1
-mode: octet
-tsize: 0
-blksize: 512
-timeout: 6
-filename: /%TESTNUMBER
-opcode: 1
-mode: octet
-tsize: 0
-blksize: 512
-timeout: 6
-filename: /%TESTNUMBER
+opcode = 1
+mode = octet
+tsize = 0
+blksize = 512
+timeout = 6
+filename = /%TESTNUMBER
+opcode = 1
+mode = octet
+tsize = 0
+blksize = 512
+timeout = 6
+filename = /%TESTNUMBER
 </protocol>
 <stdout>
 Test data file
index a9a44360fc8dea3e6b70a56b20cfd8887c4cb6e4..f6d5ad7b5c7d6376144129a851b986b7a784cff0 100644 (file)
@@ -35,12 +35,12 @@ tftp://%HOSTIP:%TFTPPORT//%TESTNUMBER
 # Verify pseudo protocol after the test has been "shot"
 <verify>
 <protocol>
-opcode: 1
-mode: octet
-tsize: 0
-blksize: 512
-timeout: 6
-filename: /%TESTNUMBER
+opcode = 1
+mode = octet
+tsize = 0
+blksize = 512
+timeout = 6
+filename = /%TESTNUMBER
 </protocol>
 </verify>
 </testcase>
index 201df9f7283cde605eeffd0f85761ad39d7b24b8..2c1ebd249d527244e10b37354b59c3a8de9bcffd 100644 (file)
@@ -28,12 +28,12 @@ tftp://%HOSTIP:%TFTPPORT//invalid-file --tftp-blksize 1024
 69
 </errorcode>
 <protocol>
-opcode: 1
-mode: octet
-tsize: 0
-blksize: 1024
-timeout: 6
-filename: /invalid-file
+opcode = 1
+mode = octet
+tsize = 0
+blksize = 1024
+timeout = 6
+filename = /invalid-file
 </protocol>
 </verify>
 </testcase>
index bee74f4c7cb945951eab3372f7975b7c2f326349..2f4ea431793ab4f6908a0fdc8924b1ceaf97f4a1 100644 (file)
@@ -59,12 +59,12 @@ tftp://%HOSTIP:%TFTPPORT//%TESTNUMBER
 # Verify pseudo protocol after the test has been "shot"
 <verify>
 <protocol>
-opcode: 1
-mode: octet
-tsize: 0
-blksize: 512
-timeout: 6
-filename: /%TESTNUMBER
+opcode = 1
+mode = octet
+tsize = 0
+blksize = 512
+timeout = 6
+filename = /%TESTNUMBER
 </protocol>
 </verify>
 </testcase>
index 23fe66ef1af88a236e8260fe371e64541879810c..ab055e416faa37c190c70d69cc3464da957b58e9 100644 (file)
@@ -36,12 +36,12 @@ sent
  to server
 </upload>
 <protocol>
-opcode: 2
-mode: octet
-tsize: 32
-blksize: 512
-timeout: 6
-filename: /test%TESTNUMBER.txt
+opcode = 2
+mode = octet
+tsize = 32
+blksize = 512
+timeout = 6
+filename = /test%TESTNUMBER.txt
 </protocol>
 </verify>
 </testcase>
index 3fa774bd3dee217edb85db796ac1682bc2bafae6..febd5e3fb5a93b6237cc03b7fdfc4f846a2dd412 100644 (file)
@@ -84,12 +84,12 @@ condition in the TFTP transmit code.
 123456789ABCDEF
 </upload>
 <protocol>
-opcode: 2
-mode: octet
-tsize: 512
-blksize: 512
-timeout: 6
-filename: /test%TESTNUMBER.txt
+opcode = 2
+mode = octet
+tsize = 512
+blksize = 512
+timeout = 6
+filename = /test%TESTNUMBER.txt
 </protocol>
 </verify>
 </testcase>
index 4f4c28b5d9b8c056556d221f9ccae63d23b91110..d2bd8bb6e66426a053a57e750dbda8cd75bb9b72 100644 (file)
@@ -34,12 +34,12 @@ tftp://%HOSTIP:%TFTPPORT//%TESTNUMBER --tftp-blksize 400
 # Verify pseudo protocol after the test has been "shot"
 <verify>
 <protocol>
-opcode: 1
-mode: octet
-tsize: 0
-blksize: 400
-timeout: 6
-filename: /%TESTNUMBER
+opcode = 1
+mode = octet
+tsize = 0
+blksize = 400
+timeout = 6
+filename = /%TESTNUMBER
 </protocol>
 </verify>
 </testcase>
index 841d08d977bede1563548a541944ce80acbd7c0b..dbf3f2ca75494f9122fc0c82478f682deb4235f3 100644 (file)
@@ -902,7 +902,7 @@ static int do_tftp(struct testcase *test, struct tftphdr *tp, ssize_t size)
   }
 
   /* store input protocol */
-  fprintf(server, "opcode: %x\n", tp->th_opcode);
+  fprintf(server, "opcode = %x\n", tp->th_opcode);
 
   cp = (char *)&tp->th_stuff;
   filename = cp;
@@ -930,7 +930,7 @@ static int do_tftp(struct testcase *test, struct tftphdr *tp, ssize_t size)
       }
       if(toggle)
         /* name/value pair: */
-        fprintf(server, "%s: %s\n", option, cp);
+        fprintf(server, "%s = %s\n", option, cp);
       else {
         /* store the name pointer */
         option = cp;
@@ -949,7 +949,7 @@ static int do_tftp(struct testcase *test, struct tftphdr *tp, ssize_t size)
   }
 
   /* store input protocol */
-  fprintf(server, "filename: %s\n", filename);
+  fprintf(server, "filename = %s\n", filename);
 
   for(cp = mode; cp && *cp; cp++)
     if(ISUPPER(*cp))