mirror of
https://github.com/curl/curl.git
synced 2026-06-05 04:24:17 +03:00
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
This commit is contained in:
parent
2db8ae480f
commit
f00a2add71
22 changed files with 120 additions and 1 deletions
|
|
@ -699,6 +699,14 @@ test.
|
|||
|
||||
`loadfile="filename"` makes loading the data from an external file.
|
||||
|
||||
### `<limit>`
|
||||
|
||||
When this test runs and curl was built with debug enabled, runtests make sure
|
||||
that the set limits are not exceeded. Supported limits:
|
||||
|
||||
Allocations: [number of allocation calls]
|
||||
Maximum allocated: [maximum concurrent memory allocated]
|
||||
|
||||
### `<file name="%LOGDIR/filename" [mode="text"]>`
|
||||
The file's contents must be identical to this after the test is complete. Use
|
||||
the mode="text" attribute if the output is in text mode on platforms that have
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue