aboutsummaryrefslogtreecommitdiff
path: root/regress/tests.sh
AgeCommit message (Collapse)Author
2024-08-29improve failure log of test_log_*Omar Polo
2024-08-29add some tests for the different log stylesOmar Polo
2024-08-24regress/fcgi: dump and check all the parametersOmar Polo
2024-08-24improve testsOmar Polo
2024-08-24rework match_host(); fix alias handling; add two alias testsOmar Polo
2024-08-23work around comically tiny HOST_NAME_MAX on glibc systemOmar Polo
glibc is clearly violating POSIX since they set HOST_NAME_MAX to 64, and they've known so for years. Unfortunately this means that, despite using the right interfaces, we have to work around bugs in their libc. ugh. Luckily, gmid doesn't need to do DNS, it just needs a define large enough to store a hostname, but not unlimited, to catch possible misconfigurations. We don't risk to round-trip this into an interface that expects smaller strings. Reported and fix tested by Anna “CyberTailor”, see <https://codeberg.org/op/gmid/issues/3>.
2024-08-03regress: fix quit()Omar Polo
2024-08-03add support for using the proxy protocol v1 when proxying tooOmar Polo
This is symmetrical to the support for *incoming* requests. The new regress case uses this to proxy to itself using the proxy-protocol v1. Fixes https://github.com/omar-polo/gmid/issues/31
2024-08-03regress: run the proxies on a different portOmar Polo
Soon we may want to run (some) proxies with the proxy-protocol so we can't reuse the same port.
2024-08-03regress: fix test_high_prefork()Omar Polo
we don't load the prefork dynamically, only the prefork at startup is honoured, so fix the test by stopping gmid so it is started with the right prefork.
2024-06-14propagate prefork valueOmar Polo
otherwise the child processes still believet the prefork value is 3 and can end up reading/writing out of bounds when setting up the sockets. Actually, server processes shouldn't create pipes to other servers, but this is left for a follow-up diff. Issue reported by la ninpre, thank you!
2024-06-10disable a test that fails on darwin in the CIOmar Polo
2024-06-10regress: add another test in test_gg_n_flagOmar Polo
Related to https://github.com/omar-polo/gmid/issues/12
2024-06-10use $gg rather than gg in regressOmar Polo
2024-06-10add regress for gg -nOmar Polo
2024-06-06regress: add a test for comments and blanks at the start of the fileOmar Polo
2024-06-03regress: add a check for `fastcgi off' handling across locationsOmar Polo
Based on the bug report from Alex, thanks!
2024-05-29regress: add test_ipv6_serverOmar Polo
2024-05-29regress: rename ipv4 test and add another with ipv6Omar Polo
2024-05-29regress: run test_ip_addr with host=127.0.0.1Omar Polo
2024-05-29add regress that hit gmid via a raw IPv4 addressOmar Polo
2024-04-04add a test for the config dumpingOmar Polo
2024-01-30rename the @common_opt macro back to @commonOmar Polo
now common is no longer a reserved keyword
2024-01-26add a test that uses @-style macrosOmar Polo
See Codeberg issue #1.
2023-08-29regress: change naming scheme for certs, add GENCERT_FLAGS knobOmar Polo
Call the certificates .pem and the keys .key; use contrib/gencert to generate the certificates and provide a GENCERT_FLAGS knob so that regress can be run with EC keys (GENCERT_FLAGS=-e). Still no automatic way of testing with both RSA and EC keys.
2023-08-03use the legacy style in the tests for nowOmar Polo
2023-08-03fix test after log style condensed changeOmar Polo
2023-07-25rename ge -> gemexp in regress tooOmar Polo
2023-07-25allow to change the logging style; introduce some new onesOmar Polo
add `log style <style>'; The old default is called `legacy' now, a new default format is added called `condensed', and `common' and `combined' to mimick Apache httpd and nginx (respectively) are also added.
2023-07-24add a test for the file loggingOmar Polo
2023-07-23add a test with fastcgi, locations and forceful disablingOmar Polo
2023-07-23adjust syntax in fastcgi test; add another test for the old syntaxOmar Polo
2023-07-01improve fcgi test: send more than one chunk of dataOmar Polo
2023-06-23use REGRESS_HOST to specify the host to listen to; use in CIOmar Polo
some CI envs don't like `listen on localhost' but tolerate INADDR_ANY or IN6ADDR_ANY_INIT.
2023-06-23implement `listen on'Omar Polo
Listening by default on all the addresses is so bad I don't know why I haven't changed this before. Anyway. Add a `listen on $hostname port $port' syntax to the config file and deprecate the old "port" and "ipv6" global setting. Still try to honour them when no "listen on" directive is used for backward compatibily, but this will go away in the next next version hopefully. At the moment the `listen on' in server context don't filter the host, i.e. one can still reach a host from a address not specified in the corresponding `liste on', this will be added later.
2023-06-13remove regress/shaOmar Polo
we can use cmp to tell if two files are different, which also has the benefit of being available everywhere and reporting the byte offset of the first difference. Reduces the test dependencies on some systems.
2023-06-09re-establish fastcgi testOmar Polo
2022-09-08adjust regress to use `ge' for the old configless testOmar Polo
2022-09-06get rid of the CGI supportOmar Polo
I really want to get rid of the `executor' process hack for CGI scripts and its escalation to allow fastcgi and proxying to work on non-OpenBSD. This drops the CGI support and the `executor' process entirely and is the first step towards gmid 2.0. It also allows to have more secure defaults. On non-OpenBSD systems this means that the sandbox will be deactivated as soon as fastcgi or proxying are used: you can't open sockets under FreeBSD' capsicum(4) and I don't want to go thru the pain of making it work under linux' seccomp/landlock. Patches are always welcome however. For folks using CGI scripts (hey, I'm one of you!) not all hope is lost: fcgiwrap or OpenBSD' slowcgi(8) are ways to run CGI scripts as they were FastCGI applications. fixes for the documentation and to the non-OpenBSD sandboxes will follow.
2022-07-04fix test_auto_indexOmar Polo
2022-07-04check for the expected page in test_auto_indexOmar Polo
not just the number of lines, check the full page!
2022-04-07use the types block instead of `map' in the tests tooOmar Polo
2022-03-26break out if check_reply failsOmar Polo
it's not a problem when we have only one check_reply at then end, since $? is kept across function boundaries, but when we have multiple checks we need to quit on the first error.
2022-02-26add tests for the type blockOmar Polo
2022-01-05bail out of client_read if we've already decide what to doOmar Polo
libevent2 can still somehowe call client_read even in code paths that never enable reading from the evbuffer. Can't reproduce on the libevent in base on OpenBSD. It's a bit ugly, but it's a small workaround for something that otherwise *always* make gmid crash when linked against libevent2. (client_read works under the assumption that c->host != NULL, matched_proxy crashes otherwise.)
2022-01-03add set_proxy to simplify testing + more checks in test_proxy_with_certsOmar Polo
2022-01-02parethesize `proxy', I'm about to change the syntaxOmar Polo
2022-01-01add proxying with client certificate testOmar Polo
2022-01-01typoOmar Polo
2021-12-29add a test for the `proxy relay-to' ruleOmar Polo