lighttpd1.4/tests
Glenn Strauss 1d9709b8ab [core] update HTTP status codes list from IANA 2020-10-11 12:19:26 -04:00
..
docroot [tests] some test config cleanup 2018-12-10 22:36:23 -05:00
404-handler.conf [tests] some test config cleanup 2018-12-10 22:36:23 -05:00
CMakeLists.txt [tests] mod_compress -> mod_deflate 2020-08-02 06:46:22 -04:00
LightyTest.pm [tests] has_feature() helper func 2019-05-13 21:01:57 -04:00
Makefile.am [tests] mod_compress -> mod_deflate 2020-08-02 06:46:22 -04:00
README [doc] update README and INSTALL 2020-10-11 12:19:26 -04:00
SConscript [tests] mod_compress -> mod_deflate 2020-08-02 06:46:22 -04:00
cachable.t [core] support weak etags with If-None-Match 2019-05-06 01:13:58 -04:00
cleanup.sh [scons] various improvements 2015-08-29 09:28:04 +00:00
condition.conf [tests] some test config cleanup 2018-12-10 22:36:23 -05:00
core-404-handler.t [core] server.error-handler new directive for error pages (fixes #2702) 2016-04-25 01:01:08 -04:00
core-condition.t [core] never evaluate else branches until the previous branches are aready (fixes #2598) 2016-02-21 17:56:24 +00:00
core-keepalive.t [core] fix crash on master if blank line request 2020-10-11 12:19:26 -04:00
core-request.t [core] behavior change: stricter URL normalization 2019-05-04 17:48:04 -04:00
core-response.t [core] redirect to dir using relative-path 2020-10-11 11:43:06 -04:00
core-var-include.t - change s/// separator that it doesn't confuse vim 2008-01-15 22:03:59 +00:00
fastcgi-10.conf [mod_indexfile] use config_plugin_values_init() 2020-05-23 17:59:29 -04:00
fastcgi-responder.conf [mod_indexfile] use config_plugin_values_init() 2020-05-23 17:59:29 -04:00
fcgi-auth.c [tests] test coverage for issues (#321, #322) 2016-09-19 20:02:02 -04:00
fcgi-responder.c [tests] FCGI_Finish() final request before exit 2017-01-10 18:16:35 -05:00
lighttpd.conf [mod_deflate] mod_deflate subsumes mod_compress 2020-08-02 06:46:22 -04:00
lighttpd.htpasswd [mod_auth] skip blank lines and comment lines (fixes #2327) 2016-04-28 13:13:43 -04:00
lighttpd.user moved everything below trunk/ and added branches/ and tags/ 2005-02-20 14:27:00 +00:00
lowercase.conf [tests] more test config cleanup 2018-12-18 00:08:46 -05:00
lowercase.t - change s/// separator that it doesn't confuse vim 2008-01-15 22:03:59 +00:00
meson.build [tests] mod_compress -> mod_deflate 2020-08-02 06:46:22 -04:00
mod-auth.conf [tests] some test config cleanup 2018-12-10 22:36:23 -05:00
mod-auth.t [tests] some test config cleanup 2018-12-10 22:36:23 -05:00
mod-cgi.t [core] consolidate dynamic handler response parse 2017-03-19 23:48:50 -04:00
mod-deflate.conf [tests] mod_compress -> mod_deflate 2020-08-02 06:46:22 -04:00
mod-deflate.t [tests] mod_compress -> mod_deflate 2020-08-02 06:46:22 -04:00
mod-extforward.conf [tests] some test config cleanup 2018-12-10 22:36:23 -05:00
mod-extforward.t [mod_extforward] support Forwarded HTTP Extension (#2703) 2017-04-06 00:22:41 -04:00
mod-fastcgi.t [tests] fix skip count in mod-fastcgi w/o php-cgi 2020-07-08 19:54:30 -04:00
mod-proxy.t [core] behavior change: stricter URL normalization 2019-05-04 17:48:04 -04:00
mod-scgi.t [tests] reduce time waiting for backends to start 2017-03-19 23:48:50 -04:00
mod-secdownload.conf [tests] some test config cleanup 2018-12-10 22:36:23 -05:00
mod-secdownload.t [tests] skip mod-secdownload HMAC-SHA1,HMAC-SHA256 2019-05-13 21:01:57 -04:00
mod-setenv.t [mod_setenv] directives to overwrite/remove hdrs (fixes #650, fixes #2295) 2017-01-31 14:36:15 -05:00
mod-ssi.t [mod_ssi] more flexible quoting (fixes #1768) 2016-05-14 05:50:37 -04:00
prepare.sh scons: fix check environment 2020-08-02 20:05:33 +02:00
proxy.conf [tests] more test config cleanup 2018-12-18 00:08:46 -05:00
request.t [core] update HTTP status codes list from IANA 2020-10-11 12:19:26 -04:00
run-tests.pl Fix request parser to handle packets with splitted \r\n\r\n (fixes #2105) 2009-11-29 14:13:13 +00:00
scgi-responder.c [multiple] add summaries to top of some modules 2020-07-08 22:51:31 -04:00
scgi-responder.conf [tests] some test config cleanup 2018-12-10 22:36:23 -05:00
symlink.t mark testcase executable 2008-05-22 06:25:54 +00:00
var-include-sub.conf [tests] search for perl in PATH instead of /usr/bin; whitespace + test config cleanups 2015-08-22 20:51:08 +00:00
var-include.conf [tests] some test config cleanup 2018-12-10 22:36:23 -05:00
wrapper.sh Add static-file.disable-pathinfo option to prevent handling of urls like .../secret.php/image.jpg as static file 2011-08-30 22:13:59 +00:00

README

Running tests
-------------

  $ make check

If run from tests/ dir, tests will fail to run tests if lighttpd not built.
If run from top level, 'make' will build lighttpd exectuable if not yet built,
and then will run tests.


Running individual tests programs
---------------------------------

prep
  $ cd tests/
  $ ./prepare.sh

then, for any particular *.t such as request.t,
  $ ./request.t
or
  $ VERBOSE=1 RUNTESTS=request ./run-tests.pl

More information is output by tests with additional environment settings:
  $ TRACE_HTTP=1     ./request.t

See LightyTest.pm before trying TRACEME
  $ less LightyTest.pm

  $ TRACEME=strace   ./request.t   # output to file 'strace'
  $ TRACEME=truss    ./request.t   # output to file 'strace'
  $ TRACEME=gdb      ./request.t   # not for interactive debugging (see below)
  $ TRACEME=valgrind ./request.t

To reduce noise from valgrind --show-leak-kinds=all (or =reachable), avoid FAM.
Use server.stat-cache-engine = "simple" (not server.stat-cache-engine = "fam")
in lighttpd.conf.  (FAM creates /usr/libexec/gam_server as child process.)


Running lighttpd server with a config from tests/*.conf
-------------------------------------------------------

Each *.t loads the lighttpd server with one or more config files.
See each *.t for which config file is used, e.g. tests/lighttpd.conf

To run a specific config
  repo=$PWD      # from root of src repository
  cd tests/
  ./prepare.sh
  PERL=/usr/bin/perl PHP=/usr/bin/php-cgi SRCDIR=$repo/tests \
    $repo/src/lighttpd -D -f lighttpd.conf -m $repo/src/.libs

The PERL, PHP, and SRCDIR environment variables are set by LightyTest.pm
when 'make check' is run.  PERL and PHP can be set to paths to perl and php,
e.g. export PERL=/usr/bin/perl PHP=/usr/bin/php-cgi

To run a specific config under gdb
  repo=$PWD      # from root of src repository
  cd tests/
  ./prepare.sh
  PERL=/usr/bin/perl PHP=/usr/bin/php-cgi SRCDIR=$repo/tests repo=$repo \
    gdb $repo/src/lighttpd

  (gdb) set args -D -f lighttpd.conf -m $repo/src/.libs
  (gdb) start
  (gdb) ...


Hints and tips
--------------
Q: What do I do if tests fail with:
     bind: Address already in use at LightyTest.pm line 429.
A: It is likely that something else on the machine is already using the port
   that tests are trying to use to run a backend.  Try exiting out of your web
   browser and then run the tests again.  (root can use 'netstat' or 'ss' to
   find out which process is using the port.)


Additional documentation
------------------------
https://redmine.lighttpd.net/projects/lighttpd/wiki/RunningUnitTests
https://redmine.lighttpd.net/projects/lighttpd/wiki/HowToReportABug
https://redmine.lighttpd.net/projects/lighttpd/wiki/DebugVariables