@cryptotaxi247 / kubo / commits / 3d5e01587

add a test for auto-raising ulimit

License: MIT Signed-off-by: Jeromy <why@ipfs.io>

Jeromy committed Jun 22, 2016 at 11:17 UTC 3d5e015876016e0f4cd9563e5ad22820bfd46564
2 files changed +12
test/sharness/lib/test-lib.sh
+2
@@ -207,6 +207,8 @@ test_launch_ipfs_daemon() {
207
208 args="$@"
209
210 + test "$TEST_ULIMIT_PRESET" != 1 && ulimit -n 1024
211 +
212 test_expect_success "'ipfs daemon' succeeds" '
213 ipfs daemon $args >actual_daemon 2>daemon_err &
214 '
test/sharness/t0060-daemon.sh
+10
@@ -121,4 +121,14 @@ test_expect_success "daemon with pipe eventually becomes live" '
121 test_fsh cat stdin_daemon_out || test_fsh cat stdin_daemon_err || test_fsh cat stdin_poll_apiout || test_fsh cat stdin_poll_apierr
122 '
123
124 +ulimit -n 512
125 +TEST_ULIMIT_PRESET=1
126 +test_launch_ipfs_daemon
127 +
128 +test_expect_success "daemon raised its fd limit" '
129 + grep "ulimit" actual_daemon > /dev/null
130 +'
131 +
132 +test_kill_ipfs_daemon
133 +
134 test_done