lighttpd 1.4.x https://www.lighttpd.net/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Glenn Strauss 9a37ba54d1 [tests] skip time-sensitive test during CI testing 2 weeks ago
..
docroot [tests] move tests/docroot/www contents up 1 level 2 weeks ago
CMakeLists.txt [tests] combine *.t using tests/condition.conf 3 weeks ago
LightyTest.pm [tests] IO::Socket::INET->new( Timeout => 1 ) 2 weeks ago
Makefile.am [tests] combine *.t using tests/condition.conf 3 weeks ago
README [tests] remove FastCGI test dependency on PHP 9 months ago
SConscript [tests] remove FastCGI test dependency on libfcgi 9 months ago
cleanup.sh [scons] various improvements 6 years ago
condition.conf [tests] combine *.t using tests/condition.conf 3 weeks ago
core-condition.t [tests] combine *.t using tests/condition.conf 3 weeks ago
fastcgi-responder.conf [tests] combine *.t using tests/lighttpd.conf 3 weeks ago
fcgi-responder.c [tests] remove FastCGI test dependency on PHP 9 months ago
lighttpd.conf [tests] t/test_mod_indexfile 2 weeks ago
lighttpd.htpasswd [mod_auth] skip blank lines and comment lines (fixes #2327) 5 years ago
lighttpd.user moved everything below trunk/ and added branches/ and tags/ 17 years ago
meson.build [tests] combine *.t using tests/condition.conf 3 weeks ago
mod-fastcgi.t [tests] skip time-sensitive test during CI testing 2 weeks ago
mod-scgi.t [tests] skip time-sensitive test during CI testing 2 weeks ago
prepare.sh [tests] move tests/docroot/www contents up 1 level 2 weeks ago
proxy.conf [tests] use ephemeral ports in tests 9 months ago
request.t [tests] t/test_mod_indexfile 2 weeks ago
run-tests.pl Fix request parser to handle packets with splitted \r\n\r\n (fixes #2105) 12 years ago
scgi-responder.c [tests] remove FastCGI test dependency on PHP 9 months ago
scgi-responder.conf [tests] combine *.t using tests/lighttpd.conf 3 weeks ago
var-include-sub.conf [tests] search for perl in PATH instead of /usr/bin; whitespace + test config cleanups 6 years ago
wrapper.sh Add static-file.disable-pathinfo option to prevent handling of urls like .../secret.php/image.jpg as static file 10 years ago

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 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

To run a specific config under gdb
repo=$PWD # from root of src repository
cd tests/
./prepare.sh
PERL=/usr/bin/perl SRCDIR=$repo/tests \
gdb --args $repo/src/lighttpd -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