diff options
author | Ross Lagerwall <rosslagerwall@gmail.com> | 2012-02-23 21:40:02 +0200 |
---|---|---|
committer | Ross Lagerwall <rosslagerwall@gmail.com> | 2012-02-23 21:44:30 +0200 |
commit | 2ef92786e3f1a645937e00ac2d01a3389454fea9 (patch) | |
tree | 76bdd6af9cd1c990da148631e083fc8aa8f2ed40 /test/test.sh | |
parent | 74d32dd493a9eba7ff8c28bc1cdf1d3c672edf5c (diff) | |
download | libevent-2ef92786e3f1a645937e00ac2d01a3389454fea9.tar.gz |
Add a new test: test-fdleak which tests for fd leaks by creating many sockets.
This test opens a server socket, and forks a child which connects to that
server socket many times. It sets a low number for the max open file limit
to catch any file descriptor leaks.
It would not work on Windows since it uses fork() to be able to create both the
server and the clients.
Diffstat (limited to 'test/test.sh')
-rwxr-xr-x | test/test.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test.sh b/test/test.sh index 58ab5531..ac59de44 100755 --- a/test/test.sh +++ b/test/test.sh @@ -97,6 +97,14 @@ run_tests () { announce FAILED ; FAILED=yes fi + announce_n " test-fdleak: " + if $TEST_DIR/test-fdleak >>"$TEST_OUTPUT_FILE" ; + then + announce OKAY ; + else + announce FAILED ; + FAILED=yes + fi test -x $TEST_DIR/regress || return announce_n " regress: " if test "$TEST_OUTPUT_FILE" = "/dev/null" ; |