← Commit list

2f37943406

Daniel Stenberg
Daniel Stenberg
2026-04-24
SUCCESS Duration: 261s

Subject

tests: drop support for the hex="yes" option in getpart

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

docs/tests/FILEFORMAT.md+1 -4
@@ -260,7 +260,7 @@ similar.
## `<reply>`
-### `<data [nocheck="yes"] [sendzero="yes"] [hex="yes"] [nonewline="yes"] [crlf="yes|headers"]>`
+### `<data [nocheck="yes"] [sendzero="yes"] [nonewline="yes"] [crlf="yes|headers"]>`
data to be sent to the client on its request and later verified that it
arrived safely. Set `nocheck="yes"` to prevent the test script from verifying
@@ -282,9 +282,6 @@ auth tests and similar.
`sendzero=yes` means that the (FTP) server "sends" the data even if the size
is zero bytes. Used to verify curl's behavior on zero bytes transfers.
-`hex=yes` means that the data is a sequence of hex pairs. It gets decoded and
-used as "raw" data.
-
`nonewline=yes` means that the last byte (the trailing newline character)
should be cut off from the data before sending or comparing it.
tests/data/test1132+0 -3
@@ -12,9 +12,6 @@ MQTT CONNACK
<data nocheck="yes">
hello
</data>
-<datacheck hex="yes">
-00 04 31 31 39 30 68 65 6c 6c 6f 5b 4c 46 5d 0a
-</datacheck>
# Remaining Length must be 2 in a CONNACK
<servercmd>
tests/data/test1190+0 -3
@@ -12,9 +12,6 @@ MQTT SUBSCRIBE
<data nocheck="yes">
hello
</data>
-<datacheck hex="yes">
-00 04 31 31 39 30 68 65 6c 6c 6f 5b 4c 46 5d 0a
-</datacheck>
</reply>
# Client-side
tests/data/test1192+0 -3
@@ -12,9 +12,6 @@ MQTT SUBSCRIBE
<data nocheck="yes">
hello
</data>
-<datacheck hex="yes">
-00 04 31 31 39 30 68 65 6c 6c 6f 5b 4c 46 5d 0a
-</datacheck>
</reply>
# Client-side
tests/data/test1194+0 -3
@@ -12,9 +12,6 @@ MQTT SUBSCRIBE
<data nocheck="yes">
hello
</data>
-<datacheck hex="yes">
-00 04 31 31 39 30 68 65 6c 6c 6f 5b 4c 46 5d 0a
-</datacheck>
<servercmd>
PUBLISH-before-SUBACK TRUE
</servercmd>
tests/data/test1195+0 -3
@@ -12,9 +12,6 @@ MQTT SUBSCRIBE
<data nocheck="yes">
hello
</data>
-<datacheck hex="yes">
-00 04 31 31 39 30 68 65 6c 6c 6f 5b 4c 46 5d 0a
-</datacheck>
<servercmd>
PUBLISH-before-SUBACK TRUE
short-PUBLISH TRUE
tests/data/test1196+0 -3
@@ -12,9 +12,6 @@ MQTT SUBSCRIBE
<data nocheck="yes">
hello
</data>
-<datacheck hex="yes">
-00 04 31 31 39 30 68 65 6c 6c 6f 5b 4c 46 5d 0a
-</datacheck>
# error 1 - "Connection Refused, unacceptable protocol version"
<servercmd>
tests/data/test1198+0 -3
@@ -12,9 +12,6 @@ MQTT SUBSCRIBE
<data nocheck="yes">
hello
</data>
-<datacheck hex="yes">
-00 04 31 31 39 30 68 65 6c 6c 6f 5b 4c 46 5d 0a
-</datacheck>
</reply>
# Client-side
tests/data/test1199+0 -3
@@ -12,9 +12,6 @@ MQTT SUBSCRIBE
<data nocheck="yes">
hello
</data>
-<datacheck hex="yes">
-00 04 31 31 39 30 68 65 6c 6c 6f 5b 4c 46 5d 0a
-</datacheck>
</reply>
# Client-side
tests/data/test1640+0 -3
@@ -13,9 +13,6 @@ MQTTS
<data nocheck="yes">
hello
</data>
-<datacheck hex="yes">
-00 04 31 31 39 30 68 65 6c 6c 6f 5b 4c 46 5d 0a
-</datacheck>
</reply>
# Client-side
tests/data/test1916+0 -3
@@ -12,9 +12,6 @@ MQTT PUBLISH
<data nocheck="yes">
hello
</data>
-<datacheck hex="yes">
-00 04 31 31 39 30 68 65 6c 6c 6f 5b 4c 46 5d 0a
-</datacheck>
</reply>
# Client-side
tests/data/test1917+0 -3
@@ -12,9 +12,6 @@ MQTT PUBLISH
<data nocheck="yes">
hello
</data>
-<datacheck hex="yes">
-00 04 31 31 39 30 68 65 6c 6c 6f 5b 4c 46 5d 0a
-</datacheck>
</reply>
# Client-side
tests/data/test2200+0 -3
@@ -12,9 +12,6 @@ MQTT SUBSCRIBE
<data nocheck="yes">
hello
</data>
-<datacheck hex="yes">
-00 04 31 31 39 30 68 65 6c 6c 6f 5b 4c 46 5d 0a
-</datacheck>
# error 5 - "Connection Refused, not authorized. Wrong data supplied"
<servercmd>
tests/data/test2203+0 -3
@@ -12,9 +12,6 @@ MQTT SUBSCRIBE
<data nocheck="yes">
hello
</data>
-<datacheck hex="yes">
-00 04 31 31 39 30 68 65 6c 6c 6f 5b 4c 46 5d 0a
-</datacheck>
# error 5 - "Connection Refused, not authorized. No user or password supplied"
<servercmd>
tests/data/test2204+0 -3
@@ -12,9 +12,6 @@ MQTT SUBSCRIBE
<data nocheck="yes">
hello
</data>
-<datacheck hex="yes">
-00 04 31 31 39 30 68 65 6c 6c 6f 5b 4c 46 5d 0a
-</datacheck>
</reply>
# Client-side
tests/data/test3017+0 -3
@@ -12,9 +12,6 @@ MQTT SUBSCRIBE
<data nocheck="yes">
hello
</data>
-<datacheck hex="yes">
-00 04 33 30 31 37 68 65 6c 6c 6f 5b 4c 46 5d 0a
-</datacheck>
<servercmd>
excessive-remaining TRUE
</servercmd>
tests/data/test3018+0 -3
@@ -13,9 +13,6 @@ MQTT SUBSCRIBE
<data nocheck="yes">
hello
</data>
-<datacheck hex="yes">
-00 04 33 30 31 38 68 65 6c 6c 6f 5b 4c 46 5d 0a
-</datacheck>
</reply>
# Client-side
tests/getpart.pm+0 -21
@@ -62,15 +62,6 @@ sub normalize_part {
return join("\t", @_);
}
-sub decode_hex {
- my $s = $_;
- # remove everything not hex
- $s =~ s/[^A-Fa-f0-9]//g;
- # encode everything
- $s =~ s/([a-fA-F0-9][a-fA-F0-9])/chr(hex($1))/eg;
- return $s;
-}
-
sub testcaseattr {
my %hash;
for(@xml) {
@@ -134,7 +125,6 @@ sub getpart {
my @this;
my $inside=0;
- my $hex=0;
my $line;
for(@xml) {
@@ -146,10 +136,6 @@ sub getpart {
if($inside > 1) {
push @this, $_;
}
- elsif($_ =~ /$part [^>]*hex=/) {
- # attempt to detect a hex-encoded part
- $hex=1;
- }
$inside++;
}
elsif(($inside >= 2) && ($_ =~ /^ *\<\/$part[ \>]/)) {
@@ -169,13 +155,6 @@ sub getpart {
if($warning && !@this) {
print STDERR "*** getpart.pm: $section/$part returned empty!\n";
}
- if($hex) {
- # decode the whole array before returning it!
- for(@this) {
- my $decoded = decode_hex($_);
- $_ = $decoded;
- }
- }
return @this;
}
elsif($inside >= 2) {