Skip to content

Commit

Permalink
Merge pull request #2891 from ipfs/feat/ulimit-raise-tests
Browse files Browse the repository at this point in the history
add a test for auto-raising ulimit
  • Loading branch information
whyrusleeping authored Jun 23, 2016
2 parents 0ac81da + 3d5e015 commit 6e45e9d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/sharness/lib/test-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ test_launch_ipfs_daemon() {

args="$@"

test "$TEST_ULIMIT_PRESET" != 1 && ulimit -n 1024

test_expect_success "'ipfs daemon' succeeds" '
ipfs daemon $args >actual_daemon 2>daemon_err &
'
Expand Down
10 changes: 10 additions & 0 deletions test/sharness/t0060-daemon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,14 @@ test_expect_success "daemon with pipe eventually becomes live" '
test_fsh cat stdin_daemon_out || test_fsh cat stdin_daemon_err || test_fsh cat stdin_poll_apiout || test_fsh cat stdin_poll_apierr
'

ulimit -n 512
TEST_ULIMIT_PRESET=1
test_launch_ipfs_daemon

test_expect_success "daemon raised its fd limit" '
grep "ulimit" actual_daemon > /dev/null
'

test_kill_ipfs_daemon

test_done

0 comments on commit 6e45e9d

Please sign in to comment.