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
81 lines
1.3 KiB
Plaintext
81 lines
1.3 KiB
Plaintext
<testcase>
|
|
<info>
|
|
<keywords>
|
|
HTTP
|
|
HTTP proxy
|
|
HSTS
|
|
trailing-dot
|
|
</keywords>
|
|
</info>
|
|
|
|
<reply>
|
|
|
|
# we use this as response to a CONNECT
|
|
<connect nocheck="yes">
|
|
HTTP/1.1 403 not OK at all
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
|
Server: test-server/fake
|
|
Content-Length: 6
|
|
Connection: close
|
|
Funny-head: yesyes
|
|
|
|
-foo-
|
|
</connect>
|
|
</reply>
|
|
|
|
<client>
|
|
<server>
|
|
http
|
|
</server>
|
|
<features>
|
|
HSTS
|
|
proxy
|
|
https
|
|
</features>
|
|
|
|
# no trailing dot in the file only in the URL
|
|
<file name="%LOGDIR/input%TESTNUMBER">
|
|
this.hsts.example "99991001 04:47:41"
|
|
</file>
|
|
|
|
<name>
|
|
HSTS with trailing-dot host name in URL but none in hsts file
|
|
</name>
|
|
<command>
|
|
-x http://%HOSTIP:%HTTPPORT http://this.hsts.example./%TESTNUMBER --hsts %LOGDIR/input%TESTNUMBER -w '%{url_effective}\n'
|
|
</command>
|
|
|
|
<disable>
|
|
test-duphandle
|
|
</disable>
|
|
</client>
|
|
|
|
<verify>
|
|
# we let it CONNECT to the server to confirm HSTS but deny from there
|
|
<protocol>
|
|
CONNECT this.hsts.example.:443 HTTP/1.1
|
|
Host: this.hsts.example.:443
|
|
User-Agent: curl/%VERSION
|
|
Proxy-Connection: Keep-Alive
|
|
|
|
</protocol>
|
|
<stdout>
|
|
HTTP/1.1 403 not OK at all
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
|
Server: test-server/fake
|
|
Content-Length: 6
|
|
Connection: close
|
|
Funny-head: yesyes
|
|
|
|
https://this.hsts.example./%TESTNUMBER
|
|
</stdout>
|
|
# Proxy CONNECT aborted
|
|
<errorcode>
|
|
56
|
|
</errorcode>
|
|
<limits>
|
|
Allocations: 1100
|
|
</limits>
|
|
</verify>
|
|
</testcase>
|