summaryrefslogtreecommitdiff
path: root/regress/usr.sbin/relayd
AgeCommit message (Collapse)Author
2017-07-14Do not mix Perl read() with sysread(). Data could get stuck in theAlexander Bluhm
buffered IO and test run-regress-args-http-chunked.pl would fail on slow hardware. Limit debug output to one line per 1% of data. Improve function write_syswrite(). Sync with httpd regress. Fix whitespace.
2017-01-31Mark the IO::Socket::SSL server socket with SSL_server to avoidAlexander Bluhm
OCSP error messages.
2016-09-23Check wether sudo or doas is working once at the beginning of theAlexander Bluhm
test.
2016-09-22Call setsockopt(2) before listen(2) in relayd tests and adjust someAlexander Bluhm
error messages.
2016-09-02Print SKIPPED if a regress test cannot be executed for some reason.Alexander Bluhm
This allows to identify such tests by looking at their output.
2016-08-25Set relayd socket buffer size to reasonable value to make test passAlexander Bluhm
in different environments.
2016-08-25Make relayd test slow-consumer more reliable. Set SO_SNDTIMEOAlexander Bluhm
sockopt correctly with Perl pack on i386. Make it possible to grep in each others client and server logfile. Client does not simply sleep but waits for short write at server.
2016-07-27Improve parsing of the Host by following RFC 7230 Section 5.4 more strictly:Reyk Floeter
- Respond with a 400 (Bad Request) if there is more than one Host: header to prevent ambiguities. - Make sure that the host in the optional absolute form of request-target (eg. GET http://www.target.com/ HTTP/1.1) matches the Host: value. Proxies are supposed to ignore the Host: value if the request-target exists, but relayd used to ignore the absolute request-target form instead. In HTTP terminology, relayd is a gateway and not a proxy, but it has to make sure that the host is validated consistently. OK benno@ bluhm@
2016-07-22add a regression testSebastian Benoit
2016-07-20s/sudo/doas/Sebastian Benoit
2016-05-03Fix some Perl statements perlcritic was bitching about: VariableAlexander Bluhm
declared in conditional statement.
2015-10-09Keep relayd test certificate names in sync with syslogd.Alexander Bluhm
2015-07-20Fix white spaces.Alexander Bluhm
2015-07-20Allow to use $curdir, $objdir, $host, $hostname in the test configAlexander Bluhm
file. They are substituted automatically, to avoid this in each single test.
2015-07-18add relayd regression test args-http-slow-consumer.plSebastian Benoit
ok reyk@, bluhm@
2015-06-25Align the three variants of Remote.pm.Alexander Bluhm
2015-05-22Add tests for relayd TLS inspection with plain SSL and HTTPS.Alexander Bluhm
2015-05-17Add test cases for a crash reported by Bertrand PROVOST. When aAlexander Bluhm
HTTP client writes multiple requests or chunks in a single transfer, relayd invokes the libevent callback manually for the next data. If the callback closes the session, this results in an use after free. Test an invalid second request method, test an invalid header line in the second PUT request, test an invalid second chunked length for a PUT request. Also test multiple valid HTTP 1.1 PUT requests with chunked body. To detect crashes of relayd, start it with "prefork 1" and grep for "lost child" log messages. Unfortunately only the first child is monitored by the parent.
2015-04-29Make some regular expressions more strict. This allows the testsAlexander Bluhm
to pass also if relayd is compiled with DEBUG.
2015-04-27Let the HTTP client close the connection within an incomplete headerAlexander Bluhm
line. Check that the session in relayd gets closes and it does not result in a file descriptor leak. Bug in relayd found by claudio@.
2015-01-05Fix relayd http regression tests. If http response is not ok, theAlexander Bluhm
response's content length may be an unexpected value as an error page is shown.
2014-12-31Create CA and certificates for TLS tests consistently. BetterAlexander Bluhm
logging of SSL errors. Do not import unneeded Socket constants.
2014-12-18Update test - the hashkey log message disappeared.Reyk Floeter
2014-12-14By now relayd expects tls in its config file and writes tls intoAlexander Bluhm
its log file. Change regression tests form ssl to tls.
2014-08-18Make the perl modules consistent for the multiple regression tests.Alexander Bluhm
This includes coding style, better error messages and variable naming.
2014-08-18Add a description of what the relayd and sosplice regression testsAlexander Bluhm
do. Also explain the optional environment variables.
2014-08-18Add test cases for multiple small HTTP requests. Many PUT requestsAlexander Bluhm
with ony byte content length triggered relayd to hang. This has been fixed already.
2014-08-17Sync regress/usr.sbin/relayd with recent http.h changesdoug
2014-07-20A HTTP connection may have multiple requests with content. AllowAlexander Bluhm
to specify an array of md5 hashes in the test arguments and check all of them in the client and server log files. So test that relayd does not modify the http body.
2014-07-14Now that the relayd timeouts have been fixed, make the http timeoutAlexander Bluhm
test more strict again. Backout rev 1.2 of args-timeout-http.pl.
2014-07-13fix regress tests after log changes. noticed by bluhm@.Sebastian Benoit
everybody stand back. i know regular expressions.
2014-07-13improve log output for relays. adjust regress testsSebastian Benoit
ok reyk
2014-07-13repair matching of headers, add regress test for this errorSebastian Benoit
ok reyk
2014-07-12fix relay "append header" action, add regression test for appendSebastian Benoit
ok reyk
2014-07-12Test filtering by methodReyk Floeter
ok bluhm@ benno@
2014-07-11Put a license file into the test directories with multiple argumentAlexander Bluhm
files. We do not want to put a license header into each subtest. suggested by reyk@
2014-07-11Limit HTTP header length to about 8K (based on the default of 4-8K inReyk Floeter
common web servers). Add a related regress test. OK benno@
2014-07-11Make the test output easier to read by splitting the test casesAlexander Bluhm
with an empty line and a header line.
2014-07-11Fix dryrun for remote relayd test.Alexander Bluhm
2014-07-11Add a time.log file that accumulates timing information about theAlexander Bluhm
executed tests. This allows to micro benchmark relayd. based on a diff from andre@; OK reyk@
2014-07-11Simplify the code that handles the HTTP headers by using an RB treeReyk Floeter
with associated lists instead of the complicated lookup table and "others" list. This might add a little malloc overhead for common headers but also fixes some issues like the handling of repeated headers - for example, handling of multiple "Set-Cookie" headers. ok bluhm@ (regress part) ok benno@
2014-07-10Test relayd error message for a broken config file.Alexander Bluhm
2014-07-10Check for the exact number of done requests in relayd log.Alexander Bluhm
2014-07-10Print "%s (removed)" into relayd log and test for that string.Alexander Bluhm
suggested by reyk@
2014-07-10To make sure that at least anything is tested, add a length checkAlexander Bluhm
per default for the default length value in check_logs(). If a test doesn't want this check, it has to disable it explicitly with nocheck. Also remove unneeded nocheck switches for deeper testing.
2014-07-10Add support to test handling of repeated headers.Reyk Floeter
From RFC 7230, section 3.2.2: "A sender MUST NOT generate multiple header fields with the same field name in a message unless either the entire field value for that header field is defined as a comma-separated list [i.e., #(values)] or the header field is a well-known exception (as noted below)."
2014-07-10Implement non-persistent connections in a cleaner way. Every testAlexander Bluhm
that offers multiple requets per HTTP connection is run twice. First all requests are run over a single TCP connection. Then for each requests a separate TCP connection is established. If a requests during a persistent connection fails, a reconnect is done as relayd cancels the whole connection. This allows stricter tests for filters. OK reyk@
2014-07-09Changes in relayd's regression tests have to be discussed.Reyk Floeter
As discussed with bluhm@ deraadt@
2014-07-09Update and extend the regress tests to use the new grammar of theReyk Floeter
filtering rules. Some of the filenames are based on the old grammar, we keep them for now and just update the contents to have a before/after comparison of the features. Most of the work was done by Andre de Oliveira (andre@) OK bluhm@ benno@
2014-06-22Fix the relayd regression tests. Now they pass with and withoutAlexander Bluhm
an obj directory. The relayd process can also run on a remote machine for different timing.