mirror of
https://github.com/curl/curl.git
synced 2026-04-13 00:31:41 +08:00
The idea here is to set limits per test how many allocations and maximum
amount of memory it is allowed to use. This is a means to make sure the
number and total size of allocations are kept in check and don't
mistakenly "blow up".
If runtests.pl detects that the given limits have been exceeded it fails
the test case with an error.
The `<verify>` part now supports `<limits>`, and in this section two
limits can be set for each test (verified in debug builds only):
Allocations: [number of allocation calls]
Maximum allocated: [maximum concurrent memory allocated]
Default limits (used if nothing is set in the test file):
Allocations: 1000
Maximum allocated: 1000000
Closes #17821
49 lines
794 B
Plaintext
49 lines
794 B
Plaintext
<testcase>
|
|
<info>
|
|
<keywords>
|
|
CURLOPT_URL
|
|
verbose logs
|
|
</keywords>
|
|
</info>
|
|
|
|
<reply>
|
|
</reply>
|
|
|
|
<client>
|
|
<server>
|
|
none
|
|
</server>
|
|
|
|
# require HTTP so that CURLOPT_POSTFIELDS works as assumed
|
|
<features>
|
|
http
|
|
</features>
|
|
<tool>
|
|
lib%TESTNUMBER
|
|
</tool>
|
|
|
|
<name>
|
|
Set excessive URL lengths
|
|
</name>
|
|
</client>
|
|
|
|
#
|
|
# Verify that the test runs to completion without crashing
|
|
<verify>
|
|
<errorcode>
|
|
0
|
|
</errorcode>
|
|
<stdout>
|
|
CURLOPT_URL 10000000 bytes URL == 43
|
|
CURLOPT_POSTFIELDS 10000000 bytes data == 0
|
|
CURLUPART_URL 10000000 bytes URL == 3 (Malformed input to a URL function)
|
|
CURLUPART_SCHEME 10000000 bytes scheme == 3 (Malformed input to a URL function)
|
|
CURLUPART_USER 10000000 bytes user == 3 (Malformed input to a URL function)
|
|
</stdout>
|
|
<limits>
|
|
Maximum allocated: 10010000
|
|
</limits>
|
|
</verify>
|
|
|
|
</testcase>
|