tests: adjust the tftpd output to work with hyper mode

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
This commit is contained in:
Daniel Stenberg 2021-09-01 15:51:06 +02:00
parent 3a6d30cfd3
commit 3f4b1b4ee5
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
20 changed files with 123 additions and 126 deletions

View file

@ -79,7 +79,6 @@
1176
1266
1267
1280
1287
1288
1294
@ -101,6 +100,4 @@
1701
1702
1800
2002
2003
%endif

View 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>

View 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>

View 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>

View 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>

View 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>

View 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

View 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>

View 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>

View 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>

View file

@ -85,12 +85,12 @@ EPSV
TYPE I
SIZE %TESTNUMBER0002
RETR %TESTNUMBER0002
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
</protocol>
<stdout>

View file

@ -85,18 +85,18 @@ EPSV
TYPE I
SIZE %TESTNUMBER0002
RETR %TESTNUMBER0002
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
SIZE %TESTNUMBER0002
RETR %TESTNUMBER0002

View 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

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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))