From: yang.wang Date: Wed, 30 Aug 2017 08:32:49 +0000 (+0800) Subject: run-make-check.sh: run ulimit without sudo X-Git-Tag: v13.0.1~915^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4e16380ab7f2aa51219e3362dcb03fa481a90d74;p=ceph.git run-make-check.sh: run ulimit without sudo ulimit is a shell builtin like cd, not a separate program. sudo looks for a binary to run, but there is no ulimit binary, then you will get an error message like: "sudo: ulimit: command not found" ulimit can only be run with root if you want raise the ulimit -n Change-Id: I59ab09240cb15cabe5b0a7342c3f562cd50c75e9 Signed-off-by: yang.wang --- diff --git a/run-make-check.sh b/run-make-check.sh index 6b9ed29f63a9..75e7d92b683b 100755 --- a/run-make-check.sh +++ b/run-make-check.sh @@ -71,8 +71,13 @@ function run() { $DRY_RUN ./do_cmake.sh $@ || return 1 $DRY_RUN cd build $DRY_RUN make $BUILD_MAKEOPTS tests || return 1 - # prevent OSD EMFILE death on tests - $DRY_RUN sudo ulimit -n 32768 + # prevent OSD EMFILE death on tests, make sure large than 1024 + $DRY_RUN ulimit -n $(ulimit -Hn) + if [ $(ulimit -n) -lt 1024 ];then + echo "***ulimit -n too small, better bigger than 1024 for test***" + return 1 + fi + if ! $DRY_RUN ctest $CHECK_MAKEOPTS --output-on-failure; then rm -f ${TMPDIR:-/tmp}/ceph-asok.* return 1