Date | Commit message (Collapse) |
|
The ab(1) command we use for testing is limited to 20000 open
connections under Debian jessie; a perfectly reasonable limit
to avoid port exhaustion. I never noticed this limit before,
but systemd under Jessie seems to have upped the default
RLIMIT_NOFILE to 65536(!), causing ab to error out.
We don't even need 10K connections for testing,
we just need to hit *some* limit before we start expiring.
So lower the RLIMIT_NOFILE back to 1024 in the forked server
process so we can test more quickly without running out of
ports or memory, since exhausting the 65536 RLIMIT_NOFILE
limit is not going to happen with a single TCP address.
|
|
Using the 'update-copyright' script from gnulib[1]:
git ls-files | UPDATE_COPYRIGHT_HOLDER='all contributors' \
UPDATE_COPYRIGHT_USE_INTERVALS=2 \
xargs /path/to/gnulib/build-aux/update-copyright
We're also switching to 'GPL-3.0+' as recommended by SPDX
to be consistent with our gemspec and other metadata
(as opposed to the longer but equivalent "GPLv3 or later").
[1] git://git.savannah.gnu.org/gnulib.git
|
|
There are likely yet-to-be-discovered bugs in here.
Also, keeping explicit #freeze calls for 2.2 users, since most
users have not migrated to 2.3, yet.
|
|
Future updates may use the update-copyright script in gnulib:
git ls-files | UPDATE_COPYRIGHT_HOLDER='all contributors' \
UPDATE_COPYRIGHT_USE_INTERVALS=2 \
xargs /path/to/gnulib/build-aux/update-copyright
|
|
Process.spawn is faster under Linux since it may use vfork
to avoid marking pages copy-on-write.
|
|
Not all TCP stacks behave the same with timing-sensitive tests.
Fortunately these timing differences aren't very critical over real
networks.
|
|
ab(1) is less common than our other dependencies, so allow tests
to run without it.
|
|
Some users may care to have sub-second or fractional timeouts for
various reasons. Do not reject those values to be consistent with
Ruby sleep/select.
|
|
We may end up buffering on headers and hitting EMFILE/ENFILE this
way, too. We need to figure out a way to recover from this.
|
|
This reduces the amount of code we have in our tests to
improve maintainability.
|
|
Walking ObjectSpace should be acceptable for this test (due to MT FD
allocation). Using check_client_connection saves us a bunch of time
when recovering from an overload scenario.
|
|
Leaking file descriptors may lead to out-of-FD situations in
an MT test suite.
|
|
We should see the reason for test failures.
|
|
Temporarily disabling parallel tests maybe needed to diagnose
some problems with tests.
|
|
This should help prevent us from running out of FDs prematurely
as our test suite becomes more multi-threaded. We can also use
plain TCPSocket in tests where we inherit the file descriptor
from the parent (w/o accept).
|
|
Unfortunately, this will need further work because tests
are MT and FD counts vary, so reproducing reliable FD
counts will need to rely on exec + FD_CLOEXEC.
|
|
This is rarely-called code, but we need to be sure we can expire
clients correctly when thresholds are reached. We also correctly
handle negative values of the client_expire_threshold directive.
|