curl-curl/tests/data/test1560
Daniel Stenberg 8724306e78
runtests: support memory-limits per test
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
2025-07-08 10:14:45 +02:00

46 lines
378 B
Plaintext

<testcase>
<info>
<keywords>
unittest
urlapi
</keywords>
</info>
#
# Client-side
<client>
<server>
none
</server>
<setenv>
LANG=en_US.UTF-8
</setenv>
<features>
file
https
http
pop3
smtp
imap
ldap
dict
ftp
</features>
<name>
URL API
</name>
<tool>
lib%TESTNUMBER
</tool>
</client>
<verify>
<stdout>
success
</stdout>
<limits>
Allocations: 3000
</limits>
</verify>
</testcase>